All pastes #227113 Raw Edit

Mine

public text v1 · immutable
#227113 ·published 2006-10-29 01:26 UTC
rendered paste body
 _cpuid_set_info proc near               ; CODE XREF: _cpu_init+Ep
__text:0019883C                                         ; _i386_vm_init+101p ...
__text:0019883C
__text:0019883C var_F8          = dword ptr -0F8h
__text:0019883C var_F4          = dword ptr -0F4h
__text:0019883C var_F0          = dword ptr -0F0h
__text:0019883C var_E8          = dword ptr -0E8h
__text:0019883C var_E4          = dword ptr -0E4h
__text:0019883C var_E0          = dword ptr -0E0h
__text:0019883C var_DC          = dword ptr -0DCh
__text:0019883C var_D8          = dword ptr -0D8h
__text:0019883C var_D4          = dword ptr -0D4h
__text:0019883C var_D0          = dword ptr -0D0h
__text:0019883C var_CC          = dword ptr -0CCh
__text:0019883C var_C8          = dword ptr -0C8h
__text:0019883C var_C4          = dword ptr -0C4h
__text:0019883C var_C0          = dword ptr -0C0h
__text:0019883C var_BC          = dword ptr -0BCh
__text:0019883C var_B8          = dword ptr -0B8h
__text:0019883C var_B0          = dword ptr -0B0h
__text:0019883C var_AC          = dword ptr -0ACh
__text:0019883C var_A8          = dword ptr -0A8h
__text:0019883C var_98          = dword ptr -98h
__text:0019883C var_38          = dword ptr -38h
__text:0019883C var_34          = dword ptr -34h
__text:0019883C var_30          = dword ptr -30h
__text:0019883C var_2C          = dword ptr -2Ch
__text:0019883C var_28          = dword ptr -28h
__text:0019883C var_24          = dword ptr -24h
__text:0019883C var_20          = dword ptr -20h
__text:0019883C var_1C          = dword ptr -1Ch
__text:0019883C
__text:0019883C                 push    ebp
__text:0019883D                 mov     ebp, esp
__text:0019883F                 push    edi
__text:00198840                 push    esi
__text:00198841                 push    ebx
__text:00198842                 sub     esp, 0ECh
__text:00198848                 mov     [esp+0F8h+var_F4], 0E4h
__text:00198850                 mov     [esp+0F8h+var_F8], offset unk_4B2980
__text:00198857                 call    _bzero
__text:0019885C                 xor     eax, eax
__text:0019885E                 cpuid
__text:00198860                 mov     [ebp+var_28], eax
__text:00198863                 lea     eax, [ebp+var_24]
__text:00198866                 mov     [ebp+var_20], ecx
__text:00198869                 mov     [ebp+var_1C], edx
__text:0019886C                 mov     [ebp+var_24], ebx
__text:0019886F                 mov     [esp+0F8h+var_F8], eax
__text:00198872                 mov     [esp+0F8h+var_F0], 4
__text:0019887A                 mov     [esp+0F8h+var_F4], offset unk_4B2980
__text:00198882                 call    _bcopy
__text:00198887                 lea     eax, [ebp+var_20]
__text:0019888A                 mov     [esp+0F8h+var_F8], eax
__text:0019888D                 mov     [esp+0F8h+var_F0], 4
__text:00198895                 mov     [esp+0F8h+var_F4], offset unk_4B2988
__text:0019889D                 call    _bcopy
__text:001988A2                 lea     eax, [ebp+var_1C]
__text:001988A5                 mov     [esp+0F8h+var_F8], eax
__text:001988A8                 mov     [esp+0F8h+var_F0], 4
__text:001988B0                 mov     [esp+0F8h+var_F4], offset unk_4B2984
__text:001988B8                 call    _bcopy
__text:001988BD                 mov     edx, 80000000h
__text:001988C2                 mov     eax, edx
__text:001988C4                 cpuid
__text:001988C6                 cmp     eax, 80000003h
__text:001988CB                 mov     ds:byte_4B298C, 0
__text:001988D2                 mov     [ebp+var_D0], eax
__text:001988D8                 mov     [ebp+var_28], eax
__text:001988DB                 mov     [ebp+var_24], ebx
__text:001988DE                 mov     [ebp+var_20], ecx
__text:001988E1                 mov     [ebp+var_1C], edx
__text:001988E4                 jbe     loc_1989D5
__text:001988EA                 mov     eax, 80000002h
__text:001988EF                 cpuid
__text:001988F1                 mov     [ebp+var_20], ecx
__text:001988F4                 lea     ecx, [ebp+var_28]
__text:001988F7                 mov     [ebp+var_1C], edx
__text:001988FA                 lea     edx, [ebp+var_B8]
__text:00198900                 mov     [ebp+var_28], eax
__text:00198903                 mov     [ebp+var_24], ebx
__text:00198906                 mov     [esp+0F8h+var_F4], edx
__text:0019890A                 mov     [esp+0F8h+var_F8], ecx
__text:0019890D                 mov     [esp+0F8h+var_F0], 10h
__text:00198915                 call    _bcopy
__text:0019891A                 mov     eax, 80000003h
__text:0019891F                 cpuid
__text:00198921                 mov     [ebp+var_28], eax
__text:00198924                 lea     eax, [ebp+var_A8]
__text:0019892A                 mov     [ebp+var_24], ebx
__text:0019892D                 lea     ebx, [ebp+var_28]
__text:00198930                 mov     [ebp+var_20], ecx
__text:00198933                 mov     [ebp+var_1C], edx
__text:00198936                 mov     [esp+0F8h+var_F4], eax
__text:0019893A                 mov     [esp+0F8h+var_F8], ebx
__text:0019893D                 mov     [esp+0F8h+var_F0], 10h
__text:00198945                 call    _bcopy
__text:0019894A                 mov     eax, 80000004h
__text:0019894F                 cpuid
__text:00198951                 mov     [ebp+var_28], eax
__text:00198954                 lea     eax, [ebp+var_98]
__text:0019895A                 mov     [esp+0F8h+var_F4], eax
__text:0019895E                 lea     eax, [ebp+var_28]
__text:00198961                 mov     [ebp+var_1C], edx
__text:00198964                 mov     [ebp+var_24], ebx
__text:00198967                 mov     [ebp+var_20], ecx
__text:0019896A                 mov     [esp+0F8h+var_F0], 10h
__text:00198972                 mov     [esp+0F8h+var_F8], eax
__text:00198975                 call    _bcopy
__text:0019897A                 lea     edx, [ebp+var_B8]
__text:00198980                 jmp     short loc_198987
__text:00198982 ; ---------------------------------------------------------------------------
__text:00198982
__text:00198982 loc_198982:                             ; CODE XREF: _cpuid_set_info+150j
__text:00198982                 cmp     al, 20h
__text:00198984                 jnz     short loc_19898E
__text:00198986                 inc     edx
__text:00198987
__text:00198987 loc_198987:                             ; CODE XREF: _cpuid_set_info+144j
__text:00198987                 movzx   eax, byte ptr [edx]
__text:0019898A                 test    al, al
__text:0019898C                 jnz     short loc_198982
__text:0019898E
__text:0019898E loc_19898E:                             ; CODE XREF: _cpuid_set_info+148j
__text:0019898E                 mov     [esp+0F8h+var_F4], edx
__text:00198992                 mov     [esp+0F8h+var_F0], 2Fh
__text:0019899A                 mov     [esp+0F8h+var_F8], offset byte_4B2990
__text:001989A1                 call    _strncpy
__text:001989A6                 mov     ds:byte_4B29BF, 0
__text:001989AD                 mov     [esp+0F8h+var_F4], offset aUnknownCpuTyp ; "Unknown CPU Typ"
__text:001989B5                 mov     [esp+0F8h+var_F8], offset byte_4B2990
__text:001989BC                 call    _strcmp
__text:001989C1                 xor     edx, edx
__text:001989C3                 test    eax, eax
__text:001989C5                 movzx   eax, ds:byte_4B2990
__text:001989CC                 cmovnz  edx, eax
__text:001989CF                 mov     ds:byte_4B2990, dl
__text:001989D5
__text:001989D5 loc_1989D5:                             ; CODE XREF: _cpuid_set_info+A8j
__text:001989D5                 mov     ecx, 1
__text:001989DA                 mov     eax, ecx
__text:001989DC                 cpuid
__text:001989DE                 mov     edi, eax
__text:001989E0                 mov     [ebp+var_28], eax
__text:001989E3                 mov     ds:dword_4B29E0, eax
__text:001989E8                 and     eax, 0Fh
__text:001989EB                 mov     ds:byte_4B29CC, al
__text:001989F0                 mov     eax, edi
__text:001989F2                 and     eax, 0F0h
__text:001989F7                 shr     eax, 4
__text:001989FA                 mov     ds:byte_4B29C9, al
__text:001989FF                 mov     eax, edi
__text:00198A01                 and     eax, 0F00h
__text:00198A06                 shr     eax, 8
__text:00198A09                 mov     ds:byte_4B29C8, al
__text:00198A0E                 mov     eax, edi
__text:00198A10                 and     eax, 3000h
__text:00198A15                 shr     eax, 0Ch
__text:00198A18                 mov     ds:dword_4B29C4, eax
__text:00198A1D                 mov     eax, edi
__text:00198A1F                 and     eax, 0F0000h
__text:00198A24                 mov     [ebp+var_24], ebx
__text:00198A27                 shr     eax, 10h
__text:00198A2A                 mov     ds:byte_4B29E4, bl
__text:00198A30                 and     ebx, 0FF0000h
__text:00198A36                 shr     ebx, 10h
__text:00198A39                 shr     edi, 14h
__text:00198A3C                 mov     [ebp+var_20], ecx
__text:00198A3F                 mov     ds:byte_4B29CA, al
__text:00198A44                 mov     eax, edi
__text:00198A46                 mov     ds:dword_4B2A44, ebx
__text:00198A4C                 mov     ebx, ecx
__text:00198A4E                 mov     ecx, 0
__text:00198A53                 mov     ds:byte_4B29CB, al
__text:00198A58                 mov     eax, ecx
__text:00198A5A                 or      eax, edx
__text:00198A5C                 cmp     [ebp+var_D0], 80000000h
__text:00198A66                 mov     [ebp+var_1C], edx
__text:00198A69                 mov     ds:dword_4B29D0, eax
__text:00198A6E                 mov     ds:dword_4B29D4, ebx
__text:00198A74                 jbe     short loc_198A9F
__text:00198A76                 mov     eax, 80000001h
__text:00198A7B                 cpuid
__text:00198A7D                 mov     [ebp+var_24], ebx
__text:00198A80                 mov     ebx, ecx
__text:00198A82                 mov     [ebp+var_20], ecx
__text:00198A85                 mov     ecx, 0
__text:00198A8A                 mov     [ebp+var_28], eax
__text:00198A8D                 mov     eax, ecx
__text:00198A8F                 or      eax, edx
__text:00198A91                 mov     [ebp+var_1C], edx
__text:00198A94                 mov     ds:dword_4B29D8, eax
__text:00198A99                 mov     ds:dword_4B29DC, ebx
__text:00198A9F
__text:00198A9F loc_198A9F:                             ; CODE XREF: _cpuid_set_info+238j
__text:00198A9F                 mov     [esp+0F8h+var_F4], offset unk_4B2980
__text:00198AA7                 mov     [esp+0F8h+var_F8], offset aGenuineintel ; "GenuineIntel"
__text:00198AAE                 call    _strcmp
__text:00198AB3                 test    eax, eax
__text:00198AB5                 jnz     short loc_198AC9
__text:00198AB7                 cmp     ds:byte_4B29C8, 6
__text:00198ABE                 jnz     short loc_198AC9
__text:00198AC0                 cmp     ds:byte_4B29C9, 0Ch
__text:00198AC7                 nop
__text:00198AC8                 nop
__text:00198AC9
__text:00198AC9 loc_198AC9:                             ; CODE XREF: _cpuid_set_info+279j
__text:00198AC9                                         ; _cpuid_set_info+282j
__text:00198AC9                 nop
__text:00198ACA                 nop
__text:00198ACB                 nop
__text:00198ACC                 nop
__text:00198ACD                 nop
__text:00198ACE                 nop
__text:00198ACF                 nop
__text:00198AD0                 nop
__text:00198AD1                 nop
__text:00198AD2                 nop
__text:00198AD3                 nop
__text:00198AD4                 nop
__text:00198AD5                 nop
__text:00198AD6                 nop
__text:00198AD7                 nop
__text:00198AD8                 nop
__text:00198AD9                 nop
__text:00198ADA                 nop
__text:00198ADB                 nop
__text:00198ADC                 nop
__text:00198ADD                 nop
__text:00198ADE                 nop
__text:00198ADF                 nop
__text:00198AE0                 nop
__text:00198AE1                 nop
__text:00198AE2                 nop
__text:00198AE3                 nop
__text:00198AE4                 nop
__text:00198AE5                 lea     edx, [ebp+var_B8]
__text:00198AEB                 mov     [esp+0F8h+var_F8], edx
__text:00198AEE                 mov     ds:dword_4B2A5C, 7
__text:00198AF8                 mov     ds:dword_4B2A60, 4
__text:00198B02                 mov     [esp+0F8h+var_F4], 14h
__text:00198B0A                 call    _bzero
__text:00198B0F                 mov     eax, 2
__text:00198B14                 cpuid
__text:00198B16                 mov     [ebp+var_1C], edx
__text:00198B19                 xor     edx, edx
__text:00198B1B                 mov     [ebp+var_28], eax
__text:00198B1E                 mov     [ebp+var_24], ebx
__text:00198B21                 mov     [ebp+var_20], ecx
__text:00198B24
__text:00198B24 loc_198B24:                             ; CODE XREF: _cpuid_set_info+2FCj
__text:00198B24                 mov     eax, [edx+ebp-28h]
__text:00198B28                 test    eax, eax
__text:00198B2A                 js      short loc_198B32
__text:00198B2C                 mov     ds:dword_4B2A00[edx], eax
__text:00198B32
__text:00198B32 loc_198B32:                             ; CODE XREF: _cpuid_set_info+2EEj
__text:00198B32                 add     edx, 4
__text:00198B35                 cmp     edx, 10h
__text:00198B38                 jnz     short loc_198B24
__text:00198B3A                 mov     edi, 1
__text:00198B3F                 mov     esi, 2
__text:00198B44                 jmp     short loc_198B7D
__text:00198B46 ; ---------------------------------------------------------------------------
__text:00198B46
__text:00198B46 loc_198B46:                             ; CODE XREF: _cpuid_set_info+34Aj
__text:00198B46                 cmp     edi, 5
__text:00198B49                 jz      short loc_198B88
__text:00198B4B                 mov     eax, esi
__text:00198B4D                 cpuid
__text:00198B4F                 mov     [ebp+var_1C], edx
__text:00198B52                 mov     edx, edi
__text:00198B54                 mov     [ebp+var_20], ecx
__text:00198B57                 shl     edx, 4
__text:00198B5A                 mov     ecx, 1
__text:00198B5F                 mov     [ebp+var_28], eax
__text:00198B62                 mov     [ebp+var_24], ebx
__text:00198B65
__text:00198B65 loc_198B65:                             ; CODE XREF: _cpuid_set_info+33Ej
__text:00198B65                 mov     eax, [ebp+ecx*4+var_2C]
__text:00198B69                 test    eax, eax
__text:00198B6B                 js      short loc_198B73
__text:00198B6D                 mov     ds:dword_4B2A00[edx], eax
__text:00198B73
__text:00198B73 loc_198B73:                             ; CODE XREF: _cpuid_set_info+32Fj
__text:00198B73                 inc     ecx
__text:00198B74                 add     edx, 4
__text:00198B77                 cmp     ecx, 5
__text:00198B7A                 jnz     short loc_198B65
__text:00198B7C                 inc     edi
__text:00198B7D
__text:00198B7D loc_198B7D:                             ; CODE XREF: _cpuid_set_info+308j
__text:00198B7D                 movzx   eax, byte ptr ds:dword_4B2A00
__text:00198B84                 cmp     edi, eax
__text:00198B86                 jb      short loc_198B46
__text:00198B88
__text:00198B88 loc_198B88:                             ; CODE XREF: _cpuid_set_info+30Dj
__text:00198B88                 mov     edx, ds:_vm_cache_geometry_colors
__text:00198B8E                 xor     edi, edi
__text:00198B90                 mov     ecx, [ebp+var_2C]
__text:00198B93                 mov     ebx, ds:dword_4B2A40
__text:00198B99                 mov     esi, [ebp+var_34]
__text:00198B9C                 mov     [ebp+var_BC], edx
__text:00198BA2                 mov     [ebp+var_E8], ecx
__text:00198BA8                 mov     [ebp+var_D8], ebx
__text:00198BAE
__text:00198BAE loc_198BAE:                             ; CODE XREF: _cpuid_set_info+490j
__text:00198BAE                 mov     ebx, esi
__text:00198BB0                 mov     edx, [ebp+var_E8]
__text:00198BB6                 mov     eax, 4
__text:00198BBB                 mov     ecx, edi
__text:00198BBD                 cpuid
__text:00198BBF                 mov     [ebp+var_E0], eax
__text:00198BC5                 and     eax, 1Fh
__text:00198BC8                 mov     esi, ebx
__text:00198BCA                 mov     [ebp+var_DC], edx
__text:00198BD0                 mov     [ebp+var_D4], ecx
__text:00198BD6                 mov     [ebp+var_E4], ebx
__text:00198BDC                 mov     [ebp+var_E8], edx
__text:00198BE2                 mov     [ebp+var_CC], eax
__text:00198BE8                 jz      loc_198CD1
__text:00198BEE                 mov     eax, [ebp+var_E0]
__text:00198BF4                 inc     ecx
__text:00198BF5                 mov     [ebp+var_C0], ecx
__text:00198BFB                 and     eax, 3FFC000h
__text:00198C00                 shr     eax, 0Eh
__text:00198C03                 inc     eax
__text:00198C04                 mov     [ebp+var_C8], eax
__text:00198C0A                 mov     eax, ebx
__text:00198C0C                 and     eax, 0FFFh
__text:00198C11                 inc     eax
__text:00198C12                 mov     [ebp+var_C4], eax
__text:00198C18                 mov     eax, [ebp+var_E0]
__text:00198C1E                 shr     ebx, 16h
__text:00198C21                 mov     [ebp+var_E4], ebx
__text:00198C27                 inc     ebx
__text:00198C28                 shr     eax, 1Ah
__text:00198C2B                 inc     eax
__text:00198C2C                 mov     [ebp+var_D8], eax
__text:00198C32                 mov     eax, [ebp+var_E0]
__text:00198C38                 and     eax, 0E0h
__text:00198C3D                 shr     eax, 5
__text:00198C40                 cmp     eax, 2
__text:00198C43                 jz      short loc_198C66
__text:00198C45                 cmp     eax, 3
__text:00198C48                 jz      short loc_198C76
__text:00198C4A                 dec     eax
__text:00198C4B                 jnz     short loc_198CCB
__text:00198C4D                 cmp     [ebp+var_CC], 1
__text:00198C54                 mov     edx, 2
__text:00198C59                 jz      short loc_198C84
__text:00198C5B                 cmp     [ebp+var_CC], 2
__text:00198C62                 mov     dl, 1
__text:00198C64                 jmp     short loc_198C72
__text:00198C66 ; ---------------------------------------------------------------------------
__text:00198C66
__text:00198C66 loc_198C66:                             ; CODE XREF: _cpuid_set_info+407j
__text:00198C66                 cmp     [ebp+var_CC], 3
__text:00198C6D                 mov     edx, 3
__text:00198C72
__text:00198C72 loc_198C72:                             ; CODE XREF: _cpuid_set_info+428j
__text:00198C72                 jnz     short loc_198CCB
__text:00198C74                 jmp     short loc_198C84
__text:00198C76 ; ---------------------------------------------------------------------------
__text:00198C76
__text:00198C76 loc_198C76:                             ; CODE XREF: _cpuid_set_info+40Cj
__text:00198C76                 cmp     [ebp+var_CC], 3
__text:00198C7D                 jnz     short loc_198CCB
__text:00198C7F                 mov     edx, 4
__text:00198C84
__text:00198C84 loc_198C84:                             ; CODE XREF: _cpuid_set_info+41Dj
__text:00198C84                                         ; _cpuid_set_info+438j
__text:00198C84                 mov     eax, [ebp+var_C4]
__text:00198C8A                 imul    eax, [ebp+var_C0]
__text:00198C91                 mov     ecx, [ebp+var_C8]
__text:00198C97                 imul    ebx, eax
__text:00198C9A                 shr     eax, 0Ch
__text:00198C9D                 mov     ds:dword_4B2A48[edx*4], ecx
__text:00198CA4                 mov     ds:dword_4B29E8[edx*4], ebx
__text:00198CAB                 mov     ebx, [ebp+var_C4]
__text:00198CB1                 mov     [ebp+edx*4+var_B8], ebx
__text:00198CB8                 cmp     eax, [ebp+var_BC]
__text:00198CBE                 cmovbe  eax, [ebp+var_BC]
__text:00198CC5                 mov     [ebp+var_BC], eax
__text:00198CCB
__text:00198CCB loc_198CCB:                             ; CODE XREF: _cpuid_set_info+40Fj
__text:00198CCB                                         ; _cpuid_set_info:loc_198C72j ...
__text:00198CCB                 inc     edi
__text:00198CCC                 jmp     loc_198BAE
__text:00198CD1 ; ---------------------------------------------------------------------------
__text:00198CD1
__text:00198CD1 loc_198CD1:                             ; CODE XREF: _cpuid_set_info+3ACj
__text:00198CD1                 mov     eax, [ebp+var_D8]
__text:00198CD7                 mov     edx, [ebp+var_DC]
__text:00198CDD                 mov     ecx, [ebp+var_E4]
__text:00198CE3                 mov     ebx, [ebp+var_D4]
__text:00198CE9                 mov     ds:dword_4B2A40, eax
__text:00198CEE                 mov     eax, [ebp+var_E0]
__text:00198CF4                 mov     [ebp+var_2C], edx
__text:00198CF7                 mov     edx, [ebp+var_BC]
__text:00198CFD                 mov     [ebp+var_34], ecx
__text:00198D00                 mov     [ebp+var_30], ebx
__text:00198D03                 mov     [ebp+var_38], eax
__text:00198D06                 mov     eax, [ebp+var_AC]
__text:00198D0C                 mov     ds:_vm_cache_geometry_colors, edx
__text:00198D12                 test    eax, eax
__text:00198D14                 jnz     short loc_198D20
__text:00198D16                 mov     eax, [ebp+var_B0]
__text:00198D1C                 test    eax, eax
__text:00198D1E                 nop
__text:00198D1F                 nop
__text:00198D20
__text:00198D20 loc_198D20:                             ; CODE XREF: _cpuid_set_info+4D8j
__text:00198D20                 mov     ds:dword_4B29FC, eax
__text:00198D25                 jmp     short loc_198D43
__text:00198D25 ; ---------------------------------------------------------------------------
__text:00198D27                 db 0C7h ; Ã
__text:00198D28                 db  44h ; D
__text:00198D29                 db  24h ; $
__text:00198D2A                 db    8
__text:00198D2B                 db 0BAh ; ¦
__text:00198D2C                 db    0
__text:00198D2D                 db    0
__text:00198D2E                 db    0
__text:00198D2F                 db 0C7h ; Ã
__text:00198D30                 db  44h ; D
__text:00198D31                 db  24h ; $
__text:00198D32                 db    4
__text:00198D33                 db  98h ; ÿ
__text:00198D34                 db 0D3h ; Ë
__text:00198D35                 db  40h ; @
__text:00198D36                 db    0
__text:00198D37                 db 0C7h ; Ã
__text:00198D38                 db    4
__text:00198D39                 db  24h ; $
__text:00198D3A                 db 0DCh ; _
__text:00198D3B                 db 0D3h ; Ë
__text:00198D3C                 db  40h ; @
__text:00198D3D                 db    0
__text:00198D3E                 db 0E8h ; Þ
__text:00198D3F                 db  89h ; ë
__text:00198D40                 db    6
__text:00198D41                 db 0F9h ; ¨
__text:00198D42                 db 0FFh
__text:00198D43 ; ---------------------------------------------------------------------------
__text:00198D43
__text:00198D43 loc_198D43:                             ; CODE XREF: _cpuid_set_info+4E9j
__text:00198D43                 mov     ds:dword_4B29C0, 4075E0h
__text:00198D4D                 add     esp, 0ECh
__text:00198D53                 pop     ebx
__text:00198D54                 pop     esi
__text:00198D55                 pop     edi
__text:00198D56                 leave
__text:00198D57                 retn
__text:00198D57 _cpuid_set_info endp