Function at 0x408510
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
sub esp, 0xf0
mov eax, dword [0x453d48]
xor eax, esp
mov dword [esp + 0xec], eax
push esi
mov esi, dword [esp + 0xf8]
push 0x94
lea eax, [esp + 0x10]
push 0
push eax
mov byte [esi], 0
call fcn.0042a560
add esp, 0xc
lea ecx, [esp + 0xc]
push ecx
mov dword [esp + 0x10], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x408806
mov eax, dword [esp + 0x1c]
sub eax, 0
je 0x4087cd
sub eax, 1
je 0x40870b
sub eax, 1
jne 0x408806
mov edx, dword [esp + 0x10]
cmp edx, 4
ja 0x4085cf
mov eax, esi
dec eax
lea esp, [esp]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x408590
mov ecx, dword [str.Microsoft_Windows_NT]
mov dword [eax], ecx
mov ecx, dword [0x442af0]
mov dword [eax + 4], ecx
mov ecx, dword [0x442af4]
mov dword [eax + 8], ecx
mov ecx, dword [0x442af8]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x442afc]
mov dword [eax + 0x10], ecx
mov cx, word [0x442b00]
mov word [eax + 0x14], cx
cmp edx, 5
jne 0x408614
mov eax, esi
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4085d7
mov edx, dword [str.Microsoft_Windows_2000]
mov dword [eax], edx
mov ecx, dword [0x442ad8]
mov dword [eax + 4], ecx
mov edx, dword [0x442adc]
mov dword [eax + 8], edx
mov ecx, dword [0x442ae0]
mov dword [eax + 0xc], ecx
mov edx, dword [0x442ae4]
mov dword [eax + 0x10], edx
mov ecx, dword [0x442ae8]
mov dword [eax + 0x14], ecx
push edi
lea edx, [esp + 8]
push edx
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 8]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0xa8]
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea ecx, [esp + 0xa4]
push ecx
push str.WINNT
call edi
test eax, eax
jne 0x4086a1
mov eax, esi
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x408676
mov edx, dword [str.Workstation]
mov dword [eax], edx
mov ecx, dword [0x442a84]
mov dword [eax + 4], ecx
mov edx, dword [0x442a88]
mov dword [eax + 8], edx
mov cl, byte [0x442a8c]
mov byte [eax + 0xc], cl
lea edx, [esp + 0xa4]
push edx
push str.SERVERNT
call edi
pop edi
test eax, eax
jne 0x4086d1
mov eax, esi
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4086b8
mov ecx, dword [str.Server]
mov dword [eax], ecx
mov edx, dword [0x442a70]
mov dword [eax + 4], edx
movzx eax, word [esp + 0x18]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x24]
push ecx
push edx
push eax
push esi
push str._s_version__d._d__s__Build__d_
push esi
call fcn.0042a49b
add esp, 0x1c
pop esi
mov ecx, dword [esp + 0xec]
xor ecx, esp
call fcn.0042997e
add esp, 0xf0
ret
mov eax, dword [esp + 0x10]
cmp eax, 4
ja 0x408775
jne 0x40871d
cmp dword [esp + 0x14], 0
ja 0x408775
dec esi
mov eax, esi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x408720
mov ecx, dword [str.Microsoft_Windows_95]
mov dword [eax], ecx
mov edx, dword [0x442a38]
mov dword [eax + 4], edx
mov ecx, dword [0x442a3c]
mov dword [eax + 8], ecx
mov edx, dword [0x442a40]
mov dword [eax + 0xc], edx
mov ecx, dword [0x442a44]
mov dword [eax + 0x10], ecx
mov dx, word [0x442a48]
mov word [eax + 0x14], dx
pop esi
mov ecx, dword [esp + 0xec]
xor ecx, esp
call fcn.0042997e
add esp, 0xf0
ret
dec esi
mov eax, esi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x408778
mov ecx, dword [str.Microsoft_Windows_98]
mov dword [eax], ecx
mov edx, dword [0x442a20]
mov dword [eax + 4], edx
mov ecx, dword [0x442a24]
mov dword [eax + 8], ecx
mov edx, dword [0x442a28]
mov dword [eax + 0xc], edx
mov ecx, dword [0x442a2c]
mov dword [eax + 0x10], ecx
mov dx, word [0x442a30]
mov word [eax + 0x14], dx
pop esi
mov ecx, dword [esp + 0xec]
xor ecx, esp
call fcn.0042997e
add esp, 0xf0
ret
dec esi
mov eax, esi
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x4087d0
mov ecx, dword [str.Microsoft_Win32s]
mov dword [eax], ecx
mov edx, dword [0x442a0c]
mov dword [eax + 4], edx
mov ecx, dword [0x442a10]
mov dword [eax + 8], ecx
mov edx, dword [0x442a14]
mov dword [eax + 0xc], edx
mov cx, word [0x442a18]
mov word [eax + 0x10], cx
mov ecx, dword [esp + 0xf0]
pop esi
xor ecx, esp
call fcn.0042997e
add esp, 0xf0
ret