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 compare a Uniode String AA

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Xblade Of Heaven
Master Cheater
Reputation: 0

Joined: 16 Oct 2005
Posts: 395
Location: DEAD

PostPosted: Fri Dec 11, 2015 3:21 pm    Post subject: How compare a Uniode String AA Reply with quote

Hi all, i have a small question, is possible cmp a uncode string in a AA?

i use this unicode string: AShockPlayer

and for try a small comparation use ony AS unicode A.S. 4 bytes

Code:
alloc(example,1024)


mov eax,dword ptr[ecx]
cmp dword ptr[eax+450],example
jne code



code:
my example code


example:
dd 'A',0,'S',0

dealloc(example)


but no work, cmp no work, anyone have some idead why?

thanks!

_________________
Welcome to the Hell.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Redouane
Master Cheater
Reputation: 3

Joined: 05 Sep 2013
Posts: 363
Location: Algeria

PostPosted: Fri Dec 11, 2015 4:06 pm    Post subject: Re: How compare a Uniode String AA Reply with quote

Code:
alloc(example,1024)


// The function will overwrite eax
push example
push [eax+450] // assuming that [eax+450] is a pointer to the string
call Kernel32.lstrcmpW // There is also the case insensitive version
cmp eax,0 // or test eax,eax
mov eax,dword ptr[ecx]
jz code // if it jumps,they are equal,eax = 0
jmp other_code // now,they aren't equal



code:
my example code


example:
dd 'A',0,'S',0

dealloc(example)
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Dec 11, 2015 5:31 pm    Post subject: Reply with quote

You can always compare hex equivalent.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Dec 11, 2015 5:57 pm    Post subject: Reply with quote

Meh...
Code:
cmp word ptr[eax+450],'e'
jne code
cmp word ptr[eax+452],'x'
jne code
cmp word ptr[eax+454],'a'
jne code
cmp word ptr[eax+456],'m'
jne code
cmp word ptr[eax+458],'p'
jne code
cmp word ptr[eax+45A],'l'
jne code
cmp word ptr[eax+45C],'e'
jne code
Back to top
View user's profile Send private message
Xblade Of Heaven
Master Cheater
Reputation: 0

Joined: 16 Oct 2005
Posts: 395
Location: DEAD

PostPosted: Fri Dec 11, 2015 7:43 pm    Post subject: Reply with quote

thanks all for the help guys.

regards

_________________
Welcome to the Hell.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
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