From 0a5e2cc020c6db853eaec85447d144da5a06ae1a Mon Sep 17 00:00:00 2001 From: donnaskiez Date: Thu, 18 Jul 2024 21:34:52 +1000 Subject: [PATCH] change index to unsigned vals --- driver/callbacks.c | 6 +++--- driver/driver.c | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/driver/callbacks.c b/driver/callbacks.c index a5314f8..3038d95 100644 --- a/driver/callbacks.c +++ b/driver/callbacks.c @@ -256,7 +256,7 @@ ImageLoadInsertNonSystemImageIntoProcessHashmap(_In_ PIMAGE_INFO ImageInfo, _In_opt_ PUNICODE_STRING FullImageName) { - UINT32 index = 0; + INT32 index = 0; NTSTATUS status = STATUS_UNSUCCESSFUL; PEPROCESS process = NULL; PRTL_HASHMAP map = GetProcessHashmap(); @@ -440,7 +440,7 @@ VOID FindOurUserModeModuleEntry(_In_ PROCESS_MODULE_CALLBACK Callback, _In_opt_ PVOID Context) { - UINT32 index = 0; + INT32 index = 0; PRTL_HASHMAP map = GetProcessHashmap(); PPROCESS_LIST_ENTRY entry = NULL; PACTIVE_SESSION session = GetActiveSession(); @@ -637,7 +637,7 @@ ProcessCreateNotifyRoutine(_In_ HANDLE ParentId, _In_ HANDLE ProcessId, _In_ BOOLEAN Create) { - UINT32 index = 0; + INT32 index = 0; PKPROCESS parent = NULL; PKPROCESS process = NULL; PDRIVER_LIST_HEAD driver_list = GetDriverList(); diff --git a/driver/driver.c b/driver/driver.c index d28b94c..5267b0d 100644 --- a/driver/driver.c +++ b/driver/driver.c @@ -132,6 +132,9 @@ UINT64 g_DeviceExtensionKey; */ PDRIVER_CONFIG g_DriverConfig = NULL; +/* Its not ideal that this isnt inlined, but it causes errors with the + * decryption process and subsequently causes deadlocks / invalid pointer errors + * etc. Will need to look into it.*/ DECLSPEC_NOINLINE PDRIVER_CONFIG GetDecryptedDriverConfig()