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 


How to compare string with register+offest asm

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 231

PostPosted: Sun Dec 11, 2016 8:08 am    Post subject: How to compare string with register+offest asm Reply with quote

I need example to compare the string in this offset f48
[ecx+f48] contain string Hello

and I want to compare hello with mystringishere
[ecx+f48],mystringishere
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Dec 11, 2016 8:19 am    Post subject: Reply with quote

Code:
cmp [ecx+F48],'Hell'
jne code
cmp byte ptr [ecx+F4C],'o'
jne code
//it equals!
Back to top
View user's profile Send private message
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 231

PostPosted: Sun Dec 11, 2016 8:28 am    Post subject: Reply with quote

like this for mystringishere word ?
Code:
cmp [ecx+F48],'myst'
jne code
cmp byte ptr [ecx+F4C],'ring'
jne code
cmp [ecx+F48],'ishe'
jne code
cmp byte ptr [ecx+F4C],'re'
jne code
//it equals!
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Sun Dec 11, 2016 9:02 am    Post subject: This post has 1 review(s) Reply with quote

Nope.
Code:
cmp dword ptr [addr],val // compares 4 bytes (default when size isn't specified)
cmp word ptr [addr],val  // compares 2 bytes
cmp byte ptr [addr],val  // compares 1 byte

The first 4 characters start at [ecx+F48].
Then the next 4 characters start at [ecx+F4C].
Followed by the next 4 characters at [ecx+F50].
Back to top
View user's profile Send private message
Twistedfate
Expert Cheater
Reputation: 1

Joined: 11 Mar 2016
Posts: 231

PostPosted: Sun Dec 11, 2016 9:26 am    Post subject: Reply with quote

thnx worked ... I cannot rep u untill I rep some one else sorry
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 Discussions 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