Files
anit-cheat/Anit-Cheat_DLL/asm.asm
T
2026-08-24 14:47:59 +08:00

31 lines
676 B
NASM
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
.CODE
Asm_CheckVmWare PROC
mov rax, 0564D5868h ; 魔法值 'VMXh'VMware端口通信固定标识
mov rbx, 0FFFFFFFFh ; RBX初始值,用于接收Hypervisor返回标识
mov rcx, 10 ; 命令号 10 = CMD_GetVersion(获取VMware版本)
mov rdx, 05658h ; VMware专属I/O端口号 0x5658
in eax, dx ; 向VMware端口发起通信请求
cmp rbx, 0564D5868h ; 判断RBX是否被改写为'VMXh'魔法值
jz vm_found ; 相等 = 检测到VMware,跳转
xor al, al ; 未找到,AL置0FALSE
jmp vm_end
vm_found:
mov al, 1 ; 找到VMwareAL置1TRUE
vm_end:
ret
Asm_CheckVmWare ENDP
Asm_VMCall PROC
vmcall
ret
Asm_VMCall ENDP
END