[Help] Understanding pointers and opt codes in general.
Posted: Sun Apr 13, 2025 5:59 pm
I have been a long time user on fearless evolution and have learned a lot over the years. However, I still am struggling to understand certain pieces of the puzzle when trying to make my own scripts. Here recently I had tried to make a few script for Blue Price for the amount of steps.
I was basically just wanting to take the amount of steps find out what accesses it which appears to be:
eax in this case held the number of steps count and it was putting it into rsi+38 which was my step count address. rsi from my understand contains my base step count address or "player" +38 is the offset to where my step count address was located.
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:
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?
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?