SplitScript reference / Module / readRelative32

Module.readRelative32

Method

Module.readRelative32(offset: u64) -> address!

Reads a 32-bit relative address at an offset from this module.

The encoded displacement is resolved relative to the instruction that follows it. Read failures are returned to the caller.

Parameters

  • offset: Byte offset from the module base.

Effects: reads process memory, requires an attached process

Runtime behavior: available while a process is attached, except in onDetach; synchronous

Examples

Resolve a module-relative address

let gameAssembly = await process.module("GameAssembly.dll")
let target = retry gameAssembly.readRelative32(0x400)