View previous topic :: View next topic |
Author |
Message |
XaneXXXX Expert Cheater Reputation: 0
Joined: 29 Nov 2012 Posts: 212
|
Posted: Sun Sep 04, 2016 2:45 pm Post subject: How do i use a 7 bytes string for compare? |
|
|
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 |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sun Sep 04, 2016 3:19 pm Post subject: |
|
|
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 |
|
|
XaneXXXX Expert Cheater Reputation: 0
Joined: 29 Nov 2012 Posts: 212
|
Posted: Sun Sep 04, 2016 3:28 pm Post subject: |
|
|
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 |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Sun Sep 04, 2016 3:39 pm Post subject: |
|
|
Pointer
|
|
Back to top |
|
|
|