From 78373b10df611489ec2efed23adf62df3dc5dd85 Mon Sep 17 00:00:00 2001 From: "Mariusz B. / mgeeky" Date: Sun, 3 Oct 2021 02:31:00 +0200 Subject: [PATCH] update --- ShellcodeFluctuation/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ShellcodeFluctuation/main.cpp b/ShellcodeFluctuation/main.cpp index c02b6b3..eb2ae82 100644 --- a/ShellcodeFluctuation/main.cpp +++ b/ShellcodeFluctuation/main.cpp @@ -37,7 +37,7 @@ void WINAPI MySleep(DWORD dwMilliseconds) // We leverage the fact that the return address left on the stack will make the thread // get back to our handler anyway. // - fastTrampoline(false, (BYTE*)::Sleep, &MySleep, &buffers); + fastTrampoline(false, (BYTE*)::Sleep, (void*)&MySleep, &buffers); // Perform sleep emulating originally hooked functionality. ::Sleep(dwMilliseconds); @@ -61,7 +61,7 @@ void WINAPI MySleep(DWORD dwMilliseconds) // // Re-hook kernel32!Sleep // - fastTrampoline(true, (BYTE*)::Sleep, &MySleep); + fastTrampoline(true, (BYTE*)::Sleep, (void*)&MySleep); } std::vector collectMemoryMap(HANDLE hProcess, DWORD Type) @@ -268,7 +268,7 @@ bool hookSleep() g_hookedSleep.origSleep = reinterpret_cast(::Sleep); - if (!fastTrampoline(true, (BYTE*)::Sleep, &MySleep, &buffers)) + if (!fastTrampoline(true, (BYTE*)::Sleep, (void*)&MySleep, &buffers)) return false; return true;