Guest User

isCpuidAvailable function

a guest
Oct 3rd, 2018
155
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. global _isCpuidAvailable
  2.  
  3. segment .text align=16
  4.  
  5. _isCpuidAvailable:
  6. pushf
  7. pop eax
  8.  
  9. mov edx, eax
  10. xor edx, 0x200000 ; Try to change the 21th bit (ID bit)
  11.  
  12. push edx
  13. popf
  14. pushf
  15. pop eax
  16. push ecx
  17. popf
  18.  
  19. cmp ecx, eax
  20. setne al ; If we can change the ID bit, that means cpuid is available
  21. ret
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×