Thread: Adress Pointers

Results 1 to 6 of 6
  1. #1
    Kyoz123's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Chatty

    Exclamation 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?

  2. #2
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Please explain better.
    Last edited by abuckau907; 07-21-2013 at 11:29 PM. Reason: removed
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  3. #3
    Kyoz123's Avatar
    Join Date
    Apr 2012
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Chatty
    Ok, lets see, im trying to make a trainer but the adress always change(yeah pointers and offset) i want to know how to find the new adress and yes i alredy scanned stuff in cheat engine so i know the offsets

  4. #4
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,112
    My Mood
    Angelic
    Quote Originally Posted by Kyoz123 View Post
    Ok, lets see, im trying to make a trainer but the adress always change(yeah pointers and offset) i want to know how to find the new adress and yes i alredy scanned stuff in cheat engine so i know the offsets
    You did a proper Pointer Scan?
    (Closed the game and re-did the pointer scan without closing CE)

    If so, then a pattern scanning would do the trick maybe.
    (It allows you to scan for a pattern of bytes. Also known as AOB (Array of Bytes) Scanner)


    Tho, then you would have to find/make the pattern from the game. (This is also used sometimes, as it allows you to search for arrays, while having unknown bytes in the AOB)


    Example like:
    (My VB coding is horrible. So if you understand it. I'm sure you're able to make something like this
    Dim MyArray As Byte() = TheBytes
    For Each ByTe As Byte In ReadMemory(Starting Address, Size of ByteBlock, ETC)
    If ByTe = MyArray(CurrentIndex) Or MyArray(CurrentIndex) = 0 *The Unknown Value* Then Continue Pattern Search
    ELSE: Stop and start from Index 0.

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  5. #5
    Pingo's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    687
    Reputation
    24
    Thanks
    865
    My Mood
    Blah
    I think he's just asking for multilevel pointers in vb..

    I have no idea what your readwrittingmemory.vb can do since I'v never used it but here is an example.
    The code seems like alot but it covers a few things and can be used separate from your current memory class.

     
    [img]https://i203.photobucke*****m/albums/aa29/Baxter_esa/PointerScreen_zpscaed784c.png[/img]


     
    Code:
        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


    Usage using that pointer in the screenshot..

    Base module
    Code:
    Dim PointerBase = GetPointer("solitaire", "solitaire.exe+97074", New Integer() {&H2C, &H8})
    Normal integer
    Code:
    Dim PointerBase = GetPointer("solitaire", &H507074, New Integer() {&H2C, &H8})
    Module from the collection
    Code:
    Dim PointerBase = GetPointer("solitaire", "SomeDll.dll+12345", New Integer() {&H10, &H20})
    That should cover normal,codeshifting and pointers located in any module including dll's.
    Let us know if you're after something different.

  6. #6
    silentus's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Location
    Nowhere town
    Posts
    54
    Reputation
    10
    Thanks
    578
    My Mood
    Cool
    I think hes just asking how to use pointers, if so then all you need to do is to get the pointer value and add the offset and convert it to hex so you will have proper address.
    I always make it like this however there are easier ways i think:
    Code:
    Dim pointerValue As Integer = BitConverter.ToInt32(ReadMemory(pointing_address, size), 0)
    Dim finalAddy As String = Hex(pointerValue + offset)
    finalAddy = "&H"+ finalAddy
    However i dont know what memory module you are using, and what functions it has but you can easily adjust this to your own.
    The offset has to be in HEX so its like &HA1
    Ill explain this on a example from SA-MP game:
    You got a address CPed +0x540 = [float]
    few lines abowe you got 0xB6F5F0 - Player pointer (CPed) so 0xB6F5F0 is the CPed (pointeR) and 0x540 is the offset (You replace 0x with &H in VB)
    So you just do this like this:
    Code:
    Dim pointerValue As Integer = BitConverter.ToInt32(ReadMemory(&HB6F5F0, 4), 0)
    Dim finalAddy As String = Hex(pointerValue + &H540)
    finalAddy = "&H"+ finalAddy
    and its done, however you will need to write a float value otherwise the health wont be changed properly (float = single in VB)

    Anyways, dont get the pointer value to a string (you see pointerValue is a integer) because it will get the bytes to a string and it will reverse them and split every byte with "-" so you will need to split the string by "-" characters and connect it in reverse order (the bytes arent reversed, but they are in reverse order so if the value is BF64FC then in your app it would show it as FC-64-BF)

Similar Threads

  1. [Help Request] static adresses,pointers?! OMG
    By pipipipu in forum Alliance of Valiant Arms (AVA) Help
    Replies: 2
    Last Post: 05-21-2013, 04:50 AM
  2. [Release] Enemy Player Pointer Adress
    By o-o in forum Combat Arms EU Hack Coding/Source Code
    Replies: 4
    Last Post: 11-24-2010, 05:19 AM
  3. [Help]Finding Adress Pointer...
    By Blubb1337 in forum Visual Basic Programming
    Replies: 1
    Last Post: 02-25-2010, 08:03 AM
  4. Gps Adress
    By 22061988 in forum WarRock - International Hacks
    Replies: 4
    Last Post: 11-19-2006, 10:02 AM
  5. Warrock -> Cheat Engine -> Adresses
    By thiag0 in forum General Game Hacking
    Replies: 6
    Last Post: 10-25-2006, 06:29 AM