Exetools

Exetools (https://forum.exetools.com/index.php)
-   General Discussion (https://forum.exetools.com/forumdisplay.php?f=2)
-   -   How to patch a dll with relocations? (https://forum.exetools.com/showthread.php?t=20300)

aijundi 10-12-2022 13:17

How to patch a dll with relocations?
 
Hi,
I'm trying to patch a dll, but the resultant file gets corrupted.
After doing some research, it seems like it is due to relocations.
Is there any way to get around this?

sendersu 10-12-2022 23:31

You should not touch any bytes which are corrected by relocation mechanism
try to patch non-relocated bytes only...
Here is a tip how I"m answering the question whether bytes are relocated or not -
I'm using Hiew util and if the byte is colored in gray color - do not touch it, eg:
https://prnt.sc/XRAXWahjzZ6q

Kerlingen 10-13-2022 03:08

Why not just (re-)move the relocation entry for the positions you are patching? Deleting or moving inside the same block is just a two byte patch.


All times are GMT +8. The time now is 20:18.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX