Jump to content

Reading memory pointer


Recommended Posts

I would like to read a pointer , the adress is game.exe+0046A578 and it has a offset of 2EC. I used the MemoryGetBaseAddressUDF to get the adress of game.exe.

But the problem is the offset :P

$finalADDR = "0x" & Hex($baseADDR + $StaticOffset)

ow can i add the offset here ?

#include<NomadMemory.au3>
#include<MemoryGetBaseAddressUDF.au3>
$iv_Pid = WinGetProcess(WinGetTitle("**"))
$iv_DesiredAccess =0x1F0FFF
$iv_InheritHandle = 1
$sv_Type = "dword"
$OpenProccess = _MemoryOpen($iv_Pid)
$StaticOffset= Dec("0046A578")
$baseADDR=_MemoryGetBaseAddress($OpenProccess, 1)
$finalADDR = "0x" & Hex($baseADDR + $StaticOffset)
$Read =  _MemoryRead($finalADDR,$OpenProccess,$sv_Type)
MsgBox(0,"",$finalADDR)
_MemoryClose($OpenProccess)
Link to comment
Share on other sites

Try with my _MemoryModuleGetBaseAddress:

#include <NomadMemory.au3>
#include <MemoryModuleGetBaseAddressUDF.au3>
Dim $iPID = WinGetProcess(WinGetTitle("**"))
Dim $hMem = _MemoryOpen($iPID)
Dim $baseAddr = _MemoryModuleGetBaseAddress($iPID, "whatever.exe") + 0x46A578
Dim $aOffset[1]
$aOffset[0] = 0x2EC
Dim $Read = _MemoryPointerRead($baseAddr, $hMem, $aOffset, "dword")
MsgBox(0, "", $Read)
_MemoryClose($hMem)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...