Function at 0x40e960
Capabilities:
Check os version

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push edi
test ebp, ebp
je 0x40ec38
mov edi, dword [esp + 0xb4]
test edi, edi
je 0x40ec38
mov eax, dword [esp + 0xb8]
test eax, eax
je 0x40ec38
mov ebx, dword [sym.imp.KERNEL32.DLL_lstrcpyA]
push str.unknown_Windows_version
push ebp
call ebx
lea eax, [esp + 0x18]
mov dword [edi], 0
push eax
mov dword [esp + 0x1c], 0x94
call dword [sym.imp.KERNEL32.DLL_GetVersionExA]
test eax, eax
je 0x40ec38
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0xb8]
push esi
mov esi, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
mov ecx, dword [esp + 0x20]
and esi, 0xffff
push esi
push eax
push ecx
push str._u._u._u
push edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [esp + 0x2c]
add esp, 0x14
cmp eax, 1
jne 0x40eb3a
cmp dword [esp + 0x14], 4
jne 0x40ec28
mov eax, dword [esp + 0x10]
cmp eax, 0xa
jae 0x40ea99
cmp esi, 0x3b6
jne 0x40ea48
push str.Windows_95
push ebp
call ebx
mov dword [edi], 1
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
jbe 0x40ea70
cmp esi, 0x438
ja 0x40ea78
push str.Windows_95_SP1
push ebp
call ebx
mov dword [edi], 2
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp esi, 0x438
jbe 0x40ea96
push str.Windows_95_OSR2
push ebp
call ebx
mov dword [edi], 3
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp eax, 0xa
jne 0x40eb13
cmp esi, 0x7ce
jne 0x40eac1
push str.Windows_98
push ebp
call ebx
mov dword [edi], 4
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
jbe 0x40eae9
cmp esi, 0x887
jae 0x40eaf5
push str.Windows_98_SP1
push ebp
call ebx
mov dword [edi], 5
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp esi, 0x887
jb 0x40ec28
push str.Windows_98_SE
push ebp
call ebx
mov dword [edi], 6
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp eax, 0x5a
jne 0x40ec28
push str.Windows_ME
push ebp
call ebx
mov dword [edi], 7
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp eax, 2
jne 0x40ec15
mov eax, dword [esp + 0x14]
cmp eax, 3
jne 0x40eb75
cmp dword [esp + 0x10], 0x33
jne 0x40ec28
push str.Windows_NT_3.51
push ebp
call ebx
mov dword [edi], 0x65
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp eax, 4
jne 0x40eba4
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40ec28
push str.Windows_NT_4
push ebp
call ebx
mov dword [edi], 0x66
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp eax, 5
jne 0x40ec28
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x40ebcf
push str.Windows_2000
push ebp
call ebx
mov dword [edi], 0x67
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp eax, 1
jne 0x40ebf2
push str.Windows_XP
push ebp
call ebx
mov dword [edi], 0x68
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp eax, 2
jne 0x40ec28
push str.Windows_2003_Server
push ebp
call ebx
mov dword [edi], 0x69
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
cmp eax, 3
jne 0x40ec28
push str.Windows_CE
push ebp
call ebx
mov dword [edi], 0xc9
pop esi
pop edi
pop ebp
mov eax, 1
pop ebx
add esp, 0xa0
ret
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0xa0
ret