bool IsSandbox() { BYTE bSandboxConnect[] = { 0xc8, 0x04, 0x00, 0x00 }; bool bRet = true; BYTE *pConnect = (BYTE*)GetProcAddress(LoadLibrary("ws2_32.dll"), "connect"); for(int i = 0; i < sizeof(bSandboxConnect); i++) { if(*(pConnect + i) != bSandboxConnect[i]) { bRet = false; } } return bRet; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { if(IsSandbox()) { return 0; } ....