Function at 0x404006
Capabilities:
Check os version
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ec
mov eax, dword [0x430090]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
push edi
cmp dword [0x4311e8], ebx
je 0x40405f
mov esi, 0x4311f0
mov ecx, esi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x404033
sub ecx, edi
sar ecx, 1
je 0x4045c6
test edx, edx
je 0x4045c6
push esi
push dword [ebp + 0xc]
push edx
call fcn.00413334
jmp 0x4045bb
push 9
pop eax
mov ecx, eax
lea edi, [ebp - 0xcc]
xor eax, eax
push 0x118
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x1e4]
push ebx
push eax
call fcn.0040d070
add esp, 0xc
mov dword [ebp - 0x1e8], 0x11c
lea eax, [ebp - 0x1e8]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4045c6
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov edi, eax
test edi, edi
je 0x4045c6
push str.GetNativeSystemInfo
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
lea eax, [ebp - 0xcc]
push eax
test esi, esi
je 0x4040dc
mov ecx, esi
call dword [0x4242a4]
call esi
jmp 0x4040e2
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [ebp - 0x1d8], 2
jne 0x4045c0
cmp dword [ebp - 0x1e4], 4
jbe 0x4045c0
push str.Microsoft
push 0x100
mov esi, 0x4311f0
push esi
call fcn.00413334
imul eax, dword [ebp - 0x1e4], 0xa
add esp, 0xc
push 6
add eax, dword [ebp - 0x1e0]
cmp dword [ebp - 0x1e4], 0xa
mov dword [0x4311e8], eax
pop eax
jne 0x40416e
cmp dword [ebp - 0x1e0], ebx
jne 0x404521
cmp byte [ebp - 0xce], 1
mov ecx, str.Windows_Server_2016
mov eax, str.Windows_10
cmovne eax, ecx
push eax
push 0x100
push esi
call fcn.004132bf
add esp, 0xc
mov dword [0x4311e8], 0x64
push 6
pop eax
cmp dword [ebp - 0x1e4], eax
jne case.0x4042a5.5
cmp dword [ebp - 0x1e0], ebx
jne 0x4041af
cmp byte [ebp - 0xce], 1
mov ecx, str.Windows_Server_2008
mov eax, str.Windows_Vista
cmovne eax, ecx
push eax
push 0x100
push esi
call fcn.004132bf
add esp, 0xc
mov dword [0x4311e8], 0x3c
cmp dword [ebp - 0x1e0], 1
jne 0x4041e5
cmp byte [ebp - 0xce], 1
mov ecx, str.Windows_Server_2008_R2
mov eax, str.Windows_7
cmovne eax, ecx
push eax
push 0x100
push esi
call fcn.004132bf
add esp, 0xc
mov dword [0x4311e8], 0x3d
cmp dword [ebp - 0x1e0], 2
jne 0x40421b
cmp byte [ebp - 0xce], 1
mov ecx, str.Windows_Server_2012
mov eax, str.Windows_8
cmovne eax, ecx
push eax
push 0x100
push esi
call fcn.004132bf
add esp, 0xc
mov dword [0x4311e8], 0x3e
cmp dword [ebp - 0x1e0], 3
jne 0x404251
cmp byte [ebp - 0xce], 1
mov ecx, str.Windows_Server_2012_R2
mov eax, str.Windows_8.1
cmovne eax, ecx
push eax
push 0x100
push esi
call fcn.004132bf
add esp, 0xc
mov dword [0x4311e8], 0x3f
push str.GetProductInfo
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x4045c6
lea eax, [ebp - 0xa8]
mov ecx, edi
push eax
push ebx
push ebx
push dword [ebp - 0x1e0]
push dword [ebp - 0x1e4]
call dword [0x4242a4]
call edi
mov eax, dword [ebp - 0xa8]
cmp eax, 0x19
ja 0x40432e
je 0x404327
dec eax
cmp eax, 0x11
ja case.0x4042a5.5
jmp dword [eax*4 + 0x4045da]
push str.Ultimate_Edition
mov edi, 0x100
push edi
push esi
call fcn.004132bf
add esp, 0xc
jmp 0x404347
push str.Home_Premium_Edition
jmp 0x4042b1
push str.Home_Basic_Edition
jmp 0x4042b1
push str.Business_Edition
jmp 0x4042b1
push str.Starter_Edition
jmp 0x4042b1
push str.Cluster_Server_Edition
jmp 0x4042b1
push str.Datacenter_Edition
jmp 0x4042b1
push str.Datacenter_Edition__core_installation_
jmp 0x4042b1
push str.Enterprise_Edition
jmp 0x4042b1
push str.Enterprise_Edition__core_installation_
jmp 0x4042b1
push str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x4042b1
push str.Small_Business_Server
jmp 0x4042b1
push str.Standard_Edition
jmp 0x4042b1
push str.Standard_Edition__core_installation_
jmp 0x4042b1
push str.Web_Server_Edition
jmp 0x4042b1
push str.Small_Business_Server_Premium_Edition
jmp 0x4042b1
mov edi, 0x100
cmp eax, 0x30
jne 0x404347
push str.Professional
jmp 0x4042b6
mov edi, 0x100
cmp dword [ebp - 0x1e4], 5
jne 0x404521
cmp dword [ebp - 0x1e0], 2
jne 0x40448b
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x404374
mov eax, str.Windows_Server_2003_R2_
jmp 0x4043b9
test dword [ebp - 0xd0], 0x2000
je 0x404387
mov eax, str.Windows_Storage_Server_2003
jmp 0x4043b9
test dword [ebp - 0xd0], 0x8000
je 0x40439a
mov eax, str.Windows_Home_Server
jmp 0x4043b9
cmp byte [ebp - 0xce], 1
jne 0x4043b4
push 9
pop eax
cmp word [ebp - 0xcc], ax
mov eax, str.Windows_XP_Professional_x64_Edition
je 0x4043b9
mov eax, str.Windows_Server_2003_
push eax
push edi
push esi
call fcn.004132bf
add esp, 0xc
cmp byte [ebp - 0xce], 1
je 0x40447e
push 6
pop eax
cmp word [ebp - 0xcc], ax
jne 0x404404
test byte [ebp - 0xd0], 0x80
je 0x4043f0
push str.Datacenter_Edition_for_Itanium_based_Systems
jmp 0x404474
test byte [ebp - 0xd0], 2
je 0x40447e
push str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x404474
push 9
pop eax
cmp word [ebp - 0xcc], ax
jne 0x404437
test byte [ebp - 0xd0], 0x80
je 0x404420
mov eax, str.Datacenter_x64_Edition
jmp 0x404434
test byte [ebp - 0xd0], 2
mov eax, str.Enterprise_x64_Edition
mov ecx, str.Standard_x64_Edition
cmove eax, ecx
push eax
jmp 0x404474
mov eax, dword [ebp - 0xd0]
test eax, 0x4000
je 0x40444b
push str.Compute_Cluster_Edition
jmp 0x404474
test al, al
jns 0x404456
push str.Datacenter_Edition
jmp 0x404474
test al, 2
je 0x404461
push str.Enterprise_Edition
jmp 0x404474
test eax, 0x400
je 0x40446f
push str.Web_Edition
jmp 0x404474
push str.Standard_Edition
push edi
push esi
call fcn.004132bf
add esp, 0xc
cmp dword [ebp - 0x1e4], 5
jne 0x404521
cmp dword [ebp - 0x1e0], 1
jne 0x4044cb
push str.Windows_XP
push edi
push esi
call fcn.004132bf
test dword [ebp - 0xd0], 0x200
mov ecx, str.Home_Edition
mov eax, str.Professional
cmovne eax, ecx
push eax
push edi
push esi
call fcn.004132bf
add esp, 0x18
cmp dword [ebp - 0x1e4], 5
jne 0x404521
cmp dword [ebp - 0x1e0], ebx
jne 0x404521
push str.Windows_2000
push edi
push esi
call fcn.004132bf
add esp, 0xc
cmp byte [ebp - 0xce], 1
jne 0x4044f2
push str.Professional
jmp 0x404517
test byte [ebp - 0xd0], 0x80
je 0x404502
push str.Datacenter_Server
jmp 0x404517
test byte [ebp - 0xd0], 2
je 0x404512
push str.Advanced_Server
jmp 0x404517
push str.Server
push edi
push esi
call fcn.004132bf
add esp, 0xc
lea ecx, [ebp - 0x1d4]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x40452a
sub ecx, edx
mov ebx, 0x100
sar ecx, 1
je 0x40455d
push 0x42568c
push ebx
push esi
call fcn.004132bf
lea eax, [ebp - 0x1d4]
push eax
push ebx
push esi
call fcn.004132bf
add esp, 0x18
push dword [ebp - 0x1dc]
lea eax, [ebp - 0xa4]
push 0x425690
push 0x50
push eax
call fcn.00404867
lea eax, [ebp - 0xa4]
push eax
push ebx
push esi
call fcn.004132bf
add esp, 0x1c
push 6
pop eax
cmp dword [ebp - 0x1e4], eax
jb 0x4045c6
push 9
pop eax
cmp word [ebp - 0xcc], ax
jne 0x4045a5
push str.__64_bit
jmp 0x4045b4
cmp word [ebp - 0xcc], 0
jne 0x4045c6
push str.__32_bit
push ebx
push esi
call fcn.004132bf
add esp, 0xc
jmp 0x4045c6
mov dword [0x4311e8], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [0x4311e8]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0040b168
leave
ret