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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1e8
mov eax, dword [0x425014]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x118
xorps xmm0, xmm0
mov dword [ebp - 0x1c8], 0
lea eax, [ebp - 0x1bc]
push 0
push eax
movups xmmword [ebp - 0x1e8], xmm0
movups xmmword [ebp - 0x1d8], xmm0
call fcn.00407f20
add esp, 0xc
mov dword [ebp - 0x1c0], 0x11c
lea eax, [ebp - 0x1c0]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x1bc]
push str.GetNativeSystemInfo
push 0x422170
lea ecx, [eax + eax*4]
mov eax, dword [ebp - 0x1b8]
lea eax, [eax + ecx*2]
mov dword [0x65aa18], eax
movzx eax, word [ebp - 0xac]
lea ecx, [eax + eax*4]
movzx eax, word [ebp - 0xaa]
lea eax, [eax + ecx*2]
mov dword [0x65aa1c], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x405a11
lea ecx, [ebp - 0x1e8]
push ecx
call eax
jmp 0x405a1e
lea eax, [ebp - 0x1e8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [ebp - 0x1b0], 2
jne 0x405df1
cmp dword [ebp - 0x1bc], 4
jbe 0x405df1
push esi
mov ecx, 0x65a918
mov esi, str.Microsoft
mov edx, 0x80
sub esi, ecx
nop word [eax + eax]
lea eax, [edx + 0x7fffff7e]
test eax, eax
je 0x405a6e
movzx eax, word [esi + ecx]
test ax, ax
je 0x405a6e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x405a50
test edx, edx
lea eax, [ecx - 2]
pop esi
cmovne eax, ecx
xor ecx, ecx
cmp dword [ebp - 0x1bc], 6
mov word [eax], cx
jne case.0x405b15.5
cmp dword [ebp - 0x1b8], ecx
jne 0x405aab
cmp byte [ebp - 0xa6], 1
jne 0x405aa1
push 0x4221a4
jmp 0x405aa6
push 0x4221c4
call fcn.00405150
cmp dword [ebp - 0x1b8], 1
jne 0x405ace
cmp byte [ebp - 0xa6], 1
jne 0x405ac4
push 0x4221f0
jmp 0x405ac9
push 0x422208
call fcn.00405150
push str.GetProductInfo
push 0x422170
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
lea ecx, [ebp - 0x1c4]
push ecx
push 0
push 0
push dword [ebp - 0x1b8]
push dword [ebp - 0x1bc]
call eax
mov eax, dword [ebp - 0x1c4]
dec eax
cmp eax, 0x2f
ja case.0x405b15.5
movzx eax, byte [eax + 0x405e54]
jmp dword [eax*4 + 0x405e0c]
push str.Ultimate_Edition
jmp 0x405b91
push str.Professional
jmp 0x405b91
push str.Home_Premium_Edition
jmp 0x405b91
push str.Home_Basic_Edition
jmp 0x405b91
push str.Enterprise_Edition
jmp 0x405b91
push str.Business_Edition
jmp 0x405b91
push str.Starter_Edition
jmp 0x405b91
push str.Cluster_Server_Edition
jmp 0x405b91
push str.Datacenter_Edition
jmp 0x405b91
push str.Datacenter_Edition__core_installation_
jmp 0x405b91
push str.Enterprise_Edition__core_installation_
jmp 0x405b91
push str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x405b91
push str.Small_Business_Server
jmp 0x405b91
push str.Small_Business_Server_Premium_Edition
jmp 0x405b91
push str.Standard_Edition
jmp 0x405b91
push str.Standard_Edition__core_installation_
jmp 0x405b91
push str.Web_Server_Edition
call fcn.00405150
cmp dword [ebp - 0x1bc], 5
jne 0x405d38
mov eax, dword [ebp - 0x1b8]
cmp eax, 2
jne 0x405cb9
push 0x59
call dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
je 0x405bc5
push str.Windows_Server_2003_R2_
jmp 0x405c06
mov eax, dword [ebp - 0xa8]
test eax, 0x2000
je 0x405bd9
push str.Windows_Storage_Server_2003
jmp 0x405c06
test eax, 0x8000
je 0x405be7
push str.Windows_Home_Server
jmp 0x405c06
cmp byte [ebp - 0xa6], 1
jne 0x405c01
cmp word [ebp - 0x1e8], 9
jne 0x405c01
push str.Windows_XP_Professional_x64_Edition
jmp 0x405c06
push str.Windows_Server_2003_
call fcn.00405150
cmp byte [ebp - 0xa6], 1
je 0x405ca6
mov ax, word [ebp - 0x1e8]
cmp ax, 6
jne 0x405c41
mov eax, dword [ebp - 0xa8]
test al, al
jns 0x405c36
push str.Datacenter_Edition_for_Itanium_based_Systems
jmp 0x405ca1
test al, 2
je 0x405ca6
push str.Enterprise_Edition_for_Itanium_based_Systems
jmp 0x405ca1
cmp ax, 9
mov eax, dword [ebp - 0xa8]
jne 0x405c6a
test al, al
jns 0x405c58
push str.Datacenter_x64_Edition
jmp 0x405ca1
test al, 2
je 0x405c63
push str.Enterprise_x64_Edition
jmp 0x405ca1
push str.Standard_x64_Edition
jmp 0x405ca1
test eax, 0x4000
je 0x405c78
push str.Compute_Cluster_Edition
jmp 0x405ca1
test al, al
jns 0x405c83
push str.Datacenter_Edition
jmp 0x405ca1
test al, 2
je 0x405c8e
push str.Enterprise_Edition
jmp 0x405ca1
test eax, 0x400
je 0x405c9c
push str.Web_Edition
jmp 0x405ca1
push str.Standard_Edition
call fcn.00405150
cmp dword [ebp - 0x1bc], 5
jne 0x405d38
mov eax, dword [ebp - 0x1b8]
cmp eax, 1
jne 0x405cf4
push 0x4227e8
call fcn.00405150
test dword [ebp - 0xa8], 0x200
je 0x405cdb
push str.Home_Edition
jmp 0x405ce0
push str.Professional
call fcn.00405150
cmp dword [ebp - 0x1bc], 5
jne 0x405d38
mov eax, dword [ebp - 0x1b8]
test eax, eax
jne 0x405d38
push 0x42281c
call fcn.00405150
cmp byte [ebp - 0xa6], 1
jne 0x405d12
push str.Professional
jmp 0x405d33
mov eax, dword [ebp - 0xa8]
test al, al
jns 0x405d23
push str.Datacenter_Server
jmp 0x405d33
test al, 2
je 0x405d2e
push str.Advanced_Server
jmp 0x405d33
push str.Server
call fcn.00405150
mov ecx, 0x80
lea eax, [ebp - 0x1ac]
cmp word [eax], 0
je 0x405d51
add eax, 2
sub ecx, 1
jne 0x405d43
mov eax, 0x80
mov edx, ecx
sub eax, ecx
neg edx
sbb edx, edx
and edx, eax
test ecx, ecx
je 0x405d7e
test edx, edx
je 0x405d7e
push 0x42288c
call fcn.00405150
lea eax, [ebp - 0x1ac]
push eax
call fcn.00405150
push dword [ebp - 0x1b4]
lea eax, [ebp - 0xa4]
push 0x422890
push 0x50
push eax
call fcn.004051e0
add esp, 0x10
lea eax, [ebp - 0xa4]
push eax
call fcn.00405150
cmp dword [ebp - 0x1bc], 6
jb 0x405dfb
mov ax, word [ebp - 0x1e8]
cmp ax, 9
jne 0x405dd4
push str.__64_bit
call fcn.00405150
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004062aa
mov esp, ebp
pop ebp
ret
test ax, ax
jne 0x405dfb
push str.__32_bit
call fcn.00405150
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004062aa
mov esp, ebp
pop ebp
ret
push str.Unknown_Windows_edition.
call fcn.00405150
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004062aa
mov esp, ebp
pop ebp
ret