We use an application at work whose maintence has long since been abandoned but we still need to maintain. In this case that means reverse engineering the program. I have used ghidra to decompile the program and have found the line of code I want to add, and where.
The original instruction reads:
007b6aae 8d 7e 50 LEA EDI,[ESI + 0x50]
Just above that I want to add:
[Some offset] 31 f6 XOR ECI,ECI
Ghidra won't let me do that so I am using a raw hexcode editor. The problem is that just inserting the bytes before the 8d 7e 50
doesn't work because it messes with the LEA
instruction creating invalid code. I think that I need to place the new code at a new offset, but I don't know enough about hex/assembly
code to know how to do that.