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 0x4022b1
dec eax
je 0x4021b8
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.00411c30
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.00411c30
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.00411c30
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, esi
jne 0x401ff2
cmp dword [esp + 0x1c], 2
jne 0x401ff2
lea ecx, [esp + 0x148]
push str.Microsoft_Windows_Server_2003
push ecx
call fcn.00411c30
add esp, 8
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
lea edx, [esp + 0xc]
push edx
push 1
push 0
mov edi, 0x50
push str.SystemCurrentControlSetControlProductOptions
push 0x80000002
mov dword [esp + 0x24], edi
call esi
test eax, eax
je 0x402029
pop edi
pop esi
mov eax, 2
pop ebx
add esp, 0x1dc
ret
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x198]
push eax
push ecx
push 0
push 0
push str.ProductType
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4021a9
cmp dword [esp + 0x10], edi
ja 0x4021a9
mov eax, dword [esp + 0xc]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call edi
lea ecx, [esp + 0x198]
push str.WinNT
push ecx
call fcn.00419110
add esp, 8
test eax, eax
jne 0x402089
push str.Workstation
jmp 0x4020b6
lea eax, [esp + 0x198]
push str.ServerNT
push eax
call fcn.00419110
add esp, 8
test eax, eax
jne 0x4020b1
lea ecx, [esp + 0xf8]
push str.Server
push ecx
jmp 0x4020be
push str.Advanced_Server
lea edx, [esp + 0xfc]
push edx
call fcn.00411c30
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, ebx
jne 0x402157
lea eax, [esp + 0x28]
push str.Service_Pack_6
push eax
call fcn.00419110
add esp, 8
test eax, eax
jne 0x402157
lea ecx, [esp + 0xc]
push ecx
push 1
push eax
push str.SoftwareMicrosoftWindows_NTCurrentVersion_t_t_t_t_t_t___________HotfixQ246009
push 0x80000002
call esi
test eax, eax
jne 0x402129
mov edx, dword [esp + 0x20]
lea eax, [esp + 0xa8]
and edx, 0xffff
push edx
push str.Service_Pack_6a__Build__d_
push eax
call fcn.00411c30
mov ecx, dword [esp + 0x18]
add esp, 0xc
push ecx
call edi
jmp 0x40217c
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x28]
and ecx, 0xffff
lea eax, [esp + 0xa8]
push ecx
push edx
push str._s__Build__d_
push eax
call fcn.00411c30
mov ecx, dword [esp + 0x1c]
add esp, 0x10
push ecx
call edi
jmp 0x40217c
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.00411c30
add esp, 0x10
lea edx, [esp + 0xa8]
lea eax, [esp + 0xf8]
push edx
mov edx, dword [esp + 0x1f0]
lea ecx, [esp + 0x14c]
push eax
push ecx
push str._s_s_s
push edx
call fcn.00411c30
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 0x40227d
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x40220d
lea eax, [esp + 0xa8]
push str.Microsoft_Windows_95
push eax
call fcn.00411c30
mov al, byte [esp + 0x31]
add esp, 8
cmp al, 0x43
je 0x4021f2
cmp al, 0x42
jne 0x402207
lea ecx, [esp + 0xf8]
push str.OSR2
push ecx
call fcn.00411c30
add esp, 8
cmp dword [esp + 0x18], ebx
jne 0x40227d
cmp dword [esp + 0x1c], 0xa
jne 0x40224c
lea edx, [esp + 0xa8]
push str.Microsoft_Windows_98
push edx
call fcn.00411c30
mov al, byte [esp + 0x31]
add esp, 8
cmp al, 0x41
jne 0x402246
lea eax, [esp + 0xf8]
push 0x41d078
push eax
call fcn.00411c30
add esp, 8
cmp dword [esp + 0x18], ebx
jne 0x40227d
cmp dword [esp + 0x1c], 0x5a
jne 0x40227d
lea ecx, [esp + 0xa8]
push str.Microsoft_Windows_Millennium_Edition
push ecx
call fcn.00411c30
add esp, 8
lea edx, [esp + 0xf8]
push str.OSR2
push edx
call fcn.00411c30
add esp, 8
mov edx, dword [esp + 0x1ec]
lea eax, [esp + 0xf8]
lea ecx, [esp + 0xa8]
push eax
push ecx
push 0x41d048
push edx
call fcn.00411c30
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 eax, ecx
mov esi, edi
mov edi, dword [esp + 0x1ec]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x1dc
ret