2023-12-18 02:13:20 -08:00
|
|
|
global ?GetManufacturer@CPU@ehs@@SAXPEAD@Z
|
|
|
|
global ?GetInfoBits@CPU@ehs@@SAIXZ
|
|
|
|
global ?GetFeatureBits_1@CPU@ehs@@SAIXZ
|
|
|
|
global ?GetFeatureBits_2@CPU@ehs@@SAIXZ
|
|
|
|
global ?GetExtFeatureBits_1@CPU@ehs@@SAIXZ
|
|
|
|
global ?GetExtFeatureBits_2@CPU@ehs@@SAKXZ
|
|
|
|
global ?GetExtFeatureBits_3@CPU@ehs@@SAKXZ
|
|
|
|
global ?GetBrand@CPU@ehs@@SAXPEAD@Z
|
2023-12-17 03:29:08 -08:00
|
|
|
|
|
|
|
section .text
|
2023-12-18 02:13:20 -08:00
|
|
|
?GetManufacturer@CPU@ehs@@SAXPEAD@Z:
|
2023-12-17 03:29:08 -08:00
|
|
|
PUSH RBX
|
|
|
|
|
|
|
|
XOR EAX, EAX
|
|
|
|
MOV R8, RCX
|
|
|
|
CPUID
|
|
|
|
|
|
|
|
MOV DWORD [R8], EBX
|
|
|
|
MOV DWORD [R8 + 4], EDX
|
|
|
|
MOV DWORD [R8 + 8], ECX
|
|
|
|
|
|
|
|
POP RBX
|
|
|
|
|
|
|
|
RET
|
|
|
|
|
2023-12-18 02:13:20 -08:00
|
|
|
?GetInfoBits@CPU@ehs@@SAIXZ:
|
2023-12-17 03:29:08 -08:00
|
|
|
PUSH RBX
|
|
|
|
|
|
|
|
MOV EAX, 1
|
|
|
|
CPUID
|
|
|
|
|
|
|
|
POP RBX
|
|
|
|
|
|
|
|
RET
|
|
|
|
|
2023-12-18 02:13:20 -08:00
|
|
|
?GetFeatureBits_1@CPU@ehs@@SAIXZ:
|
2023-12-17 03:29:08 -08:00
|
|
|
PUSH RBX
|
|
|
|
|
|
|
|
MOV EAX, 1
|
|
|
|
CPUID
|
|
|
|
|
|
|
|
MOV EAX, EDX
|
|
|
|
|
|
|
|
POP RBX
|
|
|
|
|
|
|
|
RET
|
|
|
|
|
2023-12-18 02:13:20 -08:00
|
|
|
?GetFeatureBits_2@CPU@ehs@@SAIXZ:
|
2023-12-17 03:29:08 -08:00
|
|
|
PUSH RBX
|
|
|
|
|
|
|
|
MOV EAX, 1
|
|
|
|
CPUID
|
|
|
|
|
|
|
|
MOV EAX, ECX
|
|
|
|
|
|
|
|
POP RBX
|
|
|
|
|
|
|
|
RET
|
|
|
|
|
2023-12-18 02:13:20 -08:00
|
|
|
?GetExtFeatureBits_1@CPU@ehs@@SAIXZ:
|
2023-12-17 03:29:08 -08:00
|
|
|
PUSH RBX
|
|
|
|
|
|
|
|
MOV EAX, 7
|
|
|
|
XOR ECX, ECX
|
|
|
|
CPUID
|
|
|
|
|
|
|
|
MOV EAX, EBX
|
|
|
|
|
|
|
|
POP RBX
|
|
|
|
|
|
|
|
RET
|
|
|
|
|
2023-12-18 02:13:20 -08:00
|
|
|
?GetExtFeatureBits_2@CPU@ehs@@SAKXZ:
|
2023-12-17 03:29:08 -08:00
|
|
|
PUSH RBX
|
|
|
|
|
|
|
|
MOV EAX, 7
|
|
|
|
XOR ECX, ECX
|
|
|
|
CPUID
|
|
|
|
|
|
|
|
MOV EAX, ECX
|
|
|
|
|
|
|
|
POP RBX
|
|
|
|
|
|
|
|
RET
|
|
|
|
|
2023-12-18 02:13:20 -08:00
|
|
|
?GetExtFeatureBits_3@CPU@ehs@@SAKXZ:
|
2023-12-17 03:29:08 -08:00
|
|
|
PUSH RBX
|
|
|
|
|
|
|
|
MOV EAX, 7
|
|
|
|
XOR ECX, ECX
|
|
|
|
CPUID
|
|
|
|
|
|
|
|
MOV EAX, EDX
|
|
|
|
|
|
|
|
POP RBX
|
|
|
|
|
|
|
|
RET
|
|
|
|
|
2023-12-18 02:13:20 -08:00
|
|
|
?GetBrand@CPU@ehs@@SAXPEAD@Z:
|
2023-12-17 03:29:08 -08:00
|
|
|
PUSH RBX
|
|
|
|
|
|
|
|
MOV R8, RCX
|
|
|
|
|
|
|
|
MOV EAX, 80000002h
|
|
|
|
CPUID
|
|
|
|
MOV DWORD [R8], EAX
|
|
|
|
MOV DWORD [R8 + 4], EBX
|
|
|
|
MOV DWORD [R8 + 8], ECX
|
|
|
|
MOV DWORD [R8 + 12], EDX
|
|
|
|
|
|
|
|
MOV EAX, 80000003h
|
|
|
|
CPUID
|
|
|
|
MOV DWORD [R8 + 16], EAX
|
|
|
|
MOV DWORD [R8 + 20], EBX
|
|
|
|
MOV DWORD [R8 + 24], ECX
|
|
|
|
MOV DWORD [R8 + 28], EDX
|
|
|
|
|
|
|
|
MOV EAX, 80000004h
|
|
|
|
CPUID
|
|
|
|
MOV DWORD [R8 + 32], EAX
|
|
|
|
MOV DWORD [R8 + 36], EBX
|
|
|
|
MOV DWORD [R8 + 40], ECX
|
|
|
|
MOV DWORD [R8 + 44], EDX
|
|
|
|
|
|
|
|
POP RBX
|
|
|
|
|
|
|
|
RET
|