 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Wed Feb 15, 2012 3:14 pm Post subject: Auto assembler pointer condition |
|
|
I have one code that write to many addresses it's location is:
[edi+48]
if i auto assembly:
mov [edi+48],5
hundreds of addresses will be set to 10
now i know that i have to find the pointer of the address i want to change the code ... and i did so.
pointer =
"game.exe"+ABC offset1=245 ;2=ff ;3=0 ;4=4 ;5=ab
and that i have to write a code that compares the address given by the pointer with the address that [edi+48] writes on, and if equal jump to my code if not continue with originalcode
but i don't know exactly how to do that:
i tried:
| Quote: | [ENABLE]
alloc(code,10)
label(codereturn)
label(codeforme)
code:
pushfd //save flags
push eax //save the eax register
mov eax,"game.exe"+ABC //move base adress into eax
mov eax,[eax] //move the value from eax into eax
add eax,245 //add first offset into eax
mov eax,[eax] //again move the value from eax into eax
add eax,ff //add second offset into eax
mov eax,[eax] //and so on
add eax,0 //third offset and so on
mov eax,[eax]
add eax,4
mov eax,[eax]
add eax,ab //add last offset; eax now holds player's address
cmp eax,[edi+48]//compare player adress with all addresses
je codeforme //if equal jump to code codeforme and do not execute originalcode
popfd //restore flags
pop eax //restore eax
mov [edi+48],eax //else execute originalcode
jmp codereturn //continue executing from original address
codeforme: //actual code that works only with the player
popfd //restore flags
pop eax //restore eax
mov [edi+48],0 //i want my value of address to be 0
jmp codereturn //continue executing from original address
"game.exe"+1280C5: //this code here writes to all addresses
jmp code
nop
codereturn:
[DISABLE]
dealloc(code)
"game.exe"+1280C5:
mov [edi+48],eax |
I really have no clue... where is it wrong ?
_________________
... Fresco |
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25815 Location: The netherlands
|
Posted: Wed Feb 15, 2012 3:28 pm Post subject: |
|
|
cmp eax,[edi+48]
You are comparing the address of your player to the value
Try:
| Code: |
push ebx
lea ebx,[edi+48]
cmp eax,ebx
pop ebx
je codeforme
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
Fresco Grandmaster Cheater
Reputation: 4
Joined: 07 Nov 2010 Posts: 600
|
Posted: Wed Feb 15, 2012 3:50 pm Post subject: |
|
|
It actually worked
Thank You!
_________________
... Fresco |
|
| Back to top |
|
 |
|
|
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
|
|