Skip to content

Read Memory Functions

Jacob Fliss edited this page Jan 25, 2022 · 38 revisions

NOTES

You can substitute "string name" with your actual code and leave "string file" empty.

EXAMPLES

float current_hp = MemLib.readFloat("gamedll_x64_rwdi.dll+0x007F94E8,0x18,0x18,0xF0,0xB0,0x6BC");
MessageBox.Show("My current HP is: " + current_hp.ToString()); //popup msg with 226.9341431
float current_hp = MemLib.readFloat("health", Environment.CurrentDirectory + @"\codes.ini"); //make a codes.ini file
MessageBox.Show("My current HP is: " + current_hp.ToString()); //popup msg with 226.9341431


double readDouble(string code, string file = "", bool round = true)

  • Read a double value. round = Round the value to 2 decimal places

long readLong(string code, string file = "")

  • Read a long value. Used for 64 bit long values.

float readFloat(string code, string file = "")

  • Read a float value. This can be a decimal or double too.

float readPFloat(UIntPtr address, string code, string file = "")

  • Read a float value from a pointer to the next offset value. Good for reading specific locations from a function within the program's process.

string readString(string code, string file = "", int length = 32, bool zeroTerminated = true)

  • Read a string value. You can optionally define the string length, and read to the nearest null char.

string readPString(UIntPtr address, string code, string file = "")

  • Read a string value from a pointer to the next offset value. Good for reading specific locations from a function within the program's process.

int readInt(string code, string file = "")

  • Read an integer value.

int readPInt(UIntPtr address, string code, string file = "")

  • Read an integer value from a pointer to the next offset value. Good for reading specific locations from a function within the program's process.

int readIntMove(string code, int moveQty, string file = "")

  • Read integer value, and move a specific quantity to the right. Good for reading arrays. Use this within a loop statement.

Example of an int: –2147483648 to 2147483647

uint readUInt(string code, string file = "")

  • Read a UInteger value.

ulong readUIntMove(string code, int moveQty, string file = "")

  • Read Uinteger value, and move a specific quantity to the right. Good for reading arrays. Use this within a loop statement.

Example of a uint: 0 to 4294967295

int read2ByteMove(string code, int moveQty, string file = "")

  • Read a 2 byte value, and move a specific quantity to the right. Good for reading arrays. Use this within a loop statement.

int read2Byte(string code, string file = "")

  • Read a 2 byte value.

int readByte(string code, string file = "")

  • Read a 1 byte value.

int readPByte(UIntPtr address, string code, string file = "")

  • Read a 1 byte value from a pointer to the next offset value. Good for reading specific locations from a function within the program's process.

int readUIntPtr(UIntPtr code)

  • Read an integer value from a pointer that is not stored in a file.

void BindToUI(string address, Action UIObject, string file = "")

  • Read address in new thread loop, update UI with memory value.
  • Ex: BindToUI("0x12345678,0x02,0x05", v => this.Invoke((MethodInvoker) delegate { name_label.Text = v; }));

T ReadMemory<T>(string address, string file = "")

  • Generic method for reading memory values.
  • Ex: ReadMemory<string>("0x12345678,0x02,0x05"); // read a string address

AoB Scanning (Array of Byte)