Problem getting base address / pointer read menu

User Tag List

Results 1 to 9 of 9
  1. #1
    wootpeng's Avatar Contributor
    Reputation
    154
    Join Date
    Jun 2008
    Posts
    227
    Thanks G/R
    0/0
    Trade Feedback
    6 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem getting base address / pointer read

    For some reason my base address is always returning 0. Anyone know why?

    Code:
    $Mem_Open = _MemoryOpen(WinGetProcess("Diablo III")) ;must open before you can read address
    $baseAddress = _MemoryGetBaseAddress($Mem_Open, 1)
    
    MsgBox(0,0,$baseAddress)
    
    Local $offset[3]
    $offset[0] = 0
    $offset[1] = Dec("C")
    $offset[2] = Dec("D8")
    
    $staticOffset = Dec("00FC85B0") - Dec($baseAddress)
    $finalAddress = "0x" & Hex(Dec($baseAddress) + $staticOffset)
    $pAddress = _MemoryPointerRead($finalAddress, $Mem_Open, $Offset)

    Problem getting base address / pointer read
  2. #2
    ssknight's Avatar Member CoreCoins Purchaser
    Reputation
    3
    Join Date
    Oct 2007
    Posts
    32
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your static offset needs to be the Base address + the Relative address. You're getting a negative number, no doubt.


    Other than that the disgusting syntax of whatever you're using is making my eyes bleed. Give my suggestion a try however and see where it gets you.

  3. #3
    zdud's Avatar Member
    Reputation
    7
    Join Date
    Aug 2011
    Posts
    38
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ssknight View Post
    Your static offset needs to be the Base address + the Relative address. You're getting a negative number, no doubt.


    Other than that the disgusting syntax of whatever you're using is making my eyes bleed. Give my suggestion a try however and see where it gets you.
    Have you read his question? he said "base address is always returning 0"... I think he is refering to this MsgBox(0,0,$baseAddress)...
    My autoit script had the same problem, don't know why...

  4. #4
    Seyguai's Avatar Member
    Reputation
    4
    Join Date
    Jan 2008
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    ; Return Value(s).:  On Success - Returns the 'allocation Base' address and sets @Error to 0.
    ;                    On Failure - Returns 0 and sets @Error to:
    ;                       |1 = Invalid $ah_Handle.
    ;                       |2 = Failed to find correct allocation address.
    ;                       |3 = Failed to read from the specified process.
    What does your Error flag tell you ?

  5. #5
    wootpeng's Avatar Contributor
    Reputation
    154
    Join Date
    Jun 2008
    Posts
    227
    Thanks G/R
    0/0
    Trade Feedback
    6 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Seyguai View Post
    Code:
    ; Return Value(s).:  On Success - Returns the 'allocation Base' address and sets @Error to 0.
    ;                    On Failure - Returns 0 and sets @Error to:
    ;                       |1 = Invalid $ah_Handle.
    ;                       |2 = Failed to find correct allocation address.
    ;                       |3 = Failed to read from the specified process.
    What does your Error flag tell you ?
    "2 = Failed to find correct allocation address." is the flag.

  6. #6
    wootpeng's Avatar Contributor
    Reputation
    154
    Join Date
    Jun 2008
    Posts
    227
    Thanks G/R
    0/0
    Trade Feedback
    6 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I figured out why the base address was returning 0. This thread solved the issue: Memory UDF - Page 3 - Example Scripts - AutoIt Forums

    Now the problem is I my pointerread value is returning 0. I feel like it still has to do with the base address because if I compare it with cheat engine they are different.
    Last edited by wootpeng; 07-05-2012 at 07:00 PM.

  7. #7
    yourahoe's Avatar Private
    Reputation
    1
    Join Date
    Feb 2011
    Posts
    10
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    here's an example, tare it apart and use it to your advantage..

    you need 2 files,
    one is the infamous Nomadmemory.au3 and the second one is this: [AutoIt] Func _MemoryModuleGetBaseAddress($iPID, $sModule) If Not ProcessExists($iPI - Pastebin.com
    Code:
     #include <NomadMemory.au3>
     #include <memmodulebaddr.au3>
    
            Global $PID
            Global $sModule = "MemoryMan.dll"
            Global $StaticOffset
            Global $openmem
    
            $PID = ProcessExists("Tutorial-i386.exe")
    	$openmem = _MemoryOpen($PID)
    	$StaticOffset = Dec("006903C0") ;base addr (green) was the same both times - this is the correct base addr..
    
    
    Global $Offset1[3]
    $Offset1[0] = 0 ; Is ALWAYS 0.
    $Offset1[1] = Dec("49c") ; 2nd pointr
    $Offset1[2] = Dec("4") ; 1st pointr
    
    	$baseADDR = _MemoryModuleGetBaseAddress($PID, $sModule)
    	$finalADDR = "0x" & Hex($baseADDR + $StaticOffset)
    
    While 1 ;loop
    Sleep(1000)
    
    	$r = _MemoryRead($finaladdr,$openmem)
    	$r = _MemoryRead($r + $Offset1[1],$openmem)
    	$r = _MemoryRead($r + $Offset1[2],$openmem, "float")
    
    	;Base addr instead of $openmem? or not ?
    
    		ToolTip("PID: " & $PID & @CRLF _
    		&	"baseaddr: " & $baseADDR &@CRLF _
    		&	"finaladdr: " & $finalADDR & @CRLF _
    		&	"hp: " & $r & @CRLF _
    		&	"openMem: " & $openmem, 0, 0)
    
    WEnd
    Sleep(1000)
    description;
    reads HP memory on the tutorial of Cheat Engine, step 9.
    Last edited by yourahoe; 07-05-2012 at 08:13 PM.

  8. #8
    Seyguai's Avatar Member
    Reputation
    4
    Join Date
    Jan 2008
    Posts
    6
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The issue with pAddress is what tried to explain ssknight: you did apply some weird formula.
    Code:
    $staticOffset = Dec("00FC85B0") - Dec($baseAddress)
    $finalAddress = "0x" & Hex(Dec($baseAddress) + $staticOffset)
    Or in one line:
    Code:
    $finalAddress = "0x" & Hex(Dec($baseAddress) + Dec("00FC85B0") - Dec($baseAddress))
    Hope you'll see what's wrong here.

  9. #9
    wootpeng's Avatar Contributor
    Reputation
    154
    Join Date
    Jun 2008
    Posts
    227
    Thanks G/R
    0/0
    Trade Feedback
    6 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright, I changed my code to this but am still not receiving a correct address or number. Do I have the formula correct now?

    Code:
    Local $offset[3]
    $offset[0] = 0
    $offset[1] = Dec("C")
    $offset[2] = Dec("D8")
    
    $staticOffset = Dec("00FC85B0")
    $finalAddress = "0x" & Hex(Dec($baseAddress) + $staticOffset)
    MsgBox(0,0,$finalAddress)
    $pAddress = _MemoryPointerRead($finalAddress, $Mem_Open, $offset)
    
    MsgBox(0,0,$pAddress[1])

Similar Threads

  1. Replies: 10
    Last Post: 09-14-2016, 11:54 PM
  2. How to get base address afer injecting DLL?
    By zeion in forum GW2 Memory Editing
    Replies: 0
    Last Post: 08-31-2013, 06:53 PM
  3. Anyone able to get base addresses + pointers etc..
    By b9er in forum Darkfall Online Exploits|Hacks
    Replies: 0
    Last Post: 05-07-2013, 10:49 AM
  4. Multilevel Pointer - getting to base address
    By siriuz in forum WoW Memory Editing
    Replies: 12
    Last Post: 02-07-2013, 06:35 PM
  5. [Bot] Base Address + pointer + offset = 0 :(
    By mrdennis87 in forum WoW Memory Editing
    Replies: 43
    Last Post: 07-19-2012, 10:31 AM
All times are GMT -5. The time now is 04:15 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search