Why is the game crashing when I use a compare opcode?
Posted: Sat Jul 02, 2022 6:37 pm
I'm creating an injection copy script to check my filtering for Cruelty Squad (Godot engine x64):
What am I doing wrong here? The game should be running business as usual except that a broken code (a link to a useful source regarding moving long hex base address values into a 8 byte symbol would help greatly). I tried using PUSHF and POPF to attempt to preserve the C and Z flags but I don't even know if those are the correct opcodes for a 64-bit compare function. A little help?
Code: Select all
[ENABLE]
aobscanmodule(health,crueltysquad.exe,49 89 41 08 48 8B 5C 24 50)
alloc(newmemh,$30,health)
alloc(pointer,8)
label(injecth)
registersymbol(pointer)
registersymbol(health)
newmemh:
// cmp [rbp+38],00000000000000FE << Crashes the game immediately (I'm planning on adding jne +x but I'm still working on the next opcode)
mov [pointer],r9 << Does nothing but return 0s but I can't use "movq" for some mysterious reason
mov [r9+08],rax << Original opcodes matching the AOB
mov rbx,[rsp+50]
jmp injecth
health:
jmp newmemh
nop 4
injecth:
[DISABLE]
health:
db 49 89 41 08 48 8B 5C 24 50
unregistersymbol(pointer)
unregistersymbol(health)
dealloc(newmemh)
dealloc(pointer)