Offset is a register

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
Navic
What is cheating?
What is cheating?
Posts: 3
Joined: Mon Dec 20, 2021 10:10 am
Reputation: 3

Offset is a register

Post by Navic »

I've been able to replicate how simple "highlighted item" reader scripts function from looking at other people's work. For example this works fine if I use the offset 30 when adding the base address to the table:

Code: Select all

newmem:
  mov [base],rbx
code:
  mov rax,[rbx+30]
  jmp return

base:
  dq 0
But I can't seem to figure out how to handle it when the offset is not a number but a register. The code:

Code: Select all

mov rax,[rcx+rbx]
Any help would be appreciated.

imjustmaxie
Expert Cheater
Expert Cheater
Posts: 287
Joined: Mon Aug 06, 2018 6:00 pm
Reputation: 254

Re: Offset is a register

Post by imjustmaxie »

Navic wrote:
Tue Apr 29, 2025 10:27 pm
I've been able to replicate how simple "highlighted item" reader scripts function from looking at other people's work. For example this works fine if I use the offset 30 when adding the base address to the table:

Code: Select all

newmem:
  mov [base],rbx
code:
  mov rax,[rbx+30]
  jmp return

base:
  dq 0
But I can't seem to figure out how to handle it when the offset is not a number but a register. The code:

Code: Select all

mov rax,[rcx+rbx]
Any help would be appreciated.
My guess is this:
RCX = Base Address
RBX = Offset

RCX+RBX has a value in a form of either a 64-bit memory location, or just some 8 byte value.
RAX stores the value.

You need to set a breakpoint before that instruction and look at which registers probably hold the offset. I assume RBX here is the offset, so look at RBX's value.

Post Reply

Who is online

Users browsing this forum: No registered users