I am trying to make a trainer for an old single player game. Basically, I want infinite money. I found out that this address is not static, but dynamic. It changes everytime I start the game.
After some debugging I found out that the address holding the money value comes in the EAX register for a short while. I want to extract it's value.
I know how to access EAX in C:
But the value isn't there the whole time. Thus, I can't "just" save it's value somewhere else.Code://This works in MS VS. int i; __asm mov i, eax; printf("%X\n", i);
See my debugging logs for more info:
How can I retrieve that address? I have already injected my dll in the games process, I can access and change the memory data locally.Code:007e3e14 - mov ebx,[eax] 007e3e16 - add ebx,edi 007e3e18 - mov [eax],ebx //EAX = 073BBBB4 - The address holding the value of money 007e3e1a - jns 007e3e22 007e3e1c - mov [eax],00000000