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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf8
mov eax, dword [0x5a379c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push 0x9c
lea eax, [ebp - 0xf0]
push 0
push eax
mov esi, edi
call fcn.005233c0
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExA]
add esp, 0xc
lea eax, [ebp - 0xf0]
push eax
mov dword [ebp - 0xf0], 0x9c
call ebx
mov dword [ebp - 0xf4], eax
test eax, eax
jne 0x40cdbc
lea eax, [ebp - 0xf0]
push eax
mov dword [ebp - 0xf0], 0x94
call ebx
test eax, eax
jne 0x40cdbc
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00521d5b
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xe0]
dec eax
je 0x40cfce
dec eax
jne 0x40d074
cmp dword [ebp - 0xec], 4
ja 0x40cdea
push str.Microsoft_Windows_NT
push edi
call fcn.00522933
add esp, 8
lea esi, [edi + eax]
cmp dword [ebp - 0xec], 5
jne 0x40ce0c
cmp dword [ebp - 0xe8], 0
jne 0x40ce0c
push str.Microsoft_Windows_2000
push esi
call fcn.00522933
add esp, 8
add esi, eax
cmp dword [ebp - 0xf4], 0
je 0x40ced3
mov al, byte [ebp - 0x56]
cmp al, 1
jne 0x40ce5f
cmp dword [ebp - 0xec], 5
jne 0x40ce42
cmp dword [ebp - 0xe8], 1
jne 0x40ce42
push str.Microsoft_Windows_XP
push esi
call fcn.00522933
add esp, 8
add esi, eax
test dword [ebp - 0x58], 0x200
je 0x40ce55
push str.Home_Edition
jmp 0x40cf7c
push str.Professional
jmp 0x40cf7c
cmp al, 3
jne 0x40cf87
cmp dword [ebp - 0xec], 5
jne 0x40ce89
cmp dword [ebp - 0xe8], 1
jne 0x40ce89
push str.Microsoft_Windows_.NET
push esi
call fcn.00522933
add esp, 8
add esi, eax
mov eax, dword [ebp - 0x58]
test al, al
jns 0x40ce9a
push str.DataCenter_Server
jmp 0x40cf7c
test al, 2
je 0x40ceb5
cmp dword [ebp - 0xec], 4
je 0x40cf77
push str.Enterprise_Server
jmp 0x40cf7c
mov ecx, 0x400
cmp ax, cx
jne 0x40cec9
push str.Web_Server
jmp 0x40cf7c
push str.Server
jmp 0x40cf7c
lea eax, [ebp - 0xf4]
push eax
push 1
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0xf8], 0x50
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [ebp - 0xf8]
push eax
lea eax, [ebp - 0x54]
push eax
push 0
push 0
push str.ProductType
push dword [ebp - 0xf4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 0xf4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
lea eax, [ebp - 0x54]
push eax
push str.WINNT
call ebx
test eax, eax
jne 0x40cf49
push str.Professional
push esi
call fcn.00522933
add esp, 8
add esi, eax
lea eax, [ebp - 0x54]
push eax
push str.LANMANNT
call ebx
test eax, eax
jne 0x40cf68
push str.Server
push esi
call fcn.00522933
add esp, 8
add esi, eax
lea eax, [ebp - 0x54]
push eax
push str.SERVERNT
call ebx
test eax, eax
jne 0x40cf87
push str.Advanced_Server
push esi
call fcn.00522933
add esp, 8
add esi, eax
movzx eax, word [ebp - 0xe4]
mov ecx, dword [ebp - 0xec]
push eax
lea eax, [ebp - 0xdc]
push eax
cmp ecx, 4
ja 0x40cfbb
push dword [ebp - 0xe8]
push ecx
push str.version__d._d__s__Build__d_
push esi
call fcn.00522933
add esp, 0x18
jmp 0x40d06e
push str._s__Build__d_
push esi
call fcn.00522933
add esp, 0x10
jmp 0x40d06e
cmp dword [ebp - 0xec], 4
jne 0x40d074
cmp dword [ebp - 0xe8], 0
jne 0x40d01c
push str.Microsoft_Windows_95
push edi
call fcn.00522933
lea esi, [edi + eax]
mov al, byte [ebp - 0xdb]
add esp, 8
cmp al, 0x43
je 0x40d003
cmp al, 0x42
jne 0x40d013
push str.OSR2
push esi
call fcn.00522933
add esp, 8
add esi, eax
cmp dword [ebp - 0xec], 4
jne 0x40d070
cmp dword [ebp - 0xe8], 0xa
jne 0x40d057
push str.Microsoft_Windows_98
push esi
call fcn.00522933
add esp, 8
add esi, eax
cmp byte [ebp - 0xdb], 0x41
jne 0x40d04e
push 0x5553f0
push esi
call fcn.00522933
add esp, 8
add esi, eax
cmp dword [ebp - 0xec], 4
jne 0x40d070
cmp dword [ebp - 0xe8], 0x5a
jne 0x40d070
push str.Microsoft_Windows_Millennium_Edition
push esi
call fcn.00522933
add esp, 8
add esi, eax
cmp esi, edi
jne 0x40d094
push dword [ebp - 0xe4]
push dword [ebp - 0xe8]
push dword [ebp - 0xec]
push str._d._d_build__d
push esi
call fcn.00522933
add esp, 0x14
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.00521d5b
mov esp, ebp
pop ebp
ret