So I used cheatengine to find the location of my .coinage in ram --> then set a write break-point on it to see what writes to it..got a hit:
wow.006b9cdc mov [eax+edx*4],ecx
I know that's super basic..but now I'm stuck trying to figure out offset
from unitFields
Code:
001 push ebp
002 mov ebp,esp
003 mov eax,[ecx+0x8] 'eax = unit_fields_addr ?
004 mov ecx,[ebp+0xc]
005 mov edx,[ebp+0x8[
006 mov [eax+edx*4],ecx '[] = .coinageLoc, ecx = .value ?
007 pop ebp
008 retn 0x8
So..this is what I *thought*
006: this is the line that actually writes to .coinage so [eax+edx*4] must == localplayer.Coinage Address. So, ecx = new_coin_value ?
At first I thought at 003 eax == unit_fields
at 004..should be setting new_coin_value, wth is ebp+0xc
eax+edx*4 looks like the standard for finding a property based on offset*4
unitFields + offset * 4, but why is ecx == ebp+0xc
Anyway, I tried writing down all the registers..comparing them to my .baseAddress, unitfields, etc..and they didn't match like I thought, so..if anyone could shed some light..would be much appreciated.
ps. I know .coinage is unitFields + 0x478 * 4, just trying to learn to find myself.