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

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x154
push esi
push edi
lea eax, [ebp - 0xdc]
push eax
mov dword [ebp - 0xdc], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
mov eax, dword [ebp - 0xd8]
mov dword [ebx], eax
mov eax, dword [ebp - 0xd4]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0xd0]
mov dword [ebx + 8], eax
lea eax, [ebp - 0xc8]
push eax
call fcn.004493b8
xor esi, esi
cmp eax, esi
pop ecx
jg 0x40ebce
mov word [ebx + 0xc], si
cmp dword [ebp - 0xcc], 2
mov byte [ebx + 0x20c], 0
mov byte [ebx + 0x20d], 0
mov byte [ebx + 0x220], 0
mov byte [ebx + 0x20e], 0
mov byte [ebx + 0x20f], 0
mov byte [ebx + 0x214], 0
mov byte [ebx + 0x215], 0
mov byte [ebx + 0x210], 0
mov byte [ebx + 0x211], 0
mov byte [ebx + 0x216], 0
mov byte [ebx + 0x217], 0
mov byte [ebx + 0x218], 0
mov byte [ebx + 0x219], 0
mov byte [ebx + 0x212], 0
mov byte [ebx + 0x213], 0
mov byte [ebx + 0x21c], 0
mov byte [ebx + 0x21d], 0
mov byte [ebx + 0x21a], 0
mov byte [ebx + 0x21b], 0
mov byte [ebx + 0x21e], 0
mov byte [ebx + 0x21f], 0
jne 0x40eca7
mov eax, dword [ebx]
sub eax, 4
mov byte [ebx + 0x20c], 1
je 0x40ec97
dec eax
je 0x40ec33
dec eax
jne 0x40ecfe
mov eax, dword [ebx + 4]
cmp eax, esi
mov byte [ebx + 0x20f], 1
jne 0x40ec01
mov byte [ebx + 0x215], 1
mov byte [ebx + 0x211], 1
mov byte [ebx + 0x219], 1
mov byte [ebx + 0x218], 1
jmp 0x40ecfe
lea ecx, [ebp + eax*2 - 0xc8]
cmp word [ecx], 0x20
jne 0x40ebd3
mov word [ecx], si
dec eax
cmp eax, esi
jg 0x40ebbe
xor ecx, ecx
cmp eax, esi
jle 0x40ebe9
cmp word [ebp + ecx*2 - 0xc8], 0x20
jne 0x40ebe9
inc ecx
cmp ecx, eax
jl 0x40ebd9
lea eax, [ebp + ecx*2 - 0xc8]
push eax
lea eax, [ebx + 0xc]
push eax
call fcn.00449154
pop ecx
pop ecx
jmp 0x40eacf
cmp eax, 1
jne 0x40ecfe
mov byte [ebx + 0x211], al
mov byte [ebx + 0x217], al
mov byte [ebx + 0x215], al
mov byte [ebx + 0x219], al
mov byte [ebx + 0x213], al
mov byte [ebx + 0x212], al
jmp 0x40ecfe
mov eax, dword [ebx + 4]
cmp eax, esi
mov byte [ebx + 0x20f], 1
jne 0x40ec54
mov byte [ebx + 0x215], 1
mov byte [ebx + 0x214], 1
jmp 0x40ecfe
cmp eax, 1
jne 0x40ec70
mov byte [ebx + 0x215], al
mov byte [ebx + 0x211], al
mov byte [ebx + 0x210], al
jmp 0x40ecfe
cmp eax, 2
jb 0x40ecfe
mov byte [ebx + 0x215], 1
mov byte [ebx + 0x211], 1
mov byte [ebx + 0x217], 1
mov byte [ebx + 0x216], 1
jmp 0x40ecfe
mov byte [ebx + 0x20f], 1
mov byte [ebx + 0x20e], 1
jmp 0x40ecfe
movzx eax, word [ebp - 0xd0]
mov dword [ebx + 8], eax
mov eax, dword [ebx + 4]
cmp eax, esi
mov byte [ebx + 0x20d], 1
mov byte [ebx + 0x21d], 1
je 0x40ecf7
cmp eax, 0xa
je 0x40ece7
cmp eax, 0x5a
jne 0x40ecfe
mov byte [ebx + 0x21b], 1
mov byte [ebx + 0x21f], 1
mov byte [ebx + 0x21e], 1
jmp 0x40ecfe
mov byte [ebx + 0x21b], 1
mov byte [ebx + 0x21a], 1
jmp 0x40ecfe
mov byte [ebx + 0x21c], 1
lea eax, [ebp + 0x74]
push eax
mov dword [ebp + 0x5c], esi
mov dword [ebp + 0x64], esi
mov dword [ebp + 0x74], esi
call dword [sym.imp.KERNEL32.DLL_GetCurrentProcess]
push eax
lea eax, [ebp + 0x5c]
call fcn.0040edd4
call eax
cmp dword [ebp + 0x74], 1
jne 0x40ed29
mov byte [ebx + 0x220], 1
push 8
xor eax, eax
cmp byte [ebx + 0x220], al
pop ecx
lea edi, [ebp + 0x3c]
mov dword [ebp + 0x38], esi
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.DLL_FreeLibrary]
je 0x40ed86
mov dword [ebp + 0x68], esi
mov dword [ebp + 0x70], esi
lea esi, [ebp + 0x68]
call fcn.0040ee00
cmp dword [ebp + 0x70], 0
je 0x40ed65
lea eax, [ebp + 0x38]
push eax
mov eax, esi
call fcn.0040edea
call eax
cmp dword [ebp + 0x68], 0
je 0x40ed70
push dword [ebp + 0x68]
call edi
xor esi, esi
mov eax, dword [ebp + 0x38]
cmp ax, si
jne 0x40ed92
mov dword [ebx + 0x224], 1
jmp 0x40edc1
lea eax, [ebp + 0x38]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
jmp 0x40ed72
cmp ax, 6
jne 0x40eda4
mov dword [ebx + 0x224], 2
jmp 0x40edc1
cmp ax, 9
jne 0x40edb6
mov dword [ebx + 0x224], 3
jmp 0x40edc1
movzx eax, ax
neg eax
mov dword [ebx + 0x224], eax
cmp dword [ebp + 0x5c], esi
je 0x40edcb
push dword [ebp + 0x5c]
call edi
pop edi
mov eax, ebx
pop esi
add ebp, 0x78
leave
ret