diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-04-04 18:50:37 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-04-04 18:50:37 +0100 |
| commit | 0569b9c30099be32f5e0d3b56a050059b9e5a8c1 (patch) | |
| tree | 764c242207dbb69a0c67946bde6fa94e0fbcccb6 /src/plugins/HookSystem.hpp | |
| parent | cba9c5ff953dca27de8b56f305577747286ecc41 (diff) | |
hooksystem: manually map trampoline addresses
better patching of rip calls as we are close enough to just change them up
Diffstat (limited to 'src/plugins/HookSystem.hpp')
| -rw-r--r-- | src/plugins/HookSystem.hpp | 15 |
1 files changed, 14 insertions, 1 deletions
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 <vector> #include <memory> -#define HANDLE void* +#define HANDLE void* +#define HOOK_TRAMPOLINE_MAX_SIZE 64 class CFunctionHook { public: @@ -60,6 +61,18 @@ class CHookSystem { private: std::vector<std::unique_ptr<CFunctionHook>> m_vHooks; + + uint64_t getAddressForTrampo(); + + struct SAllocatedPage { + uint64_t addr = 0; + uint64_t len = 0; + uint64_t used = 0; + }; + + std::vector<SAllocatedPage> pages; + + friend class CFunctionHook; }; inline std::unique_ptr<CHookSystem> g_pFunctionHookSystem;
\ No newline at end of file |
