exia69 How do I cheat?
Reputation: 0
Joined: 21 May 2012 Posts: 3
|
Posted: Tue May 22, 2012 6:00 am Post subject: What am I doing wrong here? [Vb.net Multi-level Pointer] |
|
|
Hello,
Im trying to read a value of a multi-level pointer using Vb.net but my result in VB comes out much different than the one in CE. I have tried this same method on other games and it works perfectly but not on THISONLINEGAME. The value is either something negative or 0.
| Code: | Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer
Public phandle As Integer
Public gbaseid As Int32
Public GAMEEXE As String = "tqit"
Private m_hProcess As IntPtr = IntPtr.Zero
Public Function ReadMemANdOffset()
Dim THISONLINEGAMEProcess As Process = Process.GetProcessesByName(GAMEEXE)(0)
Dim THISONLINEGAMEProcessMainIndex As Integer = 0
For i = 0 To THISONLINEGAMEProcess.Modules.Count - 1
If THISONLINEGAMEProcess.Modules.Item(i).ModuleName.ToLower = GAMEEXE Then
THISONLINEGAMEProcessMainIndex = i
Exit For
End If
Next
phandle = THISONLINEGAMEProcess.Handle
gbaseid = THISONLINEGAMEProcess.Modules.Item(THISONLINEGAMEProcessMainIndex).BaseAddress.ToInt32()
Dim OFFSETS As String() = {"00115A00", "58", "484", "124", "710", "528"}
Dim CurMem As Integer = 0
Dim CurAdd As Integer = gbaseid
For i As Integer = 0 To OFFSETS.Length - 1
Dim CurOFFset As Int32 = Int32.Parse(OFFSETS(i), System.Globalization.NumberStyles.HexNumber)
If i = 0 Then
ReadProcessMemory(phandle, CurAdd + CurOFFset, CurMem, 4, 0)
Else
ReadProcessMemory(phandle, CurMem + CurOFFset, CurMem, 4, 0)
End If
Next
Dim FinalResult As Integer = CurMem
Return FinalResult
End Function |
Please advise, im stuck.
|
|
Dark Byte Site Admin
Reputation: 471
Joined: 09 May 2003 Posts: 25848 Location: The netherlands
|
Posted: Tue May 22, 2012 7:43 am Post subject: |
|
|
Did you enable kernelmode memory access or use the virtualpagedir plugin to access the target's memory ?
If so, that might explain why it won't work for your program.
Besides that not really sure, perhaps a typo in one of the offsets ?
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|