Adress Pointers
Hello, i'm here to ask how to track the pointers, im making a trainer, and i want to add a adress(yes i use readwrittingmemory.vb) AND i alredy know the pointer and offset by using CE, can someone help me?

Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As IntPtr, ByVal lpBaseAddress As Integer, ByVal buffer As Byte(), ByVal size As Integer, ByVal lpNumberOfBytesRead As Integer) As Boolean
Function GetPointer(ByVal ProcessName As String, ByVal PointerBase As Object, ByVal Offsets As Integer()) As Integer
'Get the Process and return 0 if not found
Dim P = Process.GetProcessesByName(ProcessName)
If P.Length = 0 Then Return 0
Dim Address = PointerBase
Dim buff(3) As Byte
'Check PointerBase type. String type will be treated as a module for codeshifting.
If PointerBase.GetType Is GetType(String) Then
Dim tmp As String() = PointerBase.ToString.Split(New Char() {"+"c})
'If PointerBase type is String but isn't a module
If tmp.Length = 1 Then
Address = Integer.Parse(tmp(0), System.Globalization.NumberStyles.HexNumber)
Else
'Continue on to loop the modules and get the base+offset
For Each M In P(0).Modules
If M.ModuleName.ToLower = tmp(0).ToLower Then
Address = M.BaseAddress.ToInt32 + Integer.Parse(tmp(1), System.Globalization.NumberStyles.HexNumber)
Exit For
End If
Next
If Address = 0 Then Return 0 'Just incase the module wasn't found.
End If
End If
If Not ReadProcessMemory(P(0).Handle, Address, buff, buff.Length, 0) Then Return 0
Address = BitConverter.ToInt32(buff, 0)
'Loops through the pointer offsets and returns 0 if ReadProcessMemory fails.
For X = 0 To Offsets.Length - 1
If Not ReadProcessMemory(P(0).Handle, Address + Offsets(X), buff, buff.Length, 0) Then Return 0
Address = If(X <> Offsets.Length - 1, BitConverter.ToInt32(buff, 0), Address + Offsets(X))
Next
Return Address
End Function
Dim PointerBase = GetPointer("solitaire", "solitaire.exe+97074", New Integer() {&H2C, &H8})
Dim PointerBase = GetPointer("solitaire", &H507074, New Integer() {&H2C, &H8})
Dim PointerBase = GetPointer("solitaire", "SomeDll.dll+12345", New Integer() {&H10, &H20})
Dim pointerValue As Integer = BitConverter.ToInt32(ReadMemory(pointing_address, size), 0) Dim finalAddy As String = Hex(pointerValue + offset) finalAddy = "&H"+ finalAddy
Dim pointerValue As Integer = BitConverter.ToInt32(ReadMemory(&HB6F5F0, 4), 0) Dim finalAddy As String = Hex(pointerValue + &H540) finalAddy = "&H"+ finalAddy