Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CTools::Bypass()
- {
- if (!Tools.initialize)
- {
- BYTE * pGAKS = reinterpret_cast<BYTE*>(GetAsyncKeyState);
- BYTE Orig[10];
- memcpy(Orig, pGAKS, 10);
- bool bChanged = false;
- while (!bChanged)
- {
- for (UINT i = 0; i != 10; ++i)
- if (pGAKS[i] != Orig[i])
- bChanged = true;
- Sleep(100);
- }
- DWORD dwOld = 0;
- VirtualProtect(pGAKS, 10, PAGE_EXECUTE_READWRITE, &dwOld);
- memcpy(pGAKS, Orig, 10);
- VirtualProtect(pGAKS, 10, dwOld, &dwOld);
- Tools.initialize = 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement