I hope this can explain something... (sorry if it is not...)
Grand Theft Auto: San Andreas
Health for CJ is a float data-type. Every time CJ saves game, his health restored fully... In early game CJ’s max health is 100.00..
After i found his health address, i applied “
Find What Writes This Address” to it... Then i re-saved the game.
Back in MHS i got these in Auto-Hack:
- Code: Select all
00618F81 | D999 40050000 | FSTP DWORD PTR [ECX+540] |
that’s the code which writes to CJ’s health to his full health every time CJ saves his progress (save the game).
By that time i knew the address of CJ’s health is ECX+540...
Next, i was studying the code when i caught these:
- Code: Select all
00618F79 | 8B0D 98CDB700 | MOV ECX, DWORD PTR [B7CD98] |
00618F7F | 6A 00 | PUSH 0 |
00618F81 | D999 40050000 | FSTP DWORD PTR [ECX+540] | --> the code from auto-hack
I already knew that CJ’s health address is ECX+540, and this code:
- Code: Select all
00618F79 | 8B0D 98CDB700 | MOV ECX, DWORD PTR [B7CD98] |
is obviously made ECX value is the same as the value of address 0x00B7CD98.
So the complex address for CJ’s health is
[0x00B7CD98]+0x540 which then i put this on my MHS Table...
What better was CJ’s weapons stored only a few bytes after his Health address, and the ‘pattern’ in Hex Editor seemed static.
So, i can use similar complex address for all of CJ’s weapons and made my MHS table richer...
.. to boldly go where no eagle has gone before...