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 


AA help (floats, comparing, and more)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
HSCoDeR
How do I cheat?
Reputation: 0

Joined: 26 May 2006
Posts: 3

PostPosted: Mon Jun 23, 2008 4:44 am    Post subject: AA help (floats, comparing, and more) Reply with quote

I dont consider myself a pro at ASM or anything but ive made a few good hacks using it with the the auto assembler in CE. So, heres what im having problems with.

This is a Cut&Paste from Ollydbg.
Code:

004A0C83  |.  85C0          TEST EAX,EAX
004A0C85  |.  75 05         JNZ SHORT 004A0C8C
004A0C87  |.  8D46 48       LEA EAX,DWORD PTR DS:[ESI+48]
004A0C8A  |.  EB 09         JMP SHORT 004A0C95
004A0C8C  |>  8B50 20       MOV EDX,DWORD PTR DS:[EAX+20]
004A0C8F  |.  8B40 0C       MOV EAX,DWORD PTR DS:[EAX+C]
004A0C92  |.  8B0490        MOV EAX,DWORD PTR DS:[EAX+EDX*4]
004A0C95  |>  D900          FLD DWORD PTR DS:[EAX]      // (Code) #1
004A0C97  |.  E8 EC100C00   CALL 00561D88
004A0C9C  |.  66:894424 10  MOV WORD PTR SS:[ESP+10],AX
004A0CA1  |.  8B46 54       MOV EAX,DWORD PTR DS:[ESI+54]
004A0CA4  |.  85C0          TEST EAX,EAX
004A0CA6  |.  75 05         JNZ SHORT 004A0CAD
004A0CA8  |.  8D46 48       LEA EAX,DWORD PTR DS:[ESI+48]
004A0CAB  |.  EB 09         JMP SHORT 004A0CB6
004A0CAD  |>  8B48 20       MOV ECX,DWORD PTR DS:[EAX+20]
004A0CB0  |.  8B50 0C       MOV EDX,DWORD PTR DS:[EAX+C]
004A0CB3  |.  8B048A        MOV EAX,DWORD PTR DS:[EDX+ECX*4]
004A0CB6  |>  D940 04       FLD DWORD PTR DS:[EAX+4]      // (Code) #2
004A0CB9  |.  E8 CA100C00   CALL 00561D88
004A0CBE  |.  66:894424 12  MOV WORD PTR SS:[ESP+12],AX
004A0CC3  |.  8B46 54       MOV EAX,DWORD PTR DS:[ESI+54]
004A0CC6  |.  85C0          TEST EAX,EAX
004A0CC8  |.  75 05         JNZ SHORT 004A0CCF
004A0CCA  |.  8D46 48       LEA EAX,DWORD PTR DS:[ESI+48]
004A0CCD  |.  EB 09         JMP SHORT 004A0CD8
004A0CCF  |>  8B48 20       MOV ECX,DWORD PTR DS:[EAX+20]
004A0CD2  |.  8B50 0C       MOV EDX,DWORD PTR DS:[EAX+C]
004A0CD5  |.  8B048A        MOV EAX,DWORD PTR DS:[EDX+ECX*4]
004A0CD8  |>  D940 08       FLD DWORD PTR DS:[EAX+8]      // (Code) #3
004A0CDB  |.  E8 A8100C00   CALL 00561D88
004A0CE0  |.  66:894424 14  MOV WORD PTR SS:[ESP+14],AX
004A0CE5  |.  8B46 64       MOV EAX,DWORD PTR DS:[ESI+64]


The three lines of code that i put comments on are the ones i need help with the most. If i NOP those 3 lines of code in the game im hacking i gain a sort of invisibility power; but it leaves a visible clone of me (that they can shoot and do dmg to me with) at the spawn point in the map once i activate it. So i was thinking if maybe i could load where i last was when i enabled the hack(the 3 pieces of code house my X, Y, and Z co-ordinates) instead of NOPing to forceable cause and error that makes me be see at the spawn point.

I had something like this in mind. (And just copying the code 3 times for each of the differnet lines of code i want to hack. But no i dont expect this to run either, im just throwing out what my idea is.)
Code:

alloc(newmem1,2048) //2kb should be enough
alloc(custompointer1,4)
alloc(customvalue1,4)
label(returnhere1)
label(originalcode1)
label(exit1)

004A0C95:
jmp newmem1
nop
nop
returnhere1:

newmem1:
if (already_been_executed_before)
jmp originalcode1
else
mov customvalue1,dword ptr [eax]
lea custompointer1,[customvalue1]


originalcode1:
fld dword ptr [customvalue1]
call 00561d88

exit1:
jmp returnhere1


The real problem im having with this is the fact that im not all too familiar on how to compare things with ASM, that and i need to make the "load custom value" part of the script only run once, (so its not continually updating to my current position making the hack useless) when its in been activated by the trainer. But the values are also float's and ive never really done anything with those either so i dont really know if im even using the right instructions. T_T

To sum it up, I need a piece of code that steals the value of my my position ONLY when i FIRST enable the hack. Then i need it to use that constant value instead the normal changing value while the hack is activated. Lastly, when i disable the hack i need every thing to go back to normal. ( I can do that part Very Happy )

Thank you for your time any help would be apriciated.
Back to top
View user's profile Send private message
Labyrnth
Moderator
Reputation: 10

Joined: 28 Nov 2006
Posts: 6301

PostPosted: Mon Jun 23, 2008 2:56 pm    Post subject: Reply with quote

Do a search for "A Very In Depth Tutorial on Auto Assembler"
It will explain how to do a cmp in assembly.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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