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

Disassembly:
push 0xffffffffffffffff
push 0x469e8b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1b4
push ebx
push ebp
push esi
push edi
push 0x48e488
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], 0
call fcn.0045dd36
mov ebx, 1
push 0x48e488
lea ecx, [esp + 0x14]
mov dword [esp + 0x1d0], ebx
call fcn.0045dd36
push 0x48e488
lea ecx, [esp + 0x1c]
mov byte [esp + 0x1d0], 2
call fcn.0045dd36
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, 0x27
xor eax, eax
lea edi, [esp + 0x28]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x28]
mov byte [esp + 0x1cc], 3
push eax
mov dword [esp + 0x2c], 0x9c
call esi
mov edi, eax
test edi, edi
jne 0x40fe44
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], 0x94
push ecx
call esi
test eax, eax
jne 0x40fe44
mov esi, dword [esp + 0x1d4]
push 0x48e488
mov ecx, esi
call fcn.0045dd36
mov dword [esp + 0x1c], ebx
jmp 0x410242
mov eax, dword [esp + 0x38]
sub eax, 0
je 0x410201
dec eax
je 0x41017c
dec eax
jne 0x41020f
mov eax, dword [esp + 0x2c]
mov esi, 5
cmp eax, esi
jne 0x40feb7
cmp dword [esp + 0x30], 2
jne 0x40fe87
push str.WIN2003_family
lea ecx, [esp + 0x18]
call fcn.0045de51
cmp dword [esp + 0x2c], esi
jne 0x40feb7
cmp dword [esp + 0x30], ebx
jne 0x40fea1
push str.WINXP
lea ecx, [esp + 0x18]
call fcn.0045de51
cmp dword [esp + 0x2c], esi
jne 0x40feb7
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x40fecc
push str.WIN2000
lea ecx, [esp + 0x18]
call fcn.0045de51
cmp dword [esp + 0x2c], 4
ja 0x40fecc
push str.WINNT
lea ecx, [esp + 0x18]
call fcn.0045de51
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test edi, edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
je 0x40ffb9
mov al, byte [esp + 0xc2]
cmp al, bl
jne 0x40ff1c
cmp dword [esp + 0x2c], 4
jne 0x40fefc
push str.Workstation_4.0
jmp 0x410082
mov eax, dword [esp + 0xc0]
test ah, 2
je 0x40ff12
push str.Home_Edition
jmp 0x410082
push str.Professional
jmp 0x410082
cmp al, 3
jne 0x41008b
cmp dword [esp + 0x2c], esi
jne 0x40ff9b
mov eax, dword [esp + 0x30]
cmp eax, 2
jne 0x40ff70
mov eax, dword [esp + 0xc0]
test al, 0x80
je 0x40ff48
push str.Datacenter_Edition
jmp 0x410082
test al, 2
je 0x40ff56
push str.Enterprise_Edition
jmp 0x410082
cmp ax, 0x400
jne 0x40ff66
push str.Web_Edition
jmp 0x410082
push str.Standard_Edition
jmp 0x410082
test eax, eax
jne 0x40ff9b
mov al, byte [esp + 0xc0]
test al, 0x80
je 0x40ff89
push str.Datacenter_Server
jmp 0x410082
test al, 2
jne 0x41007d
push str.Server
jmp 0x410082
test byte [esp + 0xc0], 2
je 0x40ffaf
push str.Server_4.0__Enterprise_Edition
jmp 0x410082
push str.Server_4.0
jmp 0x410082
lea edx, [esp + 0x20]
mov esi, 0xff
push edx
push ebx
push 0
push str.SYSTEMCurrentControlSetControlProductOptions
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x38], esi
call edi
test eax, eax
je 0x40fff2
mov esi, dword [esp + 0x1d4]
push 0x48e488
mov ecx, esi
call fcn.0045dd36
jmp 0x41023e
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x24]
lea ecx, [esp + 0xc4]
push eax
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40ffda
cmp dword [esp + 0x24], esi
ja 0x40ffda
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0xc4]
push ecx
push 0x487b98
call ebp
test eax, eax
jne 0x410049
push str.Workstation
lea ecx, [esp + 0x14]
call fcn.0045de51
lea edx, [esp + 0xc4]
push edx
push str.LANMANNT
call ebp
test eax, eax
jne 0x41006a
push str.Server
lea ecx, [esp + 0x14]
call fcn.0045de51
lea eax, [esp + 0xc4]
push eax
push str.SERVERNT
call ebp
test eax, eax
jne 0x41008b
push str.Advanced_Server
lea ecx, [esp + 0x14]
call fcn.0045de51
cmp dword [esp + 0x2c], 4
jne 0x41013d
lea ecx, [esp + 0x3c]
push str.Service_Pack_6
push ecx
call ebp
test eax, eax
jne 0x41013d
lea edx, [esp + 0x20]
push edx
push ebx
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
jne 0x4100ed
mov eax, dword [esp + 0x34]
lea ecx, [esp + 0x18]
and eax, 0xffff
push eax
push str.Service_Pack_6a__Build__d_
push ecx
call fcn.0045c3bf
mov edx, dword [esp + 0x2c]
add esp, 0xc
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x41020f
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
and edx, 0xffff
push edx
push eax
lea edx, [esp + 0x44]
push ecx
push edx
lea eax, [esp + 0xd4]
push str._s__Build__d._d._d_
push eax
call fcn.0043ac7e
add esp, 0x18
lea ecx, [esp + 0xc4]
push ecx
lea ecx, [esp + 0x1c]
call fcn.0045de51
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x41020f
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x2c]
and eax, 0xffff
push eax
push ecx
lea eax, [esp + 0x44]
push edx
push eax
lea ecx, [esp + 0xd4]
push str._s_Build:_d._d._d
push ecx
call fcn.0043ac7e
add esp, 0x18
lea edx, [esp + 0xc4]
lea ecx, [esp + 0x18]
push edx
jmp 0x41020a
mov eax, dword [esp + 0x2c]
mov esi, 4
cmp eax, esi
jne 0x41020f
mov eax, dword [esp + 0x30]
test eax, eax
jne 0x4101c3
push str.WIN95
lea ecx, [esp + 0x18]
call fcn.0045de51
mov al, byte [esp + 0x3d]
cmp al, 0x43
je 0x4101af
cmp al, 0x42
jne 0x4101bd
push str.OSR2
lea ecx, [esp + 0x18]
call fcn.0045de51
cmp dword [esp + 0x2c], esi
jne 0x41020f
cmp dword [esp + 0x30], 0xa
jne 0x4101f3
push str.WIN98
lea ecx, [esp + 0x18]
call fcn.0045de51
cmp byte [esp + 0x3d], 0x41
jne 0x4101ed
push 0x487ab0
lea ecx, [esp + 0x18]
call fcn.0045de51
cmp dword [esp + 0x2c], esi
jne 0x41020f
cmp dword [esp + 0x30], 0x5a
jne 0x41020f
push str.MS_Millennium_Edition
jmp 0x410206
push str.Microsoft_Win32s
lea ecx, [esp + 0x18]
call fcn.0045de51
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
call fcn.0045e0e0
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x18]
call fcn.0045e0e0
mov esi, dword [esp + 0x1d4]
lea edx, [esp + 0x14]
push edx
mov ecx, esi
call fcn.0045da3d
mov dword [esp + 0x1c], ebx
lea ecx, [esp + 0x18]
mov byte [esp + 0x1cc], 2
call fcn.0045dcc8
lea ecx, [esp + 0x10]
mov byte [esp + 0x1cc], bl
call fcn.0045dcc8
lea ecx, [esp + 0x14]
mov byte [esp + 0x1cc], 0
call fcn.0045dcc8
mov ecx, dword [esp + 0x1c4]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c0
ret