View previous topic :: View next topic |
Author |
Message |
podstanar Advanced Cheater
Reputation: 4
Joined: 02 May 2012 Posts: 82 Location: Flatland
|
Posted: Wed May 02, 2012 8:51 am Post subject: Compare register with string(AA)? |
|
|
Hello everyone. I have a question, how can i compare register(e.g. [eax+20C]) with string in AutoAssemble? I'm trying to distinguish between player and cpu's HP in a game called "Marvel Vs"(trading card game). Also, is there some tutorials/explanations for other methods of distinguishing values? DarkByte and Neanderthal mentioned it in this thread: forum.cheatengine.org/viewtopic.php?p=5349873&sid=67509d2f42413b6bda8c99be80a5b4ad
Thanks in advance.
|
|
Back to top |
|
 |
podstanar Advanced Cheater
Reputation: 4
Joined: 02 May 2012 Posts: 82 Location: Flatland
|
Posted: Thu May 03, 2012 5:56 am Post subject: |
|
|
Anyone?
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25765 Location: The netherlands
|
Posted: Thu May 03, 2012 6:30 am Post subject: |
|
|
You're not clear on what you wish to do. do you want to check the string stored at eax+20c, or the string that the pointer at eax+20c points to?
easiest method: (I could use scasb but I never used it myself so I wouldn't even know if I did it correctly)
Code: |
...
stringtocompare:
db 'a string'
...
...
check:
//store the registers that get changed
pushfd
push esi
push edi
push ecx
mov esi,stringtocompare
mov edi,[eax+20c] //edi get the pointer to the string you wish to check (use lea if the address itself)
mov ecx,8 //number of characters in the string
check_loop:
mov al,[esi]
cmp [edi],al
jne incorrect
inc edi
inc esi
loop check_loop //as long as ecx>0 jump to check_loop (loop decreases ecx for you)
//if it reaches here, the string is a match
//do stuff
jmp exit
incorrect:
//do incorrect handling
exit:
//restore the changed registers
pop ecx
pop edi
pop esi
popfd
...your exit handling...
|
_________________
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 |
|
 |
podstanar Advanced Cheater
Reputation: 4
Joined: 02 May 2012 Posts: 82 Location: Flatland
|
Posted: Thu May 03, 2012 8:57 am Post subject: |
|
|
Thanks for the response. Basically, i want to compare register ([ecx+78] - player id) which holds string (pb_playerid1) with that string. If it matches, it will move ([ecx+14] - max HP)to eax and then copy it to current health[ecx+08]. Something like this i think:
Code: | pushfd
pushad
cmp [ecx+78],pb_playerid1
jne +6
mov eax,[ecx+14]
mov [ecx+08],eax
popad
popfd |
Also, do you know some useful links/tutorials where i can learn about other methods of making god mode and invincibility on shared values, with real examples if possible.
|
|
Back to top |
|
 |
Acubra Advanced Cheater
Reputation: 0
Joined: 19 Jun 2011 Posts: 64 Location: C:\Windows\System32\HoG
|
Posted: Thu May 03, 2012 11:53 am Post subject: |
|
|
Hey,
check out Geri's tutorials. He made a couple of them concerning the "dissect data/structure" feature of cheat engine and so on.
|
|
Back to top |
|
 |
podstanar Advanced Cheater
Reputation: 4
Joined: 02 May 2012 Posts: 82 Location: Flatland
|
Posted: Thu May 03, 2012 8:05 pm Post subject: |
|
|
Actually i already checked all of them, there's two regarding this subject. Thanks anyway.
|
|
Back to top |
|
 |
|