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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52e0fb
mov eax, dword fs:[0]
push eax
sub esp, 0x250
mov eax, dword [0x58e188]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x25c]
push eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
push 0x11c
lea ecx, [ebp - 0x230]
push 0
push ecx
call fcn.00515860
add esp, 0xc
lea edx, [ebp - 0x230]
push edx
mov dword [ebp - 0x230], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x220]
sub eax, 2
jne 0x40e700
mov eax, dword [ebp - 0x22c]
cmp eax, 6
jne 0x40e686
mov eax, dword [ebp - 0x228]
test eax, eax
jne 0x40e631
cmp byte [ebp - 0x116], 1
jne 0x40e61a
push str.Microsoft_Windows_Vista
lea ecx, [edi + 0x114]
call fcn.00402150
cmp byte [ebp - 0x116], 3
jne 0x40e710
push str.Microsoft_Windows_Server_2008
jmp 0x40e705
cmp eax, 1
jne 0x40e676
cmp byte [ebp - 0x116], al
jne 0x40e65f
cmp word [ebp - 0x25c], 9
lea ecx, [edi + 0x114]
jne 0x40e655
push str.Microsoft_Windows_7_x64
jmp 0x40e65a
push str.Microsoft_Windows_7
call fcn.00402150
cmp byte [ebp - 0x116], 3
jne 0x40e710
push str.Microsoft_Windows_Server_2008_R2
jmp 0x40e705
cmp eax, 2
jne 0x40e700
push str.Microsoft_Windows_8
jmp 0x40e705
cmp eax, 5
jne 0x40e6eb
mov eax, dword [ebp - 0x228]
test eax, eax
jne 0x40e69c
push str.Microsoft_Windows_Server_2000
jmp 0x40e705
cmp eax, 1
jne 0x40e6a8
push str.Microsoft_Windows_XP
jmp 0x40e705
cmp eax, 2
jne 0x40e700
cmp byte [ebp - 0x116], 1
jne 0x40e6c7
cmp word [ebp - 0x25c], 9
jne 0x40e6c7
push str.Microsoft_Windows_XP_Professional_x64_Edition
jmp 0x40e705
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x59
call esi
test eax, eax
jne 0x40e6dc
push str.Microsoft_Windows_Server_2003
jmp 0x40e705
push 0x59
call esi
test eax, eax
je 0x40e710
push str.Microsoft_Windows_Server_2003_R2
jmp 0x40e705
cmp eax, 4
jne 0x40e700
cmp dword [ebp - 0x228], 0
jne 0x40e700
push str.Microsoft_Windows_NT
jmp 0x40e705
push str.Microsoft_Windows_Unknown
lea ecx, [edi + 0x114]
call fcn.00402150
call fcn.0041b722
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40e72a
push 0x80004005
call fcn.00401040
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x234], eax
mov eax, dword [edi + 0x114]
lea ecx, [ebp - 0x234]
push ecx
push ecx
sub eax, 0x10
mov dword [ebp - 0x238], esp
mov esi, esp
push eax
mov dword [ebp - 4], 0
call fcn.00402000
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00406aa0
mov edx, dword [ebp - 0x234]
push edx
lea eax, [ebp - 0x114]
push str.System_Version___s_
push eax
call fcn.00402df0
lea ecx, [ebp - 0x114]
push ecx
call fcn.0040d9d0
mov eax, dword [ebp - 0x234]
add eax, 0xfffffff0
add esp, 0x18
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40e7bf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00514c0e
mov esp, ebp
pop ebp
ret