Function at 0x4060ec
Capabilities:
Check os version
Get system information on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1ec
mov eax, dword [0x5a5fb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
push 9
pop ecx
mov dword [ebp - 0x1c4], eax
xor eax, eax
mov esi, 0x11c
push esi
lea edi, [ebp - 0x1ec]
push eax
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x1c0]
push eax
call fcn.005237f0
add esp, 0xc
lea eax, [ebp - 0x1c0]
push eax
mov dword [ebp - 0x1c0], esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x40614b
xor al, al
jmp 0x40655b
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push ebx
push str.GetNativeSystemInfo
push 0x57df50
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
test eax, eax
je 0x406176
lea ecx, [ebp - 0x1ec]
push ecx
call eax
jmp 0x406183
lea eax, [ebp - 0x1ec]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [ebp - 0x1b0], 2
jne 0x40654d
cmp dword [ebp - 0x1bc], 4
jbe 0x40654d
mov ecx, dword [ebp - 0x1c4]
push str.Microsoft
mov edx, SysReAllocString
mov eax, 0x104
call fcn.004060a8
cmp dword [ebp - 0x1bc], 6
jne case.0x406269.5
cmp dword [ebp - 0x1b8], 0
jne 0x4061ed
cmp byte [ebp - 0xa6], 1
mov edi, dword [ebp - 0x1c4]
jne 0x4061e3
push str.Windows_Vista
jmp 0x4061e8
push str.Windows_Server_2008
call fcn.0040600f
cmp dword [ebp - 0x1b8], 1
jne 0x406216
cmp byte [ebp - 0xa6], 1
mov edi, dword [ebp - 0x1c4]
jne 0x40620c
push str.Windows_7
jmp 0x406211
push str.Windows_Server_2008_R2
call fcn.0040600f
push str.GetProductInfo
push str.kernel32.dll
call esi
push eax
call ebx
lea ecx, [ebp - 0x1c8]
push ecx
movzx ecx, word [ebp - 0xaa]
push ecx
movzx ecx, word [ebp - 0xac]
push ecx
push dword [ebp - 0x1b8]
push dword [ebp - 0x1bc]
call eax
mov eax, dword [ebp - 0x1c8]
cmp eax, 0x19
ja 0x4062e7
je 0x4062e0
dec eax
cmp eax, 0x11
ja case.0x406269.5
jmp dword [eax*4 + 0x40656c]
push str.Ultimate_Edition
jmp 0x4062f1
push str.Home_Premium_Edition
jmp 0x4062f1
push str.Home_Basic_Edition
jmp 0x4062f1
push 0x57e0d8
jmp 0x4062f1
push str.Business_Edition
jmp 0x4062f1
push str.Starter_Edition
jmp 0x4062f1
push str.Cluster_Server_Edition
jmp 0x4062f1
push 0x57e174
jmp 0x4062f1
push str.Datacenter_Edition__core_installation_
jmp 0x4062f1
push 0x57e218
jmp 0x4062f1
push str.Enterprise_Edition__core_installation_
jmp 0x4062f1
push 0x57e290
jmp 0x4062f1
push str.Small_Business_Server
jmp 0x4062f1
push 0x57e2ec
jmp 0x4062f1
push str.Standard_Edition__core_installation_
jmp 0x4062f1
push str.Web_Server_Edition
jmp 0x4062f1
push str.Small_Business_Server_Premium_Edition
jmp 0x4062f1
cmp eax, 0x30
jne case.0x406269.5
push 0x57e068
mov edi, dword [ebp - 0x1c4]
call fcn.0040600f
cmp dword [ebp - 0x1bc], 5
jne 0x4064bc
cmp dword [ebp - 0x1b8], 2
jne 0x406430
test dword [ebp - 0xa8], 0x2000
je 0x406329
push str.Windows_Storage_Server_2003
jmp 0x40635b
test dword [ebp - 0xa8], 0x8000
je 0x40633c
push str.Windows_Home_Server
jmp 0x40635b
cmp byte [ebp - 0xa6], 1
jne 0x406356
cmp word [ebp - 0x1ec], 9
jne 0x406356
push str.Windows_XP_Professional_x64_Edition
jmp 0x40635b
push str.Windows_Server_2003_
mov edi, dword [ebp - 0x1c4]
call fcn.0040600f
cmp byte [ebp - 0xa6], 1
je 0x406423
cmp word [ebp - 0x1ec], 6
jne 0x4063a4
test byte [ebp - 0xa8], 0x80
je 0x406390
push str.Datacenter_Edition_for_Itanium_based_Systems
jmp 0x406418
test byte [ebp - 0xa8], 2
je 0x406423
push str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x406418
cmp word [ebp - 0x1ec], 9
jne 0x4063db
test byte [ebp - 0xa8], 0x80
je 0x4063be
push str.Datacenter_x64_Edition
jmp 0x406418
test byte [ebp - 0xa8], 2
mov edi, dword [ebp - 0x1c4]
je 0x4063d4
push str.Enterprise_x64_Edition
jmp 0x40641e
push str.Standard_x64_Edition
jmp 0x40641e
mov eax, dword [ebp - 0xa8]
test eax, 0x4000
je 0x4063ef
push str.Compute_Cluster_Edition
jmp 0x406418
test al, al
jns 0x4063fa
push str.Datacenter_Edition
jmp 0x406418
test al, 2
je 0x406405
push str.Enterprise_Edition
jmp 0x406418
test eax, 0x400
je 0x406413
push str.Web_Edition
jmp 0x406418
push str.Standard_Edition
mov edi, dword [ebp - 0x1c4]
call fcn.0040600f
cmp dword [ebp - 0x1bc], 5
jne 0x4064bc
cmp dword [ebp - 0x1b8], 1
mov edi, dword [ebp - 0x1c4]
jne 0x40646f
push str.Windows_XP
call fcn.0040600f
test dword [ebp - 0xa8], 0x200
je 0x40645c
push str.Home_Edition
jmp 0x406461
push 0x57e6d8
call fcn.0040600f
cmp dword [ebp - 0x1bc], 5
jne 0x4064bc
cmp dword [ebp - 0x1b8], 0
jne 0x4064bc
push str.Windows_2000
call fcn.0040600f
cmp byte [ebp - 0xa6], 1
jne 0x406492
push str.Professional
jmp 0x4064b7
test byte [ebp - 0xa8], 0x80
je 0x4064a2
push str.Datacenter_Server
jmp 0x4064b7
test byte [ebp - 0xa8], 2
je 0x4064b2
push str.Advanced_Server
jmp 0x4064b7
push str.Server
call fcn.0040600f
lea eax, [ebp - 0x1ac]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4064c5
sub eax, edx
sar eax, 1
je 0x4064f2
mov edi, dword [ebp - 0x1c4]
push 0x57e780
call fcn.0040600f
lea eax, [ebp - 0x1ac]
push eax
call fcn.0040600f
push dword [ebp - 0x1b4]
lea edi, [ebp - 0xa4]
push 0x57e784
push 0x50
pop ecx
call fcn.00406059
pop ecx
mov eax, edi
mov edi, dword [ebp - 0x1c4]
pop ecx
push eax
call fcn.0040600f
cmp dword [ebp - 0x1bc], 6
jb 0x406549
cmp word [ebp - 0x1ec], 9
jne 0x406535
push str.__64_bit
jmp 0x406544
cmp word [ebp - 0x1ec], 0
jne 0x406549
push str.__32_bit
call fcn.0040600f
mov al, 1
jmp 0x40655a
push str.One_does_not_simply_support_this_version_of_Windows._n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0051f4ef
leave
ret