Example of a working case:
Spoiler
Code: Select all
[ENABLE]
aobscanmodule(MissionTimeA,GE2RB.exe,66 89 86 38 11 17 00) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
label(seeMissionTime)
registersymbol(seeMissionTime)
newmem:
mov [seeMissionTime],esi
code:
mov [esi+00171138],ax
jmp return
seeMissionTime:
MissionTimeA:
jmp newmem
nop 2
return:
registersymbol(MissionTimeA)
[DISABLE]
MissionTimeA:
db 66 89 86 38 11 17 00
unregistersymbol(*)
dealloc(newmem)
Even make this happen just do:
Spoiler
As you can see it works perfectly.
I tried to do something similar in this code:
Spoiler
Code: Select all
[ENABLE]
aobscan(YcoordOnWalkA,45 8B 74 05 00 8B 44 24 40 83 C0 24 41) // should be unique
alloc(newmem,$1000,YcoordOnWalkA)
label(code)
label(return)
newmem:
code:
mov r14d,[r13+rax+00]
jmp return
YcoordOnWalkA:
jmp newmem
return:
registersymbol(YcoordOnWalkA)
[DISABLE]
YcoordOnWalkA:
db 45 8B 74 05 00
unregistersymbol(*)
dealloc(newmem)
Spoiler
Code: Select all
[ENABLE]
aobscan(YcoordOnWalkA,45 8B 74 05 00 8B 44 24 40 83 C0 24 41) // should be unique
alloc(newmem,$1000,YcoordOnWalkA)
label(code)
label(return)
label(seeYcoord)
registersymbol(seeYcoord)
newmem:
mov [seeYcoord],rax //I also tried to replace rax with r13 but it doesn't work
code:
mov r14d,[r13+rax+00]
jmp return
seeYcoord:
YcoordOnWalkA:
jmp newmem
return:
registersymbol(YcoordOnWalkA)
[DISABLE]
YcoordOnWalkA:
db 45 8B 74 05 00
unregistersymbol(*)
dealloc(newmem)
I also tried to create an RBX register:
Spoiler
Code: Select all
[ENABLE]
aobscan(YcoordOnWalkA,45 8B 74 05 00 8B 44 24 40 83 C0 24 41) // should be unique
alloc(newmem,$1000,YcoordOnWalkA)
label(code)
label(return)
label(seeYcoord)
registersymbol(seeYcoord)
newmem:
push rbx
mov rbx,[r13+rax+00]
mov [seeYcoord],rbx
pop rbx
code:
mov r14d,[r13+rax+00]
jmp return
seeYcoord:
YcoordOnWalkA:
jmp newmem
return:
registersymbol(YcoordOnWalkA)
[DISABLE]
YcoordOnWalkA:
db 45 8B 74 05 00
unregistersymbol(*)
dealloc(newmem)
Does anyone have a solution?
The game is for Vita3K emulator.
The strange thing is that something similar works on other emulators like Yuzu.