I need to read value from memory of another process with given process name/id, pointer and offset and output it to the user in realtime, I already found another question and successfully implemented logic to read and convert float values from given address of process memory, but since address is changing every time I rejoin the game, I need to calculate it. I have found pointer and process offset using cheat engine:
From what I understood reading theory, final address needs to be calculated using this algorithm:
- Calculate base address (1DC45993300) using constant offset (+02518790)
- Take this address and add pointer value to it
- Repeat 2 step with every pointer value from bottom (5E0) to top (2E4)
- This is the final address that you can use to retreive data
I have no problem with steps 2, 3 and 4: I can sum hex numbers and read process memory at address, but I don't know how to use offset to calculate the first address, how to do this in Go?
Update: I tried code from this question but it returns incorrect base address. I get 7ff611530000 while actual base address in cheat engine is 1A009A6AB70
Update 2: It may be hard to understand what am I trying to do, so I added another picture. I need to find how to make this "plus" operation and how to find address in red square (green can be calculated, purple are constants)