|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Brian1ee7 How do I cheat? Reputation: 0
Joined: 01 Jan 2019 Posts: 2
|
Posted: Tue Jan 01, 2019 5:39 am Post subject: CMP + dword pointer + multiple offsets = error |
|
|
Here is my assembly code:
Code: |
[ENABLE]
alloc(newmem,2048,2934D451C32)
label(original)
label(damage)
label(returnhere)
newmem:
cmp dword ptr [[[rsi+18]+30]+1E0],1
jne damage
original:
mov rsi,[rbp-08]
jmp returnhere
damage:
mov [rsi+64],eax
jmp original
2934D451C32:
jmp newmem
nop
nop
returnhere:
[DISABLE]
dealloc(newmem)
2934D451C32:
mov [rsi+64],eax
mov rsi,[rbp-08]
|
The problem is here:
Code: | cmp dword ptr [[[rsi+18]+30]+1E0],1 |
Where rsi+18 is the pointer.
Example scenario:
rsi = 0x293BD8CFE70
rsi + 0x18 = 293BD8CFE88 0x29398A3A540
0x29398A3A540 + 0x30 = 0x29398A3A570 0x2938DDC5330
0x2938DDC5330 + 0x1E0 = 0x2938DDC5510 0x00000001
The last offset should be read as 4 byte in CMP. How do I do that? Thanks and Happy New Year!
|
|
Back to top |
|
|
OldCheatEngineUser Whateven rank Reputation: 20
Joined: 01 Feb 2016 Posts: 1587
|
Posted: Tue Jan 01, 2019 6:45 am Post subject: |
|
|
Code: |
[ENABLE]
alloc(newmem,2048,2934D451C32)
label(original)
label(damage)
label(returnhere)
newmem:
push rsi
mov rsi,[rsi+18]
mov rsi,[rsi+30]
mov rsi,[rsi+1E0]
cmp rsi,1
pop rsi
jne damage
original:
mov rsi,[rbp-08]
jmp returnhere
damage:
mov [rsi+64],eax
jmp original
2934D451C32:
jmp newmem
nop
nop
returnhere:
[DISABLE]
dealloc(newmem)
2934D451C32:
mov [rsi+64],eax
mov rsi,[rbp-08] |
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote: | i am a sweetheart. |
|
|
Back to top |
|
|
Brian1ee7 How do I cheat? Reputation: 0
Joined: 01 Jan 2019 Posts: 2
|
Posted: Thu Jan 03, 2019 2:06 am Post subject: |
|
|
OldCheatEngineUser wrote: | Code: |
[ENABLE]
alloc(newmem,2048,2934D451C32)
label(original)
label(damage)
label(returnhere)
newmem:
push rsi
mov rsi,[rsi+18]
mov rsi,[rsi+30]
mov rsi,[rsi+1E0]
cmp rsi,1
pop rsi
jne damage
original:
mov rsi,[rbp-08]
jmp returnhere
damage:
mov [rsi+64],eax
jmp original
2934D451C32:
jmp newmem
nop
nop
returnhere:
[DISABLE]
dealloc(newmem)
2934D451C32:
mov [rsi+64],eax
mov rsi,[rbp-08] |
|
Thanks OldCheatEngineUser! Do you also know how to add check for each pointer except the last offset if it's a valid pointer? because there are times when [rsi+30] value is not a valid pointer in my game. Thanks again!
|
|
Back to top |
|
|
|
|
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
|
|