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 


Compare register with string(AA)?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
podstanar
Advanced Cheater
Reputation: 4

Joined: 02 May 2012
Posts: 82
Location: Flatland

PostPosted: Wed May 02, 2012 8:51 am    Post subject: Compare register with string(AA)? Reply with quote

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
View user's profile Send private message
podstanar
Advanced Cheater
Reputation: 4

Joined: 02 May 2012
Posts: 82
Location: Flatland

PostPosted: Thu May 03, 2012 5:56 am    Post subject: Reply with quote

Anyone?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

Joined: 09 May 2003
Posts: 25765
Location: The netherlands

PostPosted: Thu May 03, 2012 6:30 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
podstanar
Advanced Cheater
Reputation: 4

Joined: 02 May 2012
Posts: 82
Location: Flatland

PostPosted: Thu May 03, 2012 8:57 am    Post subject: Reply with quote

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
View user's profile Send private message
Acubra
Advanced Cheater
Reputation: 0

Joined: 19 Jun 2011
Posts: 64
Location: C:\Windows\System32\HoG

PostPosted: Thu May 03, 2012 11:53 am    Post subject: Reply with quote

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
View user's profile Send private message
podstanar
Advanced Cheater
Reputation: 4

Joined: 02 May 2012
Posts: 82
Location: Flatland

PostPosted: Thu May 03, 2012 8:05 pm    Post subject: Reply with quote

Actually i already checked all of them, there's two regarding this subject. Thanks anyway.
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