Advertisement
allen343434

Untitled

Mar 22nd, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. void CTools::Bypass()
  2. {
  3. if (!Tools.initialize)
  4. {
  5. BYTE * pGAKS = reinterpret_cast<BYTE*>(GetAsyncKeyState);
  6. BYTE Orig[10];
  7. memcpy(Orig, pGAKS, 10);
  8.  
  9. bool bChanged = false;
  10.  
  11. while (!bChanged)
  12. {
  13. for (UINT i = 0; i != 10; ++i)
  14. if (pGAKS[i] != Orig[i])
  15. bChanged = true;
  16. Sleep(100);
  17. }
  18.  
  19. DWORD dwOld = 0;
  20. VirtualProtect(pGAKS, 10, PAGE_EXECUTE_READWRITE, &dwOld);
  21. memcpy(pGAKS, Orig, 10);
  22. VirtualProtect(pGAKS, 10, dwOld, &dwOld);
  23. Tools.initialize = 1;
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement