From 859aa0e4e1069a46190b1ca69ef33748cee2f247 Mon Sep 17 00:00:00 2001 From: "Mariusz B. / mgeeky" Date: Fri, 1 Oct 2021 21:34:41 +0200 Subject: [PATCH] update --- ThreadStackSpoofer/main.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ThreadStackSpoofer/main.cpp b/ThreadStackSpoofer/main.cpp index 1eb34d3..c7888fa 100644 --- a/ThreadStackSpoofer/main.cpp +++ b/ThreadStackSpoofer/main.cpp @@ -5,10 +5,8 @@ HookedSleep g_hookedSleep; -void WINAPI MySleep(DWORD _dwMilliseconds) +void WINAPI MySleep(DWORD dwMilliseconds) { - const register DWORD dwMilliseconds = _dwMilliseconds; - // // Locate this stack frame's return address. // @@ -28,10 +26,14 @@ void WINAPI MySleep(DWORD _dwMilliseconds) log("\n===> MySleep(", std::dec, dwMilliseconds, ")\n"); + // // Perform sleep emulating originally hooked functionality. + // ::SleepEx(dwMilliseconds, false); + // // Restore original thread's call stack. + // log("[<] Restoring original return address..."); *overwrite = origReturnAddress; }