Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sleep override #1

Open
xackery opened this issue Mar 30, 2022 · 1 comment
Open

Add sleep override #1

xackery opened this issue Mar 30, 2022 · 1 comment

Comments

@xackery
Copy link
Owner

xackery commented Mar 30, 2022

DWORD slpadress = (DWORD)GetProcAddress(hkernel32Mod, "Sleep");
       EzDetour(slpadress, Sleep_detour, Sleep_tramp);
DETOUR_TRAMPOLINE_EMPTY(VOID WINAPI Sleep_tramp(DWORD));

void WINAPI Sleep_detour(DWORD nTime)
{

    if (nTime > 1000)
    {
        Sleep_tramp(500);
        return;
    }

    Sleep_tramp(nTime);
}
@xackery
Copy link
Owner Author

xackery commented Mar 30, 2022

Sleep patch is VERY useful when testing since you tend to camp/LD a lot when testing shit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant