MCPcopy Create free account
hub / github.com/BeneficialCode/WinArk / AntiRootkitUnload

Function AntiRootkitUnload

Anti-Rootkit/ARK.cpp:261–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

259}
260
261void AntiRootkitUnload(_In_ PDRIVER_OBJECT DriverObject) {
262 ExFreePool(g_RegisterPath.Buffer);
263 UNICODE_STRING symLink = RTL_CONSTANT_STRING(L"\\??\\AntiRootkit");
264 // delete symbolic link
265 IoDeleteSymbolicLink(&symLink);
266 IoUnregisterShutdownNotification(g_DeviceObject);
267 // delete device object
268 IoDeleteDevice(DriverObject->DeviceObject);
269 KdPrint(("Driver Unload called\n"));
270 TraceLoggingWrite(g_Provider, "Unload",
271 TraceLoggingLevel(TRACE_LEVEL_INFORMATION),
272 TraceLoggingString("Driver unloading", "Message"));
273 TraceLoggingUnregister(g_Provider);
274}
275
276NTSTATUS CompleteIrp(PIRP Irp, NTSTATUS status = STATUS_SUCCESS, ULONG_PTR info = 0) {
277 Irp->IoStatus.Status = status;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected