Guest User

Untitled

a guest
Jun 18th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #if (NTDDI_VERSION >= NTDDI_VISTA)
  2. extern NTSYSAPI volatile CCHAR KeNumberProcessors;
  3. #elif (NTDDI_VERSION >= NTDDI_WINXP)
  4. extern NTSYSAPI CCHAR KeNumberProcessors;
  5. #else
  6. extern PCCHAR KeNumberProcessors;
  7. #endif
  8.  
  9. DWORD_PTR KeNumberProcessors = 0x80564321;
  10. DWORD_PTR dsKeNumberProcessors = (DWORD_PTR)&KeNumberProcessors;
  11. __asm {
  12. push eax
  13. mov eax, dsKeNumberProcessors
  14. mov al, [eax] // only affects AL -> AL := 0x21
  15. cmp al, 0x40
  16. movsx eax, al // completely garbles EAX
  17. pop eax
  18. };
Add Comment
Please, Sign In to add comment