BOOL IsDebuggerPresent_TrapFlag() { __try { __asm { pushfd or word ptr[esp], 0x100 popfd nop } } __except(1) { return FALSE; } return TRUE; }