=====================================================================
Code: Select all
[ENABLE]
aobscanmodule(INJECT,Valkyria4_x64.exe,48 8B 40 08 8B 40 3C) //Valkyria4_x64.exe+6EA9AB4
alloc(newmem,$1000,INJECT)
label(code)
label(return)
label(_Player)
registersymbol(_Player)
newmem:
mov [_Player],rax //<================= here
code:
mov rax,[rax+08]
mov eax,[rax+3C]
jmp return
_Player:
INJECT:
jmp newmem
nop
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 48 8B 40 08 8B 40 3C
unregistersymbol(_Player)
unregistersymbol(INJECT)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: "Valkyria4_x64.exe"+6EA9AB4
"Valkyria4_x64.exe"+6EA9A8C: 68 0F 1F 00 48 - push 48001F0F
"Valkyria4_x64.exe"+6EA9A91: 8B 05 B1 03 50 FA - mov eax,[Valkyria4_x64.exe+13A9E48]
"Valkyria4_x64.exe"+6EA9A97: 48 85 C0 - test rax,rax
"Valkyria4_x64.exe"+6EA9A9A: 74 20 - je Valkyria4_x64.exe+6EA9ABC
"Valkyria4_x64.exe"+6EA9A9C: 48 8B 88 00 04 00 00 - mov rcx,[rax+00000400]
"Valkyria4_x64.exe"+6EA9AA3: 48 85 C9 - test rcx,rcx
"Valkyria4_x64.exe"+6EA9AA6: 74 14 - je Valkyria4_x64.exe+6EA9ABC
"Valkyria4_x64.exe"+6EA9AA8: 48 8B 81 88 03 00 00 - mov rax,[rcx+00000388]
"Valkyria4_x64.exe"+6EA9AAF: 48 85 C0 - test rax,rax
"Valkyria4_x64.exe"+6EA9AB2: 74 08 - je Valkyria4_x64.exe+6EA9ABC
// ---------- INJECTING HERE ----------
"Valkyria4_x64.exe"+6EA9AB4: 48 8B 40 08 - mov rax,[rax+08]
"Valkyria4_x64.exe"+6EA9AB8: 8B 40 3C - mov eax,[rax+3C]
// ---------- DONE INJECTING ----------
"Valkyria4_x64.exe"+6EA9ABB: C3 - ret
"Valkyria4_x64.exe"+6EA9ABC: 83 C8 FF - or eax,-01
"Valkyria4_x64.exe"+6EA9ABF: C3 - ret
"Valkyria4_x64.exe"+6EA9AC0: 89 C8 - mov eax,ecx
"Valkyria4_x64.exe"+6EA9AC2: F7 D0 - not eax
"Valkyria4_x64.exe"+6EA9AC4: 41 23 45 00 - and eax,[r13+00]
"Valkyria4_x64.exe"+6EA9AC8: 41 33 4D 00 - xor ecx,[r13+00]
"Valkyria4_x64.exe"+6EA9ACC: D1 E0 - shl eax,1
"Valkyria4_x64.exe"+6EA9ACE: 48 8D A4 24 F8 FF FF FF - lea rsp,[rsp-00000008]
"Valkyria4_x64.exe"+6EA9AD6: 29 C1 - sub ecx,eax
}
Code: Select all
mov [_Player],rax //<================= here
how the opcode should i write if i want:
Code: Select all
newmem:
mov [_Player],rax
mov [rax+08], #1 //<================= no problem here
mov [rax]+8+0C, #99 //<================= i want to change here
code:
mov rax,[rax+08]
mov eax,[rax+3C]
jmp return