 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
livetorise How do I cheat?
Reputation: 0
Joined: 20 Apr 2020 Posts: 1
|
Posted: Mon Apr 20, 2020 12:56 pm Post subject: Game Crashes Upon Script Toggle Off. |
|
|
Hi there, new to this entire scene. Judging by my issue it has something to do with me not re entering the application/memory correctly. Sorry I am quite a beginner, literally started last night. I've been up for about 24 hours now, and I think either I am just too tired to see what I am missing or something.
Here is the entire code
Code: |
{ Game : 64.exe
Version:
Date : 2020-04-20
Author : me
This script does blah blah blah
}
[ENABLE]
//aobscanmodule(INJECT,-64.exe,0F 28 70 30 48 8D 47 40 66) // should be unique
define(INJECT,64.exe+13560CF)
registersymbol(INJECT)
alloc(newmem,$1000)
registersymbol(newmem)
define(zAxis,newmem+100)
registersymbol(zAxis)
label(return)
alloc(zAxis,8)
zAxis:
dd 0
newmem:
//push rcx
//mov rcx,zAxis
//mov [rcx],rax
//pop rcx
//mov [zAxis],rax
movaps xmm6,[rax+30]
lea rax,[rdi+40]
jmp return
INJECT:
jmp newmem
nop
return:
[DISABLE]
INJECT:
db 0F 28 70 30 48 8D 47 40
unregistersymbol(INJECT)
unregistersymbol(newmem)
unregistersymbol(zAxis)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: "-64.exe"+13560CF
"-64.exe"+13560A9: 48 8B 46 10 - mov rax,[rsi+10]
"-64.exe"+13560AD: 48 8D 54 24 40 - lea rdx,[rsp+40]
"-64.exe"+13560B2: 48 8B 3E - mov rdi,[rsi]
"-64.exe"+13560B5: B9 01 00 00 00 - mov ecx,00000001
"-64.exe"+13560BA: 4D 8B 3E - mov r15,[r14]
"-64.exe"+13560BD: 48 2B D7 - sub rdx,rdi
"-64.exe"+13560C0: 49 8B 5E 10 - mov rbx,[r14+10]
"-64.exe"+13560C4: 0F 28 18 - movaps xmm3,[rax]
"-64.exe"+13560C7: 0F 28 60 10 - movaps xmm4,[rax+10]
"-64.exe"+13560CB: 0F 28 68 20 - movaps xmm5,[rax+20]
// ---------- INJECTING HERE ----------
"-64.exe"+13560CF: 0F 28 70 30 - movaps xmm6,[rax+30]
"-64.exe"+13560D3: 48 8D 47 40 - lea rax,[rdi+40]
// ---------- DONE INJECTING ----------
"-64.exe"+13560D7: 66 0F 1F 84 00 00 00 00 00 - nop [rax+rax+00000000]
"-64.exe"+13560E0: 0F 28 08 - movaps xmm1,[rax]
"-64.exe"+13560E3: 0F 28 D1 - movaps xmm2,xmm1
"-64.exe"+13560E6: 0F 28 C1 - movaps xmm0,xmm1
"-64.exe"+13560E9: 0F C6 D1 55 - shufps xmm2,xmm1,55
"-64.exe"+13560ED: 0F C6 C1 00 - shufps xmm0,xmm1,00
"-64.exe"+13560F1: 0F 59 D4 - mulps xmm2,xmm4
"-64.exe"+13560F4: 0F 59 C3 - mulps xmm0,xmm3
"-64.exe"+13560F7: 0F C6 C9 AA - shufps xmm1,xmm1,-56
"-64.exe"+13560FB: 0F 59 CD - mulps xmm1,xmm5
}
|
What is odd, is even if I replace the "new code" with the same code. It will still crash the game upon toggling the script on and then off. The code I have above works fine for my pointers, and toggles on with no issues and doesn't crash the game.
But the instant I try to stop it. It just dies :/. So at this point i'm hoping someone can show me where my mistake is.
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4697
|
Posted: Mon Apr 20, 2020 1:43 pm Post subject: |
|
|
Add a third parameter w/ the argument INJECT to all alloc calls. i.e.
Code: | alloc(newmem,$1000,INJECT) |
In fact, since that's in a module, the template's default instantiation (w/ argument "-64.exe"+13560CF) should've been fine. Why did you remove it? Don't just remove stuff if you don't know what it does.
Also, the define call is in the enable section but not the disable section. Disabling the script shouldn't work (move define above [ENABLE]; see full injection template).
Then again, enabling the script shouldn't work since the registersymbol call should fail, but whatever.
_________________
I don't know where I'm going, but I'll figure it out when I get there. |
|
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
|
|