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

Disassembly:
sub esp, 0x1dc
push ebx
push esi
push edi
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x401f3a
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x1dc
ret
mov eax, dword [esp + 0x24]
sub eax, 0
je 0x4022d0
dec eax
je 0x4021da
dec eax
je 0x401f5e
pop edi
pop esi
or eax, 0xffffffff
pop ebx
add esp, 0x1dc
ret
mov eax, dword [esp + 0x18]
mov ebx, 4
cmp eax, ebx
ja 0x401f80
lea ecx, [esp + 0x148]
push str.Microsoft_Windows_NT
push ecx
call fcn.00411870
add esp, 8
mov eax, dword [esp + 0x18]
mov esi, 5
cmp eax, esi
jne 0x401ff2
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x401fb2
lea edx, [esp + 0x148]
push str.Microsoft_Windows_2000
push edx
call fcn.00411870
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, esi
jne 0x401ff2
cmp dword [esp + 0x1c], 1
jne 0x401fd6
lea eax, [esp + 0x148]
push str.Microsoft_Windows_XP
push eax
call fcn.00411870
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, esi
jne 0x401ff2
cmp dword [esp + 0x1c], 2
jne 0x402016
lea ecx, [esp + 0x148]
push str.Microsoft_Windows_Server_2003
push ecx
call fcn.00411870
add esp, 8
cmp dword [esp + 0x18], 6
jne 0x402016
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x402016
lea edx, [esp + 0x148]
push str.Microsoft_Windows_Vista_or_Microsoft_Windows_Server__Longhorn_
push edx
call fcn.00411870
add esp, 8
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea eax, [esp + 0xc]
push eax
push 1
push 0
mov edi, 0x50
push str.SystemCurrentControlSetControlProductOptions
push 0x80000002
mov dword [esp + 0x24], edi
call esi
test eax, eax
je 0x40204d
pop edi
pop esi
mov eax, 2
pop ebx
add esp, 0x1dc
ret
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x198]
push ecx
push edx
push 0
push 0
push str.ProductType
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4021cb
cmp dword [esp + 0x10], edi
ja 0x4021cb
mov ecx, dword [esp + 0xc]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ecx
call edi
lea edx, [esp + 0x198]
push str.WinNT
push edx
call fcn.004180e0
add esp, 8
test eax, eax
jne 0x4020ad
push str.Workstation
jmp 0x4020da
lea ecx, [esp + 0x198]
push str.ServerNT
push ecx
call fcn.004180e0
add esp, 8
test eax, eax
jne 0x4020d5
lea edx, [esp + 0xf8]
push str.Server
push edx
jmp 0x4020e2
push str.Advanced_Server
lea eax, [esp + 0xfc]
push eax
call fcn.00411870
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, ebx
jne 0x40217a
lea ecx, [esp + 0x28]
push str.Service_Pack_6
push ecx
call fcn.004180e0
add esp, 8
test eax, eax
jne 0x40217a
lea edx, [esp + 0xc]
push edx
push 1
push eax
push str.SoftwareMicrosoftWindows_NTCurrentVersion_t_t_t_t_t_t___________HotfixQ246009
push 0x80000002
call esi
test eax, eax
jne 0x40214c
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0xa8]
and eax, 0xffff
push eax
push str.Service_Pack_6a__Build__d_
push ecx
call fcn.00411870
mov edx, dword [esp + 0x18]
add esp, 0xc
push edx
call edi
jmp 0x40219e
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x28]
and edx, 0xffff
lea ecx, [esp + 0xa8]
push edx
push eax
push str._s__Build__d_
push ecx
call fcn.00411870
mov edx, dword [esp + 0x1c]
add esp, 0x10
push edx
call edi
jmp 0x40219e
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x28]
and eax, 0xffff
lea edx, [esp + 0xa8]
push eax
push ecx
push str._s__Build__d_
push edx
call fcn.00411870
add esp, 0x10
lea eax, [esp + 0xa8]
lea ecx, [esp + 0xf8]
push eax
mov eax, dword [esp + 0x1f0]
lea edx, [esp + 0x14c]
push ecx
push edx
push str._s_s_s
push eax
call fcn.00411870
add esp, 0x14
pop edi
pop esi
mov eax, 2
pop ebx
add esp, 0x1dc
ret
mov eax, dword [esp + 0x18]
mov ebx, 4
cmp eax, ebx
jne 0x40229c
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x40222f
lea ecx, [esp + 0xa8]
push str.Microsoft_Windows_95
push ecx
call fcn.00411870
mov al, byte [esp + 0x31]
add esp, 8
cmp al, 0x43
je 0x402214
cmp al, 0x42
jne 0x402229
lea edx, [esp + 0xf8]
push str.OSR2
push edx
call fcn.00411870
add esp, 8
cmp dword [esp + 0x18], ebx
jne 0x40229c
cmp dword [esp + 0x1c], 0xa
jne 0x40226e
lea eax, [esp + 0xa8]
push str.Microsoft_Windows_98
push eax
call fcn.00411870
mov al, byte [esp + 0x31]
add esp, 8
cmp al, 0x41
jne 0x402268
lea ecx, [esp + 0xf8]
push 0x41c074
push ecx
call fcn.00411870
add esp, 8
cmp dword [esp + 0x18], ebx
jne 0x40229c
cmp dword [esp + 0x1c], 0x5a
jne 0x40229c
lea edx, [esp + 0xa8]
push str.Microsoft_Windows_Millennium_Edition
push edx
call fcn.00411870
lea eax, [esp + 0x100]
push str.OSR2
push eax
call fcn.00411870
add esp, 0x10
mov eax, dword [esp + 0x1ec]
lea ecx, [esp + 0xf8]
lea edx, [esp + 0xa8]
push ecx
push edx
push 0x41c044
push eax
call fcn.00411870
add esp, 0x10
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x1dc
ret
mov edi, str.Microsoft_Win32s
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x1ec]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x1dc
ret