I didn't clearly got your question.. Anyways, following piece of asm shows how to detect VM
Code:
XOR EAX, EAX
PUSH OFFSET @@Handler
PUSH DWORD PTR FS:[EAX]
MOV DWORD PTR FS:[EAX], ESP
MOV EAX, 564D5868h
MOV EBX, 3c6cf712h
MOV ECX, 0Ah
MOV DX, 5658h
IN EAX, DX
MOV EAX, True
JMP @@NotHandle
@@Handler:
MOV EAX, [ESP+$C]
MOV TContext(EAX).EIP, OFFSET @@Handled
XOR EAX, EAX
RET
@@Handled:
XOR EAX, EAX
@@NotHandle:
XOR EBX, EBX
POP DWORD PTR FS:[EBX]
ADD ESP, 4
Maybe this method is used in protectors like Themida.
Probably Dwar can give you a more useful answer....