use exact address for hooking

Before I tried to hook the entry in my iat, which obviously leads to various
dumb failures...
This commit is contained in:
2018-01-08 18:42:35 +01:00
parent bce85be82e
commit f1ec585409
6 changed files with 72 additions and 27 deletions

View File

@@ -3,6 +3,14 @@ class AbstractHookEngine {
private:
const char* name_;
public:
static void* getSmall() { return (void*)(GetProcAddress(LoadLibrary(L"test_cases.dll"), "_small")); }
static void* getBranch() { return (void*)(GetProcAddress(LoadLibrary(L"test_cases.dll"), "_branch")); }
static void* getRipRelative() { return (void*)(GetProcAddress(LoadLibrary(L"test_cases.dll"), "_rip_relative")); }
static void* getAVX() { return (void*)(GetProcAddress(LoadLibrary(L"test_cases.dll"), "_AVX")); }
static void* getRDRAND() { return (void*)(GetProcAddress(LoadLibrary(L"test_cases.dll"), "_RDRAND")); }
static void* getLoop() { return (void*)(GetProcAddress(LoadLibrary(L"test_cases.dll"), "_loop")); }
static void* getTailRecursion() { return (void*)(GetProcAddress(LoadLibrary(L"test_cases.dll"), "_tail_recursion")); }
public:
/* boolean for each hook test case, which are set by the hooks */
struct {