Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Analyze fld command and replace with another

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
Dave_Scream
Cheater
Reputation: 0

Joined: 06 Dec 2009
Posts: 26

PostPosted: Mon Jun 11, 2012 1:46 am    Post subject: Analyze fld command and replace with another Reply with quote

Hi Im trying to cheat 'lifes amount' in game. The problem is that address of this value change when some code in game change this value.

I tryed to make pointerscan (up to 7 levels). Founded pointers work, even when some game routine change value and address of value changes, this pointers stay good and show amount of lives. But trouble is that all these pointers good until game reboot. when restart game all pointers bad, so i cant make trainer.

I maked "Break and Trace by access" and found routine that access lives amount.

here is it:
Code:

arma2oa.exe+5A1EF1 - 55                    - push ebp
arma2oa.exe+5A1EF2 - 8B EC                 - mov ebp,esp
arma2oa.exe+5A1EF4 - 51                    - push ecx
arma2oa.exe+5A1EF5 - 51                    - push ecx
arma2oa.exe+5A1EF6 - FF 75 14              - push [ebp+14]
arma2oa.exe+5A1EF9 - 8D 45 F8              - lea eax,[ebp-08]
arma2oa.exe+5A1EFC - FF 75 10              - push [ebp+10]
arma2oa.exe+5A1EFF - FF 75 0C              - push [ebp+0C]
arma2oa.exe+5A1F02 - 50                    - push eax
arma2oa.exe+5A1F03 - FF 51 08              - call dword ptr [ecx+08]
arma2oa.exe+6F8A6F - E8 42E79DFF           - call arma2oa.exe+D71B6
arma2oa.exe+D71B6 - 55                    - push ebp
arma2oa.exe+D71B7 - 8B EC                 - mov ebp,esp
arma2oa.exe+D71B9 - 51                    - push ecx
arma2oa.exe+D71BA - 8B 49 04              - mov ecx,[ecx+04]
arma2oa.exe+D71BD - 85 C9                 - test ecx,ecx
arma2oa.exe+D71BF - 74 0A                 - je arma2oa.exe+D71CB
arma2oa.exe+D71C1 - 8B 01                 - mov eax,[ecx]
arma2oa.exe+D71C3 - FF 50 14              - call dword ptr [eax+14]
arma2oa.exe+807CD - D9 41 0C              - fld dword ptr [ecx+0C]  <--------- here lifes amount read
arma2oa.exe+807D0 - C3                    - ret
arma2oa.exe+D71C6 - D9 5D FC              - fstp dword ptr [ebp-04]
arma2oa.exe+D71C9 - EB 08                 - jmp arma2oa.exe+D71D3
arma2oa.exe+D71D3 - D9 45 FC              - fld dword ptr [ebp-04]
arma2oa.exe+D71D6 - C9                    - leave
arma2oa.exe+D71D7 - C3                    - ret
arma2oa.exe+6F8A74 - D9 5D FC              - fstp dword ptr [ebp-04]
arma2oa.exe+6F8A77 - 8B 4D 14              - mov ecx,[ebp+14]



The problem is that this routine rarely read some other values.
I cant find the way to calculate how the address of value calculated, and want to make this trick:

when here the value is read:
arma2oa.exe+807CD - D9 41 0C - fld dword ptr [ecx+0C]

analyze read it lives amount or somethink other
if (value > 5000.00 AND value < 12001.00)
value = 12000.00

so if it between 5000.00 and 12000 - then replace value.

QUESTION:
how to make it? I think need to use LUA cause if use inline assembler I dont know how to work with floats, how to compare them. how to replace fld result?

Im very newbie, please, if U can, make more easy answer.
Working Example is 100% what i want.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites