 |
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Endog4 How do I cheat?
Reputation: 0
Joined: 21 Apr 2020 Posts: 7
|
Posted: Tue Apr 21, 2020 11:19 pm Post subject: Rimworld Crash |
|
|
Hi there, i make this code in Rimworld that will multiply item you put to stock pile.
It work, but every 30 minute or so the game just crash.
here's my code:
Code: | aobscan(INJECT,41 03 C6 41 89 47 58) // should be unique
alloc(newmem,$1000,1C2BA090506)
label(code)
label(return)
newmem:
shl r14d,2
code:
add eax,r14d
mov [r15+58],eax
movsxd rax,dword ptr[rdi+58]
sub eax,r14d
mov [rdi+58],eax
jmp return
//mov rcx,r15
//lea rbp,[rbp+00]
INJECT:
jmp newmem
nop 2
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 41 03 C6 41 89 47 58 48 63 47 58 41 2B C6 89 47 58
unregistersymbol(INJECT)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: 1C2BA090506
1C2BA0904DC: F2 0F 5A C0 - cvtsd2ss xmm0,xmm0
1C2BA0904E0: 48 8D 64 24 00 - lea rsp,[rsp+00]
1C2BA0904E5: 90 - nop
1C2BA0904E6: 49 BB 80 B6 05 BA C2 01 00 00 - mov r11,000001C2BA05B680
1C2BA0904F0: 41 FF D3 - call r11
1C2BA0904F3: 48 8B D0 - mov rdx,rax
1C2BA0904F6: 49 8B CF - mov rcx,r15
1C2BA0904F9: 49 8B 07 - mov rax,[r15]
1C2BA0904FC: FF 90 B8 02 00 00 - call qword ptr [rax+000002B8]
1C2BA090502: 49 63 47 58 - movsxd rax,dword ptr [r15+58]
// ---------- INJECTING HERE ----------
1C2BA090506: 41 03 C6 - add eax,r14d
1C2BA090509: 41 89 47 58 - mov [r15+58],eax
// ---------- DONE INJECTING ----------
1C2BA09050D: 48 63 47 58 - movsxd rax,dword ptr [rdi+58]
1C2BA090511: 41 2B C6 - sub eax,r14d
1C2BA090514: 89 47 58 - mov [rdi+58],eax
1C2BA090517: 49 8B CF - mov rcx,r15
1C2BA09051A: 48 8D 6D 00 - lea rbp,[rbp+00]
1C2BA09051E: 49 BB D0 06 09 BA C2 01 00 00 - mov r11,000001C2BA0906D0
1C2BA090528: 41 FF D3 - call r11
1C2BA09052B: 49 8B CF - mov rcx,r15
1C2BA09052E: 49 BB 30 07 07 BA C2 01 00 00 - mov r11,000001C2BA070730
1C2BA090538: 41 FF D3 - call r11
}
|
I add mov movsxd rax,dword ptr [rdi+58],sub eax,r14d,etc cus everytime i active the code some line below it were gone
oh an when i active it, it make pop rax command below it too
could anyone help me to fix the crash?
Description: |
|
Filesize: |
42.79 KB |
Viewed: |
2132 Time(s) |

|
|
|
Back to top |
|
 |
ParkourPenguin I post too much
Reputation: 152
Joined: 06 Jul 2014 Posts: 4697
|
Posted: Wed Apr 22, 2020 11:09 am Post subject: |
|
|
Replace "alloc(newmem,$1000,1C2BA090506)" w/ "alloc(newmem,$1000,INJECT)".
Get rid of the last 3 original instructions (movsxd/sub/mov) as they shouldn't be overwritten.
I doubt this is the problem, but you should do it anyway: check if "mov [r15+58],eax" accesses any other addresses (right click in disassembler). Leave it running and play the game for a while.
_________________
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
|
|