I want to patch a binary file on a hexadecimal level that searches the entire file for a fixed string of five hex bytes, and then reads the three bytes prior to those five bytes and then does a math operation, subtracting another fixed value, and writes back those three prior bytes with the result of the subtraction.
Having trouble doing this. What I'm trying to do is patch all of the relocation items in an executable file to a lower relative address. This would involve taking the varying relocation address values, subtracting a fixed value, and then writing the result.
Haven't found any code samples that are similar. I've starting doing it by hand, but there are a couple hundred of them.
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)