From 0569b9c30099be32f5e0d3b56a050059b9e5a8c1 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Thu, 4 Apr 2024 18:50:37 +0100 Subject: hooksystem: manually map trampoline addresses better patching of rip calls as we are close enough to just change them up --- src/plugins/HookSystem.hpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/plugins/HookSystem.hpp') diff --git a/src/plugins/HookSystem.hpp b/src/plugins/HookSystem.hpp index 8714ac32..f0a5a11d 100644 --- a/src/plugins/HookSystem.hpp +++ b/src/plugins/HookSystem.hpp @@ -4,7 +4,8 @@ #include #include -#define HANDLE void* +#define HANDLE void* +#define HOOK_TRAMPOLINE_MAX_SIZE 64 class CFunctionHook { public: @@ -60,6 +61,18 @@ class CHookSystem { private: std::vector> m_vHooks; + + uint64_t getAddressForTrampo(); + + struct SAllocatedPage { + uint64_t addr = 0; + uint64_t len = 0; + uint64_t used = 0; + }; + + std::vector pages; + + friend class CFunctionHook; }; inline std::unique_ptr g_pFunctionHookSystem; \ No newline at end of file -- cgit v1.2.3