How to read register values at specific instructions in C++ like Cheat Engine does?

724 Views Asked by At

The example of what I mean:

Here I move rcx register value into a _Player symbol. rcx is the address of Player Object.

The address of instructions is for e.g. module.dll+FFFF.

I want to move register value into variable in my external C++ application.

alloc(code, $1000, module.dll+FFFF)

code:
  push rbx
  sub rsp,40
  mov [_Player], rcx
  jmp return

How can I do something similar in C++ if it is possible?

Also if you need more precise information about what I want. Please inform me.

Edit:

The Offsets for Object are always dynamic, they change. But the instructions remain static. In this case, pointer scanning is not possible, because I would need to manually respecify the offsets after each game that point to the player object.

0

There are 0 best solutions below