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

Disassembly:
push 0x150
mov eax, 0x526af3
call fcn.004fc737
mov eax, dword [ebp + 8]
mov esi, 0x11c
push esi
mov dword [ebp - 0x130], eax
lea eax, [ebp - 0x12c]
push 0
push eax
call fcn.004f18b0
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
add esp, 0xc
push str.RtlGetVersion
push str.ntdll.dll
mov dword [ebp - 0x12c], esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [ebp - 0x12c], esi
test eax, eax
je 0x40f0c5
lea ecx, [ebp - 0x12c]
push ecx
call eax
jmp 0x40f0f3
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0x12c]
push eax
call esi
test eax, eax
jne 0x40f0f3
lea eax, [ebp - 0x12c]
push eax
mov dword [ebp - 0x12c], 0x114
call esi
test eax, eax
je 0x40f5c1
push 0x24
lea eax, [ebp - 0x15c]
push 0
push eax
call fcn.004f18b0
add esp, 0xc
push 0x53bc60
push 0x53bc74
call edi
push eax
call ebx
test eax, eax
je 0x40f124
lea ecx, [ebp - 0x15c]
push ecx
call eax
jmp 0x40f131
lea eax, [ebp - 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [ebp - 0x11c], 2
jne 0x40f5c1
cmp dword [ebp - 0x128], 4
jb 0x40f5c1
cmp dword [ebp - 0x128], 0xa
mov esi, dword [ebp - 0x130]
jne 0x40f1bb
push str.Windows_10
push esi
call fcn.004056c8
push str.GetProductInfo
push 0x53bc74
call edi
push eax
call ebx
test eax, eax
je case.0x40f1b4.5
lea ecx, [ebp - 0x134]
push ecx
push 0
push 0
push dword [ebp - 0x124]
push dword [ebp - 0x128]
call eax
mov eax, dword [ebp - 0x134]
cmp eax, 0x19
ja 0x40f303
je 0x40f2f9
dec eax
cmp eax, 0x11
ja case.0x40f1b4.5
jmp dword [eax*4 + 0x40f5cc]
cmp dword [ebp - 0x128], 6
jne case.0x40f1b4.5
mov eax, dword [ebp - 0x124]
cmp eax, 3
jne 0x40f1ed
cmp byte [ebp - 0x12], 1
jne 0x40f1e3
push str.Windows_8.1
jmp 0x40f15f
push str.Windows_Server_2012_R2
jmp 0x40f15f
cmp eax, 2
jne 0x40f20c
cmp byte [ebp - 0x12], 1
jne 0x40f202
push str.Windows_8
jmp 0x40f15f
push str.Windows_Server_2012
jmp 0x40f15f
cmp eax, 1
jne 0x40f22a
cmp byte [ebp - 0x12], al
jne 0x40f220
push str.Windows_7
jmp 0x40f15f
push str.Windows_Server_2008_R2
jmp 0x40f15f
test eax, eax
jne 0x40f165
cmp byte [ebp - 0x12], 1
jne 0x40f242
push str.Windows_Vista
jmp 0x40f15f
push str.Windows_Server_2008
jmp 0x40f15f
push str.Ultimate_Edition
push esi
call fcn.00404758
cmp dword [ebp - 0x128], 5
jne 0x40f480
cmp dword [ebp - 0x124], 2
jne 0x40f3fe
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x40f316
push str.Windows_Server_2003_R2_
jmp 0x40f352
push str.Home_Premium_Edition
jmp 0x40f251
push str.Home_Basic_Edition
jmp 0x40f251
push str.Enterprise_Edition
jmp 0x40f251
push str.Business_Edition
jmp 0x40f251
push str.Starter_Edition
jmp 0x40f251
push str.Cluster_Server_Edition
jmp 0x40f251
push str.Datacenter_Edition
jmp 0x40f251
push str.Datacenter_Edition__core_installation_
jmp 0x40f251
push str.Enterprise_Edition__core_installation_
jmp 0x40f251
push str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x40f251
push str.Small_Business_Server
jmp 0x40f251
push str.Standard_Edition
jmp 0x40f251
push str.Standard_Edition__core_installation_
jmp 0x40f251
push str.Web_Server_Edition
jmp 0x40f251
push str.Small_Business_Server_Premium_Edition
jmp 0x40f251
cmp eax, 0x30
jne case.0x40f1b4.5
push str.Professional
jmp 0x40f251
test dword [ebp - 0x14], 0x2000
je 0x40f326
push str.Windows_Storage_Server_2003
jmp 0x40f352
test dword [ebp - 0x14], 0x8000
je 0x40f336
push str.Windows_Home_Server
jmp 0x40f352
cmp byte [ebp - 0x12], 1
jne 0x40f34d
cmp word [ebp - 0x15c], 9
jne 0x40f34d
push str.Windows_XP_Professional_x64_Edition
jmp 0x40f352
push str.Windows_Server_2003_
push esi
call fcn.00404758
cmp byte [ebp - 0x12], 1
je 0x40f3f1
cmp word [ebp - 0x15c], 6
jne 0x40f386
test byte [ebp - 0x14], 0x80
je 0x40f379
push str.Datacenter_Edition_for_Itanium_based_Systems
jmp 0x40f3eb
test byte [ebp - 0x14], 2
je 0x40f3f1
push str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x40f3eb
cmp word [ebp - 0x15c], 9
jne 0x40f3b1
test byte [ebp - 0x14], 0x80
je 0x40f39d
push str.Datacenter_x64_Edition
jmp 0x40f3eb
test byte [ebp - 0x14], 2
je 0x40f3aa
push str.Enterprise_x64_Edition
jmp 0x40f3eb
push str.Standard_x64_Edition
jmp 0x40f3eb
mov eax, dword [ebp - 0x14]
test eax, 0x4000
je 0x40f3c2
push str.Compute_Cluster_Edition
jmp 0x40f3eb
test al, al
jns 0x40f3cd
push str.Datacenter_Edition
jmp 0x40f3eb
test al, 2
je 0x40f3d8
push str.Enterprise_Edition
jmp 0x40f3eb
test eax, 0x400
je 0x40f3e6
push str.Web_Edition
jmp 0x40f3eb
push str.Standard_Edition
push esi
call fcn.00404758
cmp dword [ebp - 0x128], 5
jne 0x40f480
cmp dword [ebp - 0x124], 1
jne 0x40f436
push str.Windows_XP
push esi
call fcn.004056c8
test dword [ebp - 0x14], 0x200
je 0x40f422
push str.Home_Edition
jmp 0x40f427
push str.Professional
push esi
call fcn.00404758
cmp dword [ebp - 0x128], 5
jne 0x40f480
cmp dword [ebp - 0x124], 0
jne 0x40f55f
push str.Windows_2000
push esi
call fcn.004056c8
cmp byte [ebp - 0x12], 1
jne 0x40f45b
push str.Professional
jmp 0x40f47a
test byte [ebp - 0x14], 0x80
je 0x40f468
push str.Datacenter_Server
jmp 0x40f47a
test byte [ebp - 0x14], 2
je 0x40f475
push str.Advanced_Server
jmp 0x40f47a
push str.Server
push esi
call fcn.00404758
cmp dword [ebp - 0x128], 4
jne 0x40f55f
push str.Service_Pack_6
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
jne 0x40f55f
lea eax, [ebp - 0x138]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov eax, dword [0x590e04]
mov ecx, 0x590e04
jne 0x40f4fe
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x134], eax
and dword [ebp - 4], 0
movzx eax, word [ebp - 0x120]
push eax
lea eax, [ebp - 0x134]
push str.Service_Pack_6a__Build__d_
push eax
call fcn.0040450f
add esp, 0xc
jmp 0x40f534
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x134], eax
mov dword [ebp - 4], 1
movzx eax, word [ebp - 0x120]
push eax
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x134]
push str._s__Build__d_
push eax
call fcn.0040450f
add esp, 0x10
mov esi, dword [ebp - 0x134]
push dword [esi - 0xc]
mov eax, dword [ebp - 0x130]
push esi
call fcn.004046e5
lea eax, [esi - 0x10]
call fcn.00405521
push dword [ebp - 0x138]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40f5bc
mov eax, dword [0x590e04]
mov ecx, 0x590e04
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x134], eax
mov dword [ebp - 4], 2
movzx eax, word [ebp - 0x120]
push eax
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x134]
push str.__s__Build__d_
push eax
call fcn.0040450f
mov esi, dword [ebp - 0x134]
mov eax, dword [ebp - 0x130]
add esp, 0x10
push dword [esi - 0xc]
push esi
call fcn.004046e5
lea eax, [esi - 0x10]
call fcn.00405521
xor eax, eax
inc eax
jmp 0x40f5c3
xor eax, eax
call fcn.004fc7ba
ret