2

I've used Cheat Engine to get an Address and RealAddress for the X coordinate of my player in a game; Sea of Thieves. Unfortunately, the game crashes when I try to find the pointer by methods described online (ie clicking "Find out what access this address"). Since the Address and RealAddress don't seem to change (SoTGame.exe+699FE50 and 7FF6EA32FE50, respectively), is there a way to access the value at this address?

I'd like to use something like ReadWriteMemory (example code from the Git ReadMe w/my adaptations):

from ReadWriteMemory import ReadWriteMemory

rwm = ReadWriteMemory()

process = rwm.get_process_by_name('SoTGame.exe')
process.open()

#health_pointer= process.get_pointer(0x004e4dbc, offsets=[0xf4])
x_pointer = process.get_pointer(0x699FE50)

#health = process.read(health_pointer)
x = process.read(x_pointer)

print({'x': x})

Printing currently returns 0 while cheat engine is showing a very different number.

Optimus
  • 1,354
  • 1
  • 21
  • 40

1 Answers1

0

You want to access the address with offset to the module entry.

Calling get_process_by_name will return the pointer to the process base in memory, but here you want to offset this pointer to the module entry of the process. The 0x699FE50 is your offset from the module entry, 'SoTGame.exe', hence finding and adding your module entry module_base (usually 0x00400000) will result in the correct address in memory.

In your case, get_pointer(module_base + 0x699FE50) should do the trick.

Irad Ohayon
  • 174
  • 6