 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
STAB How do I cheat?
Reputation: 0
Joined: 11 Sep 2015 Posts: 4
|
Posted: Tue Apr 14, 2020 11:56 pm Post subject: Disabling script problem |
|
|
im just trying something and i have a problem when i disable my script, it messed up the opcode after the original opcode.
here's my script
| Code: | [ENABLE]
aobscanmodule(step2_1,Tutorial-x86_64.exe,29 83 F0 07 00 00) // should be unique
abel(code)
label(return)
Base+20:
code:
mov [rbx+000007F0],#1000
jmp return
step2_1:
jmp Base+20
nop
return:
registersymbol(step2_1)
[DISABLE]
step2_1:
db 29 83 F0 07 00 00
unregistersymbol(step2_1)
{
// ORIGINAL CODE - INJECTION POINT: "Tutorial-x86_64.exe"+2B08C
"Tutorial-x86_64.exe"+2B060: 55 - push rbp
"Tutorial-x86_64.exe"+2B061: 48 89 E5 - mov rbp,rsp
"Tutorial-x86_64.exe"+2B064: 48 8D A4 24 D0 FE FF FF - lea rsp,[rsp-00000130]
"Tutorial-x86_64.exe"+2B06C: 48 89 9D F0 FE FF FF - mov [rbp-00000110],rbx
"Tutorial-x86_64.exe"+2B073: 48 89 CB - mov rbx,rcx
"Tutorial-x86_64.exe"+2B076: 48 C7 45 F8 00 00 00 00 - mov qword ptr [rbp-08],00000000
"Tutorial-x86_64.exe"+2B07E: 90 - nop
"Tutorial-x86_64.exe"+2B07F: B9 05 00 00 00 - mov ecx,00000005
"Tutorial-x86_64.exe"+2B084: E8 D7 49 FE FF - call Tutorial-x86_64.exe+FA60
"Tutorial-x86_64.exe"+2B089: 83 C0 01 - add eax,01
// ---------- INJECTING HERE ----------
"Tutorial-x86_64.exe"+2B08C: 29 83 F0 07 00 00 - sub [rbx+000007F0],eax
// ---------- DONE INJECTING ----------
"Tutorial-x86_64.exe"+2B092: 48 8D 4D F8 - lea rcx,[rbp-08]
"Tutorial-x86_64.exe"+2B096: E8 85 DD FD FF - call Tutorial-x86_64.exe+8E20
"Tutorial-x86_64.exe"+2B09B: 8B 8B F0 07 00 00 - mov ecx,[rbx+000007F0]
"Tutorial-x86_64.exe"+2B0A1: 41 B9 FF 00 00 00 - mov r9d,000000FF
"Tutorial-x86_64.exe"+2B0A7: 4C 8D 85 F8 FE FF FF - lea r8,[rbp-00000108]
"Tutorial-x86_64.exe"+2B0AE: 48 C7 C2 FF FF FF FF - mov rdx,FFFFFFFFFFFFFFFF
"Tutorial-x86_64.exe"+2B0B5: 48 63 C9 - movsxd rcx,ecx
"Tutorial-x86_64.exe"+2B0B8: E8 E3 AE FD FF - call Tutorial-x86_64.exe+5FA0
"Tutorial-x86_64.exe"+2B0BD: 45 31 C0 - xor r8d,r8d
"Tutorial-x86_64.exe"+2B0C0: 48 8D 95 F8 FE FF FF - lea rdx,[rbp-00000108]
} |
and here's the script for mem allocation
| Code: | [ENABLE]
alloc(Base,$1000)
registersymbol(Base)
Base:
db DE AD C0 DE
[DISABLE]
Base:
db 00 00 00 00
unregistersymbol(Base)
dealloc(Base) |
please tell me if something is wrong with my script.
| Description: |
|
| Filesize: |
82.34 KB |
| Viewed: |
1315 Time(s) |

|
| Description: |
|
| Filesize: |
78.72 KB |
| Viewed: |
1315 Time(s) |

|
|
|
| Back to top |
|
 |
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25823 Location: The netherlands
|
Posted: Wed Apr 15, 2020 1:10 am Post subject: |
|
|
you're not providing the 3th alloc parameter so the jmp is going to be 14 bytes
either adjust your code to take into account that it will eat 14 bytes, or allocate closer so a 5 byte jmp will suffice by providing a prefered allocation region
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
| Back to top |
|
 |
OldCheatEngineUser Whateven rank
Reputation: 20
Joined: 01 Feb 2016 Posts: 1586
|
Posted: Wed Apr 15, 2020 3:16 am Post subject: |
|
|
well, im not sure what kind of fancy thing you trying to do.
but you have allocated a memory and assigned "base" as a reference to that memory, and in your main script instead of jumping from tutorial code to modifed code you did a jump to an empty memory.
which base+20, base+20 is interpreted as "base" the registered symbol to another memory thats allocated by your second script + offset 20.
but its so stupid to allocate 4kb from another script to have the bytes deadc0de.
_________________
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 |
|
 |
|
|
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
|
|