Jump to content

How To Read the names in a game ?


Recommended Posts

Hello Everyone.

How can I use _MemoryRead() to read the player's Chinese names in a game? Thank for Helps.

; Function:   _MemoryRead($iv_Address, $ah_Handle[, $sv_Type])
; Description:  Reads the value located in the memory address specified.
; Parameter(s):  $iv_Address - The memory address you want to read from. It must be in hex
;          format (0x00000000).
;     $ah_Handle - An array containing the Dll handle and the handle of the open
;         process as returned by _MemoryOpen().
;     $sv_Type - (optional) The "Type" of value you intend to read.  This is set to
;        'dword'(32bit(4byte) signed integer) by default.  See the help file
;        for DllStructCreate for all types.
;        An example: If you want to read a word that is 15 characters in
;        length, you would use 'char[16]'.
; Requirement(s): The $ah_Handle returned from _MemoryOpen.
; Return Value(s): On Success - Returns the value located at the specified address.
;     On Failure - Returns 0
;     @Error - 0 = No error.
;        1 = Invalid $ah_Handle.
;        2 = $sv_Type was not a string.
;        3 = $sv_Type is an unknown data type.
;        4 = Failed to allocate the memory needed for the DllStructure.
;        5 = Error allocating memory for $sv_Type.
;        6 = Failed to read from the specified process.
; Author(s):  Nomad
; Note(s):   Values returned are in Decimal format, unless specified as a 'char' type, then
;     they are returned in ASCII format.  Also note that size ('char[size]') for all
;     'char' types should be 1 greater than the actual size.
Func _MemoryRead($iv_Address, $ah_Handle, $sv_Type = 'dword')
 If Not IsArray($ah_Handle) Then
        Return 0
 Local $v_Buffer = DllStructCreate($sv_Type)
 If @Error Then
  SetError(@Error + 1)
  Return 0
 DllCall($ah_Handle[0], 'int', 'ReadProcessMemory', 'int', $ah_Handle[1], 'int', $iv_Address, 'ptr', DllStructGetPtr($v_Buffer), 'int', DllStructGetSize($v_Buffer), 'int', '')
 If Not @Error Then
  Local $v_Value = DllStructGetData($v_Buffer, 1)
  Return $v_Value
        Return 0
Edited by syncon
Link to comment
Share on other sites

Yeah you need to know the Memory address that stores the name you require.

Once you know that address you need to find a static pointer for that address.

Once you know that you need to find the base offset for the static pointer.


Static Pointer = An Address that is always the same, and thats Value + Offset = Address u want. This could be multi level, one i needed recently was 6 lvls, So for example

Pointer One value + 0000000B = Pointer Two

Pointer Two value + 00000860 = Pointer Three

Pointer Three value + 0000AC94 = Pointer Four

Pointer Four value + 0000CC0B = Pointer Five

Pointer Five value + 00000874 = Pointer Six

Pointer Six value + 0000A896 = Address that stores the name u require ( Name will be in Binary so u will need convert binary to text)

Base Offset = The distance from the first Mem address the program uses to the First Pointer.

Anyhow have a look here for some tutorials that helped me out - http://www.mpcforum.com/showthread.php?t=61072

Link to comment
Share on other sites

  • 2 months later...

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

  • Recently Browsing   0 members

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