erris How do I cheat?
Reputation: 0
Joined: 05 May 2012 Posts: 2
|
Posted: Sun May 06, 2012 12:54 am Post subject: Compare address of health to stored address |
|
|
I am injecting the following with Auto assemble. I am having troubles comparing the address of the player's health to the known address that I find every session.
My comparison below always ends up being not equal, I'm unsure where I am going wrong. Any help is appreciated.
| Code: | alloc(fullHealthInjection, 2048)
alloc(healthPointer, 4)
label(backToMain)
label(isPlayer)
fullHealthInjection:
pushfd
push eax
push ecx
//hard-coded address of player health, found each game
mov [healthPointer],0x434562F8
//load the address of player health into ecx, [ebx+00000118]
lea ecx,[ebx+00000118]
cmp [healthPointer],ecx
pop ecx
je isPlayer
//Kill enemies
//pop top value of the stack
fstp st(0)
//Load -1 into register
mov eax,(float)-1
//Load 0 into the FPU register stack
fld [eax]
//Restore original
pop eax
popfd
jmp backToMain
isPlayer:
//pop top value of the stack
fstp st(0)
//Load 1000 into register
mov eax,(float)1000
//Load 1000 into the FPU register stack
fld [eax]
//Restore original
pop eax
popfd
jmp backToMain
//the address that we find writing to our health
//when called, [ebx+00000118] is the address of health
//originally:
//0BD2717C - D8 AB 18010000 - fsubr dword ptr [ebx+00000118]
//0BD27182 - D9 9B 18010000 - fstp dword ptr [ebx+00000118]
0BD2717C:
jmp fullHealthInjection
nop
backToMain: |
|
|