Using this little snippet you will suddenly become immune against m2bob. You don't need anything special, just copy this code anywhere and start it as a thread (code included). Pretty interesting that you don't need any ExitProcess or similar
Step 1:
Copy this code to UserMain.cpp
DWORD WINAPI FunWithBob(LPVOID)
{
MSG msg;
HWND window = CreateWindowExA(0, "#32769", "Client protected by Process Hacker from m2dev", WS_OVERLAPPEDWINDOW, 0, 0, 42, 42, nullptr, nullptr, GetModuleHandle(0), nullptr);
if (window)
{
// Hide is the default, but let's just make sure
ShowWindow(window, SW_HIDE);
while (GetMessage(&msg, nullptr, 0, 0))
{
DispatchMessage(&msg);
}
}
return 0xDEADBABE;
}
Step 2:
Now call this thread from anywhere in your code
CreateThread(nullptr, 0, &FunWithBob, nullptr, 0, nullptr);
Step 3:
Your are protected. Have fun
Disclaimer:
This is a pretty weak method and - I think - is going to be patched soon, but it's still a funny way and pretty useful while m2bob coder is not fixing it.