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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
push ebx
push esi
push edi
push 1
push 0x200
call fcn.0040ea5e
mov edi, dword [ebp + 8]
pop ecx
test edi, edi
pop ecx
mov dword [ebp - 4], eax
je 0x40a20d
and byte [edi], 0
mov esi, 0x9c
push esi
lea eax, [ebp - 0xa4]
push 0
push eax
call fcn.0040bc80
add esp, 0xc
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetVersionExA]
push eax
call esi
test eax, eax
mov dword [ebp + 8], eax
mov ebx, str.Unknown_OS
jne 0x409e17
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa4], 0x94
push eax
call esi
test eax, eax
jne 0x409e17
push ebx
push edi
call fcn.0040bb60
pop ecx
pop ecx
mov eax, dword [ebp - 0x94]
sub eax, 0
je 0x40a1f7
dec eax
je 0x40a167
dec eax
jne 0x40a204
push 5
pop esi
cmp dword [ebp - 0xa0], esi
jne 0x409e91
cmp dword [ebp - 0x9c], 2
jne 0x409e5d
push str.Microsoft_Windows_Server_2003_family_
push edi
call fcn.0040bb70
cmp dword [ebp - 0xa0], esi
pop ecx
pop ecx
jne 0x409e91
cmp dword [ebp - 0x9c], 1
jne 0x409e7b
push str.Microsoft_Windows_XP
push edi
call fcn.0040bb70
cmp dword [ebp - 0xa0], esi
pop ecx
pop ecx
jne 0x409e91
cmp dword [ebp - 0x9c], 0
jne 0x409ea7
push str.Microsoft_Windows_2000
push edi
call fcn.0040bb70
pop ecx
pop ecx
cmp dword [ebp - 0xa0], 4
ja 0x409ea7
push str.Microsoft_Windows_NT
push edi
call fcn.0040bb70
pop ecx
pop ecx
xor eax, eax
cmp dword [ebp + 8], eax
je 0x409f75
cmp byte [ebp - 0xa], 1
jne 0x409ee2
cmp dword [ebp - 0xa0], 4
jne 0x409ecb
push str.Workstation_4.0
jmp 0x409f61
test byte [ebp - 0xb], 2
je 0x409edb
push str.Home_Edition
jmp 0x409f61
push str.Professional
jmp 0x409f61
cmp byte [ebp - 0xa], 3
jne 0x40a059
cmp dword [ebp - 0xa0], esi
jne 0x409f56
cmp dword [ebp - 0x9c], 2
jne 0x409f2d
test byte [ebp - 0xc], 0x80
je 0x409f0a
push str.Datacenter_Edition
jmp 0x409f61
test byte [ebp - 0xc], 2
je 0x409f17
push str.Enterprise_Edition
jmp 0x409f61
cmp word [ebp - 0xc], 0x400
jne 0x409f26
push str.Web_Edition
jmp 0x409f61
push str.Standard_Edition
jmp 0x409f61
cmp dword [ebp - 0x9c], eax
jne 0x409f56
test byte [ebp - 0xc], 0x80
je 0x409f42
push str.Datacenter_Server
jmp 0x409f61
test byte [ebp - 0xc], 2
je 0x409f4f
push str.Advanced_Server
jmp 0x409f61
push str.Server
jmp 0x409f61
test byte [ebp - 0xc], 2
je 0x409f6e
push str.Server_4.0__Enterprise_Edition
push edi
call fcn.0040bb70
pop ecx
pop ecx
jmp 0x40a059
push str.Server_4.0
jmp 0x409f61
push 0x50
lea ecx, [ebp - 8]
pop esi
push ecx
push 1
push eax
push str.SYSTEMCurrentControlSetControlProductOptions
push 0x80000002
mov dword [ebp + 8], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40a150
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0xf4]
push eax
push 0
push 0
push str.ProductType
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40a150
cmp dword [ebp + 8], esi
ja 0x40a150
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
lea eax, [ebp - 0xf4]
push eax
push str.WINNT
call esi
test eax, eax
jne 0x409ff6
push str.Workstation
push edi
call fcn.0040bb70
pop ecx
pop ecx
lea eax, [ebp - 0xf4]
push eax
push str.LANMANNT
call esi
test eax, eax
jne 0x40a015
push str.Server
push edi
call fcn.0040bb70
pop ecx
pop ecx
lea eax, [ebp - 0xf4]
push eax
push str.SERVERNT
call esi
test eax, eax
jne 0x40a034
push str.Advanced_Server
push edi
call fcn.0040bb70
pop ecx
pop ecx
push dword [ebp - 0x9c]
push dword [ebp - 0xa0]
push str._d._d
push dword [ebp - 4]
call fcn.0040ba39
push dword [ebp - 4]
push edi
call fcn.0040bb70
add esp, 0x18
cmp dword [ebp - 0xa0], 4
jne 0x40a11f
lea eax, [ebp - 0x90]
push str.Service_Pack_6
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiA]
test eax, eax
jne 0x40a11f
lea eax, [ebp + 8]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
mov eax, dword [ebp - 0x98]
jne 0x40a0c3
and eax, 0xffff
push eax
push str.Service_Pack_6a__Build__d_
push dword [ebp - 4]
call fcn.0040ba39
push dword [ebp - 4]
push edi
call fcn.0040bb70
add esp, 0x14
jmp 0x40a0e9
and eax, 0xffff
push eax
lea eax, [ebp - 0x90]
push eax
push str._s__Build__d_
push dword [ebp - 4]
call fcn.0040ba39
push dword [ebp - 4]
push edi
call fcn.0040bb70
add esp, 0x18
push str.advapi32.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x40a204
push 0x41bdc0
push esi
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
je 0x40a113
push dword [ebp + 8]
call eax
push esi
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
jmp 0x40a204
mov eax, dword [ebp - 0x98]
and eax, 0xffff
push eax
lea eax, [ebp - 0x90]
push eax
push str._s__Build__d_
push dword [ebp - 4]
call fcn.0040ba39
push dword [ebp - 4]
push edi
call fcn.0040bb70
add esp, 0x18
jmp 0x40a204
push ebx
push edi
call fcn.0040bb60
push dword [ebp - 4]
call fcn.0040c7ac
add esp, 0xc
jmp 0x40a20d
cmp dword [ebp - 0xa0], 4
jne 0x40a204
cmp dword [ebp - 0x9c], 0
jne 0x40a1b2
push str.Microsoft_Windows_95
push edi
call fcn.0040bb70
cmp byte [ebp - 0x8f], 0x43
pop ecx
pop ecx
je 0x40a19c
cmp byte [ebp - 0x8f], 0x42
jne 0x40a1a9
push str.OSR2
push edi
call fcn.0040bb70
pop ecx
pop ecx
cmp dword [ebp - 0xa0], 4
jne 0x40a204
cmp dword [ebp - 0x9c], 0xa
jne 0x40a1e7
push str.Microsoft_Windows_98
push edi
call fcn.0040bb70
cmp byte [ebp - 0x8f], 0x41
pop ecx
pop ecx
jne 0x40a1de
push 0x41bd84
push edi
call fcn.0040bb70
pop ecx
pop ecx
cmp dword [ebp - 0xa0], 4
jne 0x40a204
cmp dword [ebp - 0x9c], 0x5a
jne 0x40a204
push str.Microsoft_Windows_Millennium_Edition
jmp 0x40a1fc
push str.Microsoft_Win32s
push edi
call fcn.0040bb70
pop ecx
pop ecx
push dword [ebp - 4]
call fcn.0040c7ac
pop ecx
pop edi
pop esi
pop ebx
leave
ret