DLL Multi-Level pointers

Posts 14 of 4 · Page 1 of 1
DLL Multi-Level pointers
Hi there.

I've been trying to get value out of a multi-level pointer, but failing. The value stored in final address is players health.

Base address: "ac_client.exe" + 110D90
Offsets: 0x0, 0x35C, 0x8, 0xF8

How the pointer looks in CE:

(Attachment below)
And the code itself:
Code:
        DWORD playerModuleBase = GetModuleBase( "ac_client.exe" )
	DWORD playerBaseAddress	= *(DWORD*)(playerModuleBase + 0x110D90);
	DWORD PlayerRealAddress = GetAddressFromPointer( playerBaseAddress,offsets, 3 ); // Ignore the second and third argument as these are not used currently.

	char a[10], b[10];
	sprintf_s( a, sizeof( a ), "%x", (PlayerRealAddress) );
	sprintf_s( b, sizeof( b ), "%x", (playerBaseAddress) );

	OutputDebugString( (LPCSTR)a );
	OutputDebugString( (LPCSTR)b );

DWORD GetModuleBase( char* moduleName )
{
	DWORD moduleBaseAddress	= (DWORD)GetModuleHandle( moduleName );
	return moduleBaseAddress;
 }

DWORD GetAddressFromPointer( DWORD baseAddress, DWORD offsets[], int length )
{
	DWORD tempAddress;
	
	tempAddress = *(DWORD*)( baseAddress + 0x0 );
	tempAddress = *(DWORD*)( tempAddress + 0x35C );
	tempAddress = *(DWORD*)( tempAddress + 0x8 );
	tempAddress = *(DWORD*)( tempAddress + 0xF8 );
	
	return tempAddress;
}

PlayerBaseAddress variable holds the right address (I've checked with CE), but the problem starts with PlayerRealAddress variable.
Problem is fixed, because I was too stupid to convert hex to decimal. When I converted, it displayed correct value.
Quote Originally Posted by exploder2013 View Post
Hi there.

I've been trying to get value out of a multi-level pointer, but failing. The value stored in final address is players health.

Base address: "ac_client.exe" + 110D90
Offsets: 0x0, 0x35C, 0x8, 0xF8

How the pointer looks in CE:

(Attachment below)
And the code itself:
Code:
        DWORD playerModuleBase = GetModuleBase( "ac_client.exe" )
	DWORD playerBaseAddress	= *(DWORD*)(playerModuleBase + 0x110D90);
	DWORD PlayerRealAddress = GetAddressFromPointer( playerBaseAddress,offsets, 3 ); // Ignore the second and third argument as these are not used currently.

	char a[10], b[10];
	sprintf_s( a, sizeof( a ), "%x", (PlayerRealAddress) );
	sprintf_s( b, sizeof( b ), "%x", (playerBaseAddress) );

	OutputDebugString( (LPCSTR)a );
	OutputDebugString( (LPCSTR)b );

DWORD GetModuleBase( char* moduleName )
{
	DWORD moduleBaseAddress	= (DWORD)GetModuleHandle( moduleName );
	return moduleBaseAddress;
 }

DWORD GetAddressFromPointer( DWORD baseAddress, DWORD offsets[], int length )
{
	DWORD tempAddress;
	
	tempAddress = *(DWORD*)( baseAddress + 0x0 );
	tempAddress = *(DWORD*)( tempAddress + 0x35C );
	tempAddress = *(DWORD*)( tempAddress + 0x8 );
	tempAddress = *(DWORD*)( tempAddress + 0xF8 );
	
	return tempAddress;
}

PlayerBaseAddress variable holds the right address (I've checked with CE), but the problem starts with PlayerRealAddress variable.
change this [ "ac_client.exe" + 110D90 ] to a address,it will be single address,such as 10110D90...for example
btw ofs 0x0 is same as no offset,so u dont need offset 0x0
tempAddress = *(DWORD*)( tempAddress + 0xF8 );// here you've read the value of the pointer, not the last address.
Posts 14 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?