aboutsummaryrefslogtreecommitdiff
path: root/Patcher.h
diff options
context:
space:
mode:
Diffstat (limited to 'Patcher.h')
-rw-r--r--Patcher.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/Patcher.h b/Patcher.h
new file mode 100644
index 0000000..706c9ba
--- /dev/null
+++ b/Patcher.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <Windows.h>
+#include <cstdint>
+
+class Patcher
+{
+public:
+
+ void PatchBytes(BYTE* address, BYTE* shellcode, const int shellCodeSize, bool modifyPageProtection = true, DWORD newPageProtection = PAGE_EXECUTE_READWRITE, bool restorePageProtection = true);
+
+ void NOPBytes(BYTE* address, const int amount, bool modifyPageProtection = true, DWORD newPageProtection = PAGE_EXECUTE_READWRITE, bool restorePageProtection = true);
+
+
+ //TODO: template?
+ void Patch(BYTE* address, int8_t value);
+ void Patch(BYTE* address, int16_t value);
+ void Patch(BYTE* address, int32_t value);
+ void Patch(BYTE* address, int64_t value);
+};