HOOK DETECTADO NOVAMENTE !!!
PELO JEITO ESTÃO DETECTANDO HOOKS NOVAMENTE. AS MINHAS DUAS ESTÃO DANDO DC DENTRO DO JOGO !!!
rhkReset = ( tReset ) DetourCreateType( ( PBYTE )Device[16], ( PBYTE )&hkReset, 16, Detour1 ); rhkPresent = ( tPresent ) DetourCreateType( ( PBYTE )Device[17], ( PBYTE )&hkPresent, 10, Detour1 );
DWORD vTable[2] = {0};
CreateDevice(vTable);
oReset = ( tReset ) DetourCreateType( ( PBYTE )vTable[16], ( PBYTE )&ResetDevice, 16, Detour1 );
oPresent = ( tPresent ) DetourCreateType( ( PBYTE )vTable[17], ( PBYTE )&PresetDevice, 10, Detour1 );
LPVOID DetourCreate( PBYTE pbTargetFunction, PBYTE pbDetourFunction, INT intSize )
{
DWORD dwProtect;
PBYTE pbDetour = ( PBYTE )malloc( intSize + 5 );
VirtualProtect( pbTargetFunction, intSize, PAGE_EXECUTE_READWRITE, &dwProtect );
memcpy( pbDetour, pbTargetFunction, intSize );
pbDetour += intSize;
*( BYTE * ) ( pbDetour + 0 ) = 0xE9;
*( DWORD * )( pbDetour + 1 ) = ( DWORD )( pbTargetFunction + intSize - pbDetour ) - 5;
*( BYTE * ) ( pbTargetFunction + 0 ) = 0xB8;
*( DWORD * )( pbTargetFunction + 1 ) = ( DWORD )( pbDetourFunction );
*( WORD * ) ( pbTargetFunction + 5 ) = 0xE0FF;
for( INT i = 7; i < intSize; i++ )
*( BYTE * )( pbTargetFunction + i ) = 0x90;
VirtualProtect( pbTargetFunction, intSize, dwProtect, &dwProtect );
return ( pbDetour - intSize );
}
DWORD vTable[2] = {0};
CreateDevice(vTable);
oReset = ( tReset ) DetourCreate( ( PBYTE )vTable[16], ( PBYTE )&ResetDevice, ResetSize );
oPresent = ( tPresent ) DetourCreate( ( PBYTE )vTable[17], ( PBYTE )&PresetDevice, PresentSize );

