|
You could use code injection.
Find a code cave, free space to have your own code, 10abf is always a good addy if you cant find one.
Then I would write this at the code cave
mov ecx , xxxxxx whatever value you want here in hex
jmp xxxxxxx (whatever addy you will jump from in the game)
And at the game coding, where the sub is
jump 10abf (and say yes to nop extra)
Any coding apart from the sub op code that is destroyed here will have to be replaced in your code cave. jumps take 5 bytes so bear that in mind.
|