- UID
- 2
注册时间2004-12-1
阅读权限255
最后登录1970-1-1
总坛主
TA的每日心情 | 开心 2024-12-1 11:04 |
---|
签到天数: 12 天 [LV.3]偶尔看看II
|
- bool IsInsideVMWare_()
- {
- bool r;
- _asm
- {
- push edx
- push ecx
- push ebx
- mov eax, 'VMXh'
- mov ebx, 0 // any value but MAGIC VALUE
- mov ecx, 10 // get VMWare version
- mov edx, 'VX' // port number
- in eax, dx // read port
- // on return EAX returns the VERSION
- cmp ebx, 'VMXh' // is it a reply from VMWare?
- setz [r] // set return value
- pop ebx
- pop ecx
- pop edx
- }
- return r;
- }
- bool FV_VMWare_VMX()
- {
- __try
- {
- return IsInsideVMWare_();
- }
- __except(1) // 1 = EXCEPTION_EXECUTE_HANDLER
- {
- return false;
- }
- }
复制代码- 00401000 /$ 51 PUSH ECX ; 1.004070C0
- 00401001 |. 53 PUSH EBX
- 00401002 |. 52 PUSH EDX
- 00401003 |. 51 PUSH ECX
- 00401004 |. 53 PUSH EBX
- 00401005 |. B8 68584D56 MOV EAX, 0x564D5868
- 0040100A |. BB 00000000 MOV EBX, 0x0
- 0040100F |. B9 0A000000 MOV ECX, 0xA
- 00401014 |. BA 58560000 MOV EDX, 0x5658
- 00401019 |. ED IN EAX, DX
- 0040101A |. 81FB 68584D56 CMP EBX, 0x564D5868
- 00401020 |. 0F944424 13 SETE BYTE PTR SS:[ESP+0x13]
- 00401025 |. 5B POP EBX
- 00401026 |. 59 POP ECX
- 00401027 |. 5A POP EDX
- 00401028 |. 8A4424 07 MOV AL, BYTE PTR SS:[ESP+0x7]
- 0040102C |. 5B POP EBX
- 0040102D |. 59 POP ECX
- 0040102E \. C3 RETN
复制代码
|
评分
-
查看全部评分
|