View previous topic :: View next topic |
Author |
Message |
Betcha Expert Cheater Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Tue Nov 01, 2016 4:46 pm Post subject: When two fstp. |
|
|
Original injection without edits.
fld dword ptr [eax+24] is current stamina.
Code: | aobscan(Stamina,F3 83 C4 10 39 36 8B 46 14 D9 40 24 D9 5D D0)
alloc(newmem,$100)
label(code)
label(return)
newmem:
code:
fld dword ptr [eax+24]
fstp dword ptr [ebp-30]
jmp return
Stamina+09:
jmp newmem
nop
return:
registersymbol(Stamina) |
Is it safe to edit like this?
Code: | aobscan(Stamina,F3 83 C4 10 39 36 8B 46 14 D9 40 24 D9 5D D0)
alloc(newmem,$1000)
label(code)
label(return)
newmem:
fld dword ptr [eax+20]
fstp dword ptr [eax+24]
jmp return
code:
fstp dword ptr [ebp-30]
jmp return
Stamina+09:
jmp newmem
nop
return:
registersymbol(Stamina) |
fld dword ptr [eax+20] is max stamina.
Wondering cause of two fstp.
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Nov 01, 2016 4:47 pm Post subject: |
|
|
Leave off the "P" and it won't pop the float off the stack.
Code: | aobscan(Stamina,F3 83 C4 10 39 36 8B 46 14 D9 40 24 D9 5D D0)
alloc(newmem,$1000)
label(code)
label(return)
newmem:
fld dword ptr [eax+20]
fst dword ptr [eax+24]
//jmp return -- edited
code:
fstp dword ptr [ebp-30]
jmp return
Stamina+09:
jmp newmem
nop
return:
registersymbol(Stamina) |
Last edited by Zanzer on Tue Nov 01, 2016 4:55 pm; edited 1 time in total |
|
Back to top |
|
|
Betcha Expert Cheater Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Tue Nov 01, 2016 4:49 pm Post subject: |
|
|
That was fast.
Thank you.
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Nov 01, 2016 4:54 pm Post subject: |
|
|
Oh wait. I just noticed you had a JMP RETURN in there. Remove the first one.
|
|
Back to top |
|
|
Betcha Expert Cheater Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Tue Nov 01, 2016 4:58 pm Post subject: |
|
|
Done.
If there is jmp return it jump over/skip fstp dword ptr [ebp-30] ?
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Tue Nov 01, 2016 5:13 pm Post subject: |
|
|
Correct. Which makes it so having the two FSTP doesn't cause a crash.
However, the game is putting your stamina value into [ebp-30] for a reason.
So by skipping that, who knows what issue you could cause down the road.
|
|
Back to top |
|
|
Betcha Expert Cheater Reputation: 4
Joined: 13 Aug 2015 Posts: 232 Location: Somewhere In Space
|
Posted: Tue Nov 01, 2016 5:29 pm Post subject: |
|
|
Gotcha and Thank you for making things clear.
|
|
Back to top |
|
|
|