1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | loc_100C7730: ; CODE XREF:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov dword ptr [ebp-8], 0
mov dword ptr [ebp-4], 0
call sub_100022BB ;这里看能不能使用cpuid
and eax, 0FFFFh ;指令
test eax, eax
jz short loc_100C775D
xor eax, eax
inc eax
cpuid
mov [ebp-4], edx ;取回cpu特征字
;如果cpu支持 id
;则取回其高32位
loc_100C775D:
mov eax, [ebp-4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
retn
; 哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪?
loc_100C76B0: ; CODE XREF:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor eax, eax
inc eax
shl eax, 1
shl eax, 1
inc eax
shl eax, 1
shl eax, 1
inc eax
pushf
pushf
mov ecx, eax
xor eax, eax
inc eax
shl eax, cl
mov edx, eax
pop eax
push eax
xor eax, edx
push eax
mov eax, edx
inc eax
mov edx, eax
popf
mov ebx, ecx
mov eax, ecx
inc eax
mov ecx, eax
mov eax, edx
shl eax, cl
mov edx, eax
pushf
sub eax, ebx
mov edx, eax
pop eax
pop ebx
xor eax, ebx
jnz short loc_100C76FB
mov dword ptr [ebp-4], 0
jmp short loc_100C7702
; 哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪
loc_100C76FB: ; CODE
mov dword ptr [ebp-4], 1
loc_100C7702: ; CODE
popf
mov ax, [ebp-4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
retn
|