Hello,
Today I wanted to hack my ammo in Sniper Elite Nazi Zombie Army 2. I realized there is no exact address for that, but for the displayed value. So I have to get the function that writes the value to display. I have the line where the my ammo gets written to the address that is displayed. Before this line there is a call edx instruction. I know this should be the right value, because this is the one that written to the displaying address. So how could I find the function that is giving the correct value of my ammo to the displaying address(call edx)?
Thanks in advance!
It sounds like the ammo display function is a virtual function. In that case, the ammo may be "passed in" via the this pointer. Somewhere within the code you may see a reference to ecx with some offset that could possibly be the ammo member of the class. If the display class is properly separated from the player entity itself then the ammo will be passed in via a parameter and the parameter will be pushed onto the stack before the call, or the entity class is itself the parameter and the display function updates all relevant members of the entity class.
Last edited by Fovea; 11-17-2013 at 03:06 PM.