Function at 0x404b90
Capabilities:
Check os version
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a0
mov eax, dword [0x5f4274]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x16c]
push esi
push edi
push 0x98
xorps xmm0, xmm0
mov dword [ebx], 0
push 0
push eax
movups xmmword [ebp - 0x1a0], xmm0
mov dword [ebp - 0x180], 0
movups xmmword [ebp - 0x190], xmm0
call fcn.00562660
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
lea eax, [ebp - 0x170]
add esp, 0xc
mov dword [ebp - 0x170], 0x9c
push eax
call esi
mov dword [ebp - 0x174], eax
test eax, eax
jne 0x404c1e
lea eax, [ebp - 0x170]
mov dword [ebp - 0x170], 0x94
push eax
call esi
test eax, eax
je 0x405539
push str.GetNativeSystemInfo
push 0x59d510
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x404c44
lea ecx, [ebp - 0x1a0]
push ecx
call eax
jmp 0x404c51
lea eax, [ebp - 0x1a0]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x160]
mov ecx, dword [ebp - 0x16c]
mov dword [ebp - 0x17c], ecx
sub eax, 0
je 0x40565c
sub eax, 1
je 0x40554f
sub eax, 1
jne 0x405695
mov edx, dword [ebp - 0x168]
cmp ecx, 6
jne 0x404dac
test edx, edx
jne 0x404cd4
cmp byte [ebp - 0xd6], 1
jne 0x404d8d
lea ecx, [ebx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404ca1
mov eax, dword [str.Windows_Vista]
mov dword [ecx], eax
mov eax, dword [0x59dd74]
mov dword [ecx + 4], eax
mov eax, dword [0x59dd78]
mov dword [ecx + 8], eax
mov ax, word [0x59dd7c]
mov word [ecx + 0xc], ax
mov al, byte [0x59dd7e]
mov byte [ecx + 0xe], al
mov esi, dword [ebp - 0x16c]
cmp esi, 4
ja 0x404d1d
lea ecx, [ebx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404ce2
mov eax, dword [str.Microsoft_Windows_NT]
mov dword [ecx], eax
mov eax, dword [0x59de44]
mov dword [ecx + 4], eax
mov eax, dword [0x59de48]
mov dword [ecx + 8], eax
mov eax, dword [0x59de4c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59de50]
mov dword [ecx + 0x10], eax
mov ax, word [0x59de54]
mov word [ecx + 0x14], ax
cmp dword [ebp - 0x174], 0
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
je 0x4052d6
cmp byte [ebp - 0xd6], 1
jne 0x404f42
cmp word [ebp - 0x1a0], 9
je 0x40545c
lea ecx, [ebx - 1]
cmp esi, 4
jne 0x404ed6
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404d57
mov eax, dword [str.Workstation_4.0]
mov dword [ecx], eax
mov eax, dword [0x59de5c]
mov dword [ecx + 4], eax
mov eax, dword [0x59de60]
mov dword [ecx + 8], eax
mov eax, dword [0x59de64]
mov dword [ecx + 0xc], eax
mov al, byte [0x59de68]
mov byte [ecx + 0x10], al
jmp 0x405469
lea edi, [ebx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404d90
mov ecx, 6
mov esi, str.Windows_Server__Longhorn_
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x404cd4
cmp ecx, 5
jne 0x404cd4
cmp edx, 2
jne 0x404e3a
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x404de4
lea edi, [ebx - 1]
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404dd0
mov ecx, 9
mov esi, str.Microsoft_Windows_Server_2003__R2_
jmp 0x404e32
cmp byte [ebp - 0xd6], 1
jne 0x404e19
cmp word [ebp - 0x1a0], 9
jne 0x404e19
lea edi, [ebx - 1]
nop word [eax + eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404e00
mov ecx, 0xb
mov esi, str.Microsoft_Windows_XP_Professional_x64_Edition
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x404e34
lea edi, [ebx - 1]
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404e20
mov ecx, 8
mov esi, str.Microsoft_Windows_Server_2003_
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0x168]
mov esi, dword [ebp - 0x16c]
cmp esi, 5
jne 0x404cda
cmp edx, 1
jne 0x404e8d
lea ecx, [ebx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404e51
mov eax, dword [str.Microsoft_Windows_XP]
mov dword [ecx], eax
mov eax, dword [0x59de14]
mov dword [ecx + 4], eax
mov eax, dword [0x59de18]
mov dword [ecx + 8], eax
mov eax, dword [0x59de1c]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59de20]
mov dword [ecx + 0x10], eax
mov ax, word [0x59de24]
jmp 0x404d19
test edx, edx
jne 0x404d1d
lea ecx, [ebx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404e98
mov eax, dword [str.Microsoft_Windows_2000]
mov dword [ecx], eax
mov eax, dword [0x59de2c]
mov dword [ecx + 4], eax
mov eax, dword [0x59de30]
mov dword [ecx + 8], eax
mov eax, dword [0x59de34]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59de38]
mov dword [ecx + 0x10], eax
mov eax, dword [0x59de3c]
mov dword [ecx + 0x14], eax
jmp 0x404d1d
test dword [ebp - 0xd8], 0x200
je 0x404f12
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404ee2
mov eax, dword [str.Home_Edition]
mov dword [ecx], eax
mov eax, dword [0x59de70]
mov dword [ecx + 4], eax
mov eax, dword [0x59de74]
mov dword [ecx + 8], eax
mov ax, word [0x59de78]
mov word [ecx + 0xc], ax
jmp 0x40545c
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x404f12
mov eax, dword [str.Professional]
mov dword [ecx], eax
mov eax, dword [0x59de80]
mov dword [ecx + 4], eax
mov eax, dword [0x59de84]
mov dword [ecx + 8], eax
mov ax, word [0x59de88]
mov word [ecx + 0xc], ax
jmp 0x40545c
mov al, byte [ebp - 0xd6]
cmp al, 3
je 0x404f54
cmp al, 2
jne 0x40545c
cmp dword [ebp - 0x16c], 5
jne 0x40527e
cmp edx, 2
jne 0x4051c8
cmp word [ebp - 0x1a0], 6
mov eax, dword [ebp - 0xd8]
jne 0x405008
test al, al
jns 0x404fed
lea edi, [ebx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404f85
mov ecx, 0xb
mov esi, str.Datacenter_Edition_for_Itanium_based_Systems
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movzx eax, word [ebp - 0x164]
push eax
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0x84]
push str._s__Build__d_
push eax
call fcn.00402080
lea edx, [ebp - 0x84]
add esp, 0x10
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x404fc6
sub edx, esi
dec ebx
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x404fd0
mov ecx, edx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x405695
test al, 2
je 0x404f9b
lea edi, [ebx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x404ff4
mov ecx, 0xb
mov esi, str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x404f97
cmp word [ebp - 0x1a0], 9
lea ecx, [ebx - 1]
jne 0x4050e0
test al, al
jns 0x40505e
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405020
mov eax, dword [str.Datacenter_x64_Edition]
mov dword [ecx], eax
mov eax, dword [0x59def0]
mov dword [ecx + 4], eax
mov eax, dword [0x59def4]
mov dword [ecx + 8], eax
mov eax, dword [0x59def8]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59defc]
mov dword [ecx + 0x10], eax
mov eax, dword [0x59df00]
mov dword [ecx + 0x14], eax
jmp 0x404f9b
test al, 2
je 0x4050a0
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405062
mov eax, dword [str.Enterprise_x64_Edition]
mov dword [ecx], eax
mov eax, dword [0x59df08]
mov dword [ecx + 4], eax
mov eax, dword [0x59df0c]
mov dword [ecx + 8], eax
mov eax, dword [0x59df10]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59df14]
mov dword [ecx + 0x10], eax
mov eax, dword [0x59df18]
mov dword [ecx + 0x14], eax
jmp 0x404f9b
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4050a0
mov eax, dword [str.Standard_x64_Edition]
mov dword [ecx], eax
mov eax, dword [0x59df20]
mov dword [ecx + 4], eax
mov eax, dword [0x59df24]
mov dword [ecx + 8], eax
mov eax, dword [0x59df28]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59df2c]
mov dword [ecx + 0x10], eax
mov ax, word [0x59df30]
mov word [ecx + 0x14], ax
jmp 0x404f9b
test al, al
jns 0x40511a
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4050e4
mov eax, dword [str.Datacenter_Edition]
mov dword [ecx], eax
mov eax, dword [0x59df38]
mov dword [ecx + 4], eax
mov eax, dword [0x59df3c]
mov dword [ecx + 8], eax
mov eax, dword [0x59df40]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59df44]
mov dword [ecx + 0x10], eax
jmp 0x404f9b
test al, 2
je 0x405156
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405120
mov eax, dword [str.Enterprise_Edition]
mov dword [ecx], eax
mov eax, dword [0x59df4c]
mov dword [ecx + 4], eax
mov eax, dword [0x59df50]
mov dword [ecx + 8], eax
mov eax, dword [0x59df54]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59df58]
mov dword [ecx + 0x10], eax
jmp 0x404f9b
test eax, 0x400
je 0x405190
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405160
mov eax, dword [str.Web_Edition]
mov dword [ecx], eax
mov eax, dword [0x59df60]
mov dword [ecx + 4], eax
mov eax, dword [0x59df64]
mov dword [ecx + 8], eax
mov al, byte [0x59df68]
mov byte [ecx + 0xc], al
jmp 0x404f9b
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405190
mov eax, dword [str.Standard_Edition]
mov dword [ecx], eax
mov eax, dword [0x59df70]
mov dword [ecx + 4], eax
mov eax, dword [0x59df74]
mov dword [ecx + 8], eax
mov eax, dword [0x59df78]
mov dword [ecx + 0xc], eax
mov ax, word [0x59df7c]
mov word [ecx + 0x10], ax
jmp 0x404f9b
test edx, edx
jne 0x40527e
mov eax, dword [ebp - 0xd8]
lea ecx, [ebx - 1]
test al, al
jns 0x405220
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4051e0
mov eax, dword [str.Datacenter_Server]
mov dword [ecx], eax
mov eax, dword [0x59df84]
mov dword [ecx + 4], eax
mov eax, dword [0x59df88]
mov dword [ecx + 8], eax
mov eax, dword [0x59df8c]
mov dword [ecx + 0xc], eax
mov ax, word [0x59df90]
mov word [ecx + 0x10], ax
mov al, byte [0x59df92]
mov byte [ecx + 0x12], al
jmp 0x404f9b
test al, 2
je 0x405260
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405224
mov eax, dword [str.Advanced_Server]
mov dword [ecx], eax
mov eax, dword [0x59df98]
mov dword [ecx + 4], eax
mov eax, dword [0x59df9c]
mov dword [ecx + 8], eax
mov eax, dword [0x59dfa0]
mov dword [ecx + 0xc], eax
mov al, byte [0x59dfa4]
mov byte [ecx + 0x10], al
jmp 0x404f9b
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405260
mov eax, dword [str.Server]
mov dword [ecx], eax
mov eax, dword [0x59dfac]
mov dword [ecx + 4], eax
jmp 0x404f9b
test byte [ebp - 0xd8], 2
je 0x4052a9
lea edi, [ebx - 1]
nop word [eax + eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405290
mov ecx, 8
mov esi, str.Server_4.0__Enterprise_Edition
rep movsd dword es:[edi], dword [esi]
jmp 0x405456
lea ecx, [ebx - 1]
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4052b0
mov eax, dword [str.Server_4.0]
mov dword [ecx], eax
mov eax, dword [0x59dfd4]
mov dword [ecx + 4], eax
mov eax, dword [0x59dfd8]
mov dword [ecx + 8], eax
jmp 0x40545c
lea eax, [ebp - 0x178]
mov dword [ebp - 0x174], 0x50
push eax
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405539
lea eax, [ebp - 0x174]
push eax
lea eax, [ebp - 0xd4]
push eax
push 0
push 0
push str.ProductType
push dword [ebp - 0x178]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0x178]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x405539
cmp dword [ebp - 0x174], 0x50
ja 0x405539
lea eax, [ebp - 0xd4]
push eax
push str.WINNT
call edi
test eax, eax
jne 0x405389
lea ecx, [ebx - 1]
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405360
mov eax, dword [str.Workstation]
mov dword [ecx], eax
mov eax, dword [0x59e024]
mov dword [ecx + 4], eax
mov eax, dword [0x59e028]
mov dword [ecx + 8], eax
mov al, byte [0x59e02c]
mov byte [ecx + 0xc], al
lea eax, [ebp - 0xd4]
push eax
push str.LANMANNT
call edi
test eax, eax
jne 0x4053b9
lea ecx, [ebx - 1]
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4053a0
mov eax, dword [str.Server]
mov dword [ecx], eax
mov eax, dword [0x59dfac]
mov dword [ecx + 4], eax
lea eax, [ebp - 0xd4]
push eax
push str.SERVERNT
call edi
test eax, eax
jne 0x405401
lea ecx, [ebx - 1]
nop
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4053d0
mov eax, dword [str.Advanced_Server]
mov dword [ecx], eax
mov eax, dword [0x59df98]
mov dword [ecx + 4], eax
mov eax, dword [0x59df9c]
mov dword [ecx + 8], eax
mov eax, dword [0x59dfa0]
mov dword [ecx + 0xc], eax
mov al, byte [0x59dfa4]
mov byte [ecx + 0x10], al
push dword [ebp - 0x168]
lea eax, [ebp - 0x84]
push dword [ebp - 0x16c]
push str._d._d
push eax
call fcn.00402080
lea edx, [ebp - 0x84]
add esp, 0x10
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x405430
sub edx, esi
lea edi, [ebx - 1]
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x405440
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
cmp dword [ebp - 0x16c], 4
jne 0x404f9b
push str.Service_Pack_6
lea eax, [ebp - 0x15c]
push eax
call edi
test eax, eax
jne 0x404f9b
lea eax, [ebp - 0x174]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
movzx eax, word [ebp - 0x164]
push eax
jne 0x4054da
lea eax, [ebp - 0x84]
push str.Service_Pack_6a__Build__d_
push eax
call fcn.00402080
lea edx, [ebp - 0x84]
add esp, 0xc
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x4054c2
sub edx, esi
dec ebx
nop dword [eax]
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x4054d0
jmp 0x405518
lea eax, [ebp - 0x15c]
push eax
lea eax, [ebp - 0x84]
push str._s__Build__d_
push eax
call fcn.00402080
lea edx, [ebp - 0x84]
add esp, 0x10
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x405500
sub edx, esi
dec ebx
nop word [eax + eax]
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x405510
push dword [ebp - 0x174]
mov ecx, edx
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405695
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0055f63b
mov esp, ebp
pop ebp
ret 4
cmp ecx, 4
jne 0x405695
mov edx, dword [ebp - 0x168]
test edx, edx
jne 0x4055ca
lea ecx, [ebx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x405565
mov eax, dword [str.Microsoft_Windows_95]
mov dword [ecx], eax
mov eax, dword [0x59e0cc]
mov dword [ecx + 4], eax
mov eax, dword [0x59e0d0]
mov dword [ecx + 8], eax
mov eax, dword [0x59e0d4]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59e0d8]
mov dword [ecx + 0x10], eax
mov ax, word [0x59e0dc]
mov word [ecx + 0x14], ax
mov al, byte [ebp - 0x15b]
cmp al, 0x43
je 0x4055ae
cmp al, 0x42
jne 0x4055ca
lea ecx, [ebx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4055b1
mov eax, dword [str.OSR2]
mov dword [ecx], eax
mov al, byte [0x59e0e4]
mov byte [ecx + 4], al
cmp edx, 0xa
jne 0x40563d
lea ecx, [ebx - 1]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4055d2
mov eax, dword [str.Microsoft_Windows_98]
mov dword [ecx], eax
mov eax, dword [0x59e0ec]
mov dword [ecx + 4], eax
mov eax, dword [0x59e0f0]
mov dword [ecx + 8], eax
mov eax, dword [0x59e0f4]
mov dword [ecx + 0xc], eax
mov eax, dword [0x59e0f8]
mov dword [ecx + 0x10], eax
mov ax, word [0x59e0fc]
mov word [ecx + 0x14], ax
mov al, byte [ebp - 0x15b]
cmp al, 0x41
je 0x40561b
cmp al, 0x42
jne 0x405695
dec ebx
nop dword [eax]
mov al, byte [ebx + 1]
lea ebx, [ebx + 1]
test al, al
jne 0x405620
mov ax, word [0x59e100]
mov word [ebx], ax
mov al, byte [0x59e102]
mov byte [ebx + 2], al
jmp 0x405695
cmp edx, 0x5a
jne 0x405695
dec ebx
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x405643
mov edi, ebx
mov ecx, 9
mov esi, str.Microsoft_Windows_Millennium_Edition
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
jmp 0x405695
dec ebx
nop dword [eax]
mov al, byte [ebx + 1]
lea ebx, [ebx + 1]
test al, al
jne 0x405660
mov eax, dword [str.Microsoft_Win32s]
mov dword [ebx], eax
mov ecx, dword [0x59e130]
mov dword [ebx + 4], ecx
mov ecx, dword [0x59e134]
mov dword [ebx + 8], ecx
mov ecx, dword [0x59e138]
mov dword [ebx + 0xc], ecx
mov cl, byte [0x59e13c]
mov byte [ebx + 0x10], cl
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x17c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0055f63b
mov esp, ebp
pop ebp
ret 4