Posted: Tue Mar 07, 2017 2:34 pm Post subject: disabling injection modifies original byte code
I made an injection using the auto assembler and the templates "Cheat Table framework code" and "Code injection". Note that I did not change a single thing in the script to reproduce this behavior.
Without executing I add the script to the table. I then enable the script and disable it again. Disabling causes the original code to be put back at the injection point as per template definition. While the instructions are the same as before enabling the script, the byte code has changed to:
39 D1 7C 0B 7F 04
Note how the first two bytes have changed.
So the game works just like it did before the injection, but the byte code has changed. What's the most elegant way to restore the original byte code? I figure I could just do it using mov (once I get it to work that way) but maybe there's some solution that looks better using auto assembler features?
I'd tell you why I want to know this, but I'm afraid you'd try to convince me of just not doing it instead of helping me out.
That's because some assembler instructions can be coded in different ways although achieving the exact same effect (i.e. that's also the case when subtracting two certain registers).
To prevent that, just comment the instructions and input the originalbytes like this
Code:
[DISABLE]
dealloc(newmem)
"Game.exe"+12345:
//cmp ecx,edx
//jl mygame.exe+address
//jg mygame.exe+otheraddress
db 3B CA 7C 0B 7F 04
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum