Skip to content

Instantly share code, notes, and snippets.

while (TRUE)
{
CLIENT_ID cid;
PVOID pThread;
PsCreateSystemThread(&hThread, 0L, NULL, NULL, &cid,
(PKSTART_ROUTINE)UnhookInt2E, NULL);
if (hThread)
{
PsLookupThreadByThreadId(cid.UniqueThread, (PETHREAD *)&pThread);
void Hook()
{
while (TRUE)
{
PsCreateSystemThread(&hThread, (ACCESS_MASK)0L, NULL, NULL, NULL,
(PKSTART_ROUTINE)HookInt2E, NULL);
KeWaitForSingleObject(&syncEvent, Executive, KernelMode, FALSE, NULL);
if (nIDTHooked == nProcessors)
break;
}