Bypassing Gameguard: Imported functions
Requirements: Reverse Engineering Knowledge.
GetGameGuard? Another GG function that's wrapped.
GGPTR? Location of this function
I just print the functions like this:
these virtual tables are used by the game to operate gameguard.
Code:
void function_list_dump( )
{
dwGameGuardClassBase = GetGameGuard( );
do
{
GGMethodTable = *(PDWORD*)dwGameGuardClassBase;
Sleep(10);
}
while( !GGMethodTable );
while( *(PDWORD)((DWORD)dwGameGuardClassBase + 4) == NULL )
Sleep(10);
do
{
GGMethodTable2 = **(PDWORD**)((DWORD)dwGameGuardClassBase + 4);
}
while( !GGMethodTable2 );
#ifdef LOG_GG
pLog->log("\n-------------\nGG Method Table 1\nsize = %d", dwGetMethodCount(GGMethodTable));
PrintMethodLocations( GGMethodTable );
pLog->log("\n-------------\nGG Method Table 2\nsize = %d", dwGetMethodCount(GGMethodTable2));
PrintMethodLocations( GGMethodTable2 );
ExitProcess(0);
#endif
}
Code:
typedef PVOID (__cdecl* tGetGameGuard)( ); tGetGameGuard GetGameGuard = (tGetGameGuard)GGPTR;
Code:
mov eax, offset off_D25874 retn
Code:
void PrintMethodLocations( PDWORD pdwVMT )
{
DWORD dwIndex = 0;
for ( dwIndex = 0; pdwVMT[ dwIndex ]; dwIndex++ )
{
if ( IsBadCodePtr( ( FARPROC ) pdwVMT[ dwIndex ] ) )
{
break;
}
pLog->log("%i [ 0x%x ]", dwIndex, pdwVMT[dwIndex]);
}
}

pedef int ( __thiscall* tSecMod)(void *ptr);