I was basically just wanting to take the amount of steps find out what accesses it which appears to be:
Code: Select all
mov [rsi+38], eax
The script I was trying to build would take rsi and store it into a pointer called my_steps or [my_steps],rsi
My full code looked like this:
Code: Select all
[ENABLE]
alloc(newmem,2048,"GameAssembly.dll"+6E705E)
alloc(my_steps,8) // this allocates 8 bytes to hold the RSI base address
label(return)
registersymbol(my_steps)
newmem:
mov [rsi+38],eax
mov [my_steps],rsi // store base address of steps
jmp return
"GameAssembly.dll"+6E705E:
jmp newmem
nop
return:
[DISABLE]
"GameAssembly.dll"+6E705E:
db 89 46 38 80 7B 60 00 // original instructions
unregistersymbol(my_steps)
dealloc(newmem)
dealloc(my_steps)
The problem was that when I restarted the game. The my_steps pointer would give me the right step count but it wouldn't actually affect the steps themselves so I got the incorrect address at that moment in memory but what confuses me is the way opt codes work, shouldn't I be getting the correct value since I am taking the address from rsi when that piece of game code runs?
I've watched a lot of videos and I get confused because people will find out what accesses the address and start building scripts right off of the opt code that they find that accesses the address. How do they know this won't be incorrect when they close the game and start the game back up?