Skip to content

Library Global Memory

Gabriel edited this page Sep 26, 2023 · 3 revisions

Memory

Provides extended memory manipulation methods.

Functions;

  • void Preserve(nint in_location, nint in_length, bool in_isPreservedOnce = true) - preserves an amount of memory at the specified location.
  • void Restore(nint in_location) - restores the preserved memory at the specified location.
  • nint ReadCall(nint in_location) - reads the address to the function being called by a call instruction at the specified location.
  • nint ReadEffectiveAddress(nint in_location) - reads the address being loaded into a register by a lea instruction at the specified location.
  • JumpType ReadJumpOpcode(nint in_location) - reads the known opcode for the branch instruction at the specified location.
  • nint ReadJump(nint in_location) - reads the address to the code being jumped to by a branch instruction at the specified location.
  • void WriteForceJump(nint in_location) - replaces a conditional branch instruction with jmp at the specified location.
  • nint ReadThunk(nint in_location, nint in_offset = 0) - reads the jmp instruction at the address of a call instruction at the specified location.

Types;

  • struct Pointer<T> where T : unmanaged - used for providing unsafe pointer support to generics.
    • Members;
      • T* pData - an unsafe pointer to the unmanaged type.

Clone this wiki locally