The heap idea turned out less than spectacular; if you want to check the number of heaps:
Code:
GetProcessHeaps( 0, 0 );
In the loaded application, it can be implemented like so:
Code:
#include "Fury.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd )
{
if( CheckModules( ) == 0 &&
EnumerateForBadThreads( ) > 0 &&
CheckAPI_Hook( ) == FALSE &&
GetProcessHeaps( 0, 0 ) == 4 )
MessageBox( 0, "Nothing evil detected.", "Success?", MB_OK );
else
MessageBox( 0, "Bad module, thread, heap count, or API function!", "Fatal Error", MB_OK );
return( 0 );
}
Enjoy.