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 do i use a 7 bytes string for compare?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
XaneXXXX
Expert Cheater
Reputation: 0

Joined: 29 Nov 2012
Posts: 212

PostPosted: Sun Sep 04, 2016 2:45 pm    Post subject: How do i use a 7 bytes string for compare? Reply with quote

Trying to make a simple no clip hack for vampire masquerade the bloodlines, i know that you can just write noclip in the console to get no clip but i do this for learning.

Here is my script:

Code:
[ENABLE]

aobscanmodule(clipbase,vampire.dll,8B 81 5C 03 00 00 8B) // should be unique
alloc(newmem,$100)

label(code)
label(hack)
label(original)
label(return)

globalalloc(_noclip,4)

newmem:

code:
cmp dword [ecx+00000024],79616C70 //79616C70  //463E0400
je hack
jmp original
  jmp return

hack:
mov [_noclip],ecx
mov eax,[ecx+0000035C]
jmp return

original:
mov eax,[ecx+0000035C]
jmp return

clipbase:
  jmp code
  nop
return:
registersymbol(clipbase)

[DISABLE]

clipbase:
  db 8B 81 5C 03 00 00

unregistersymbol(clipbase)
dealloc(newmem)


And it works fine. But the problem is that is compares "play" instead of player:

String i want to compare with:

So how can i compare like 7 bytes etc?
cmp byte = 1 byte
cmp word = 2 bytes
cmp dword = 4 bytes
cmp qword = 8 bytes.

How can i compare 7 bytes? Thanks!!
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 Sep 04, 2016 3:19 pm    Post subject: Reply with quote

Code:
cmp dword ptr [ecx+00000024],'play'
jne original
cmp word ptr [ecx+00000028],'er'
jne original
cmp byte ptr [ecx+0000002A],0
jne original
Back to top
View user's profile Send private message
XaneXXXX
Expert Cheater
Reputation: 0

Joined: 29 Nov 2012
Posts: 212

PostPosted: Sun Sep 04, 2016 3:28 pm    Post subject: Reply with quote

Zanzer wrote:
Code:
cmp dword ptr [ecx+00000024],'play'
jne original
cmp word ptr [ecx+00000028],'er'
jne original
cmp byte ptr [ecx+0000002A],0
jne original


Thanks!! Btw what is ptr? what does it stand for? Thanks!
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 Sep 04, 2016 3:39 pm    Post subject: Reply with quote

Pointer
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