Memory

Use at your own risk. These functions give you direct access to the game process's memory: reading, writing, patching, hooking, and calling arbitrary code. Touching regions that FiveM or a server's anti-cheat monitors: or leaving obvious patches in place: can and will get your account banned. Only patch what you understand, and prefer the higher-level Susano APIs whenever they cover your use case.

All functions live under the Susano.Memory table. Addresses are Lua integers (64-bit). Reads return nil on failure, writes return boolean. All memory access is in-process (no WPM/RPM).

Address helpers

  • Scan: IDA-style pattern scan with optional module and RIP-relative resolve.
  • Valid: Check whether an address points to mapped memory.
  • Module: Get the base address of a loaded module.
  • Add: Add two integers: utility for 64-bit pointer arithmetic.
  • GetProc: Get the address of an exported function via manual PE export walk.

Read

Write

Patching

  • Patch: Write raw hex bytes with automatic page-protection handling.
  • Nop: Fill bytes with 0x90 (NOP).

Dynamic call

  • Call: Call any function at an address using the x64 calling convention.

Hooking

  • Hook: Install a MinHook detour with typed argument access.
  • Unhook: Remove a hook by slot ID.

Scratch memory

  • Alloc: Allocate a block of memory in the game process.
  • Free: Free a previously allocated block.