aboutsummaryrefslogtreecommitdiff
path: root/KMemDriver/Crypto.h
diff options
context:
space:
mode:
Diffstat (limited to 'KMemDriver/Crypto.h')
-rw-r--r--KMemDriver/Crypto.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/KMemDriver/Crypto.h b/KMemDriver/Crypto.h
index 09413aa..2d81b3d 100644
--- a/KMemDriver/Crypto.h
+++ b/KMemDriver/Crypto.h
@@ -2,11 +2,16 @@
#include <ntddk.h>
-void crypt_fn(void);
+extern PVOID getNextRIP(void);
+
+void CryptoInit(PVOID fn, ...);
+void CryptoDo(PVOID fn);
+
+#define CRYPTO_FNPTR(fn) ((PVOID)fn)
#define CRYPT_PROLOGUE() \
do { \
- crypt_fn(); \
+ CryptoDo(getNextRIP()); \
volatile UINT64 index_and_marker = { 0x11111111C0DEC0DE }; \
UNREFERENCED_PARAMETER(index_and_marker); \
} while (0)
@@ -14,5 +19,5 @@ void crypt_fn(void);
do { \
volatile UINT32 marker = 0xDEADDEAD;\
UNREFERENCED_PARAMETER(marker); \
- crypt_fn(); \
+ CryptoDo(getNextRIP()); \
} while (0) \ No newline at end of file