|
|
@@ -40,7 +40,7 @@ uint64_t PolyHook_Hooks::hookRip_relative(void) { |
|
|
|
void PolyHook_Hooks::hookAVX(float num, void* res) { |
|
|
|
g_PolyHook->avx = true; |
|
|
|
|
|
|
|
return trueAVX(num, res); |
|
|
|
trueAVX(num, res); |
|
|
|
} |
|
|
|
|
|
|
|
uint32_t PolyHook_Hooks::hookRDRAND(void) { |
|
|
@@ -62,15 +62,15 @@ uint32_t PolyHook_Hooks::hookTail_recursion(uint32_t x) { |
|
|
|
} |
|
|
|
|
|
|
|
bool PolyHook::hook_all(void) { |
|
|
|
bool ret = hook<decltype(&_small)>(detSmall, &_small, (void*&)trueSmall, &PolyHook_Hooks::hookSmall); |
|
|
|
ret |= hook<decltype(&_branch)>(detBranch, &_branch, (void*&)trueBranch, &PolyHook_Hooks::hookBranch); |
|
|
|
ret |= hook<decltype(&rip_relative)>(detRIPRelative, &rip_relative, (void*&)trueRip_Relative, &PolyHook_Hooks::hookRip_relative); |
|
|
|
bool ret = hook<decltype(&_small)>(detSmall, &_small, trueSmall, &PolyHook_Hooks::hookSmall); |
|
|
|
ret |= hook<decltype(&_branch)>(detBranch, &_branch, trueBranch, &PolyHook_Hooks::hookBranch); |
|
|
|
ret |= hook<decltype(&_rip_relative)>(detRIPRelative, &_rip_relative, trueRip_Relative, &PolyHook_Hooks::hookRip_relative); |
|
|
|
|
|
|
|
ret |= hook<decltype(&_AVX)>(detAVX, &_AVX, (void*&)trueAVX, &PolyHook_Hooks::hookAVX); |
|
|
|
ret |= hook<decltype(&_RDRAND)>(detRDRAND, &_RDRAND, (void*&)trueRDRAND, &PolyHook_Hooks::hookRDRAND); |
|
|
|
ret |= hook<decltype(&_AVX)>(detAVX, &_AVX, trueAVX, &PolyHook_Hooks::hookAVX); |
|
|
|
ret |= hook<decltype(&_RDRAND)>(detRDRAND, &_RDRAND, trueRDRAND, &PolyHook_Hooks::hookRDRAND); |
|
|
|
|
|
|
|
ret |= hook<decltype(&_loop)>(detLoop, &_loop, (void*&)trueLoop, &PolyHook_Hooks::hookLoop); |
|
|
|
ret |= hook<decltype(&_tail_recursion)>(detTailRecursion, &_tail_recursion, (void*&)trueTailRecursion, &PolyHook_Hooks::hookTail_recursion); |
|
|
|
ret |= hook<decltype(&_loop)>(detLoop, &_loop, trueLoop, &PolyHook_Hooks::hookLoop); |
|
|
|
ret |= hook<decltype(&_tail_recursion)>(detTailRecursion, &_tail_recursion, trueTailRecursion, &PolyHook_Hooks::hookTail_recursion); |
|
|
|
|
|
|
|
return ret; |
|
|
|
} |