02-07-2014, 06:29 PM
Код:
int __cdecl SleepStub()
{
return 0;
}
void DisableLazyMode(void)
{
BYTE *LazyMode = (BYTE *)GetProcAddress(LoadLibraryA("core.dll"), "?appSleep@@YAXM@Z");
if(!LazyMode)
return;
ULONG oldProtect;
if(!VirtualProtect(LazyMode, 5, PAGE_READWRITE, &oldProtect))
return;
*LazyMode = 0xE9;
*(int*) (LazyMode + 1) = (BYTE*)SleepStub - (LazyMode + 5);
VirtualProtect(LazyMode, 5, oldProtect, &oldProtect);
}