Function at 0x406910
Capabilities:
Check os version

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push edi
test ebp, ebp
je 0x406be8
mov edi, dword [esp + 0xb4]
test edi, edi
je 0x406be8
mov eax, dword [esp + 0xb8]
test eax, eax
je 0x406be8
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 0x406be8
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 0x406aea
cmp dword [esp + 0x14], 4
jne 0x406bd8
mov eax, dword [esp + 0x10]
cmp eax, 0xa
jae 0x406a49
cmp esi, 0x3b6
jne 0x4069f8
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 0x406a20
cmp esi, 0x438
ja 0x406a28
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 0x406a46
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 0x406ac3
cmp esi, 0x7ce
jne 0x406a71
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 0x406a99
cmp esi, 0x887
jae 0x406aa5
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 0x406bd8
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 0x406bd8
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 0x406bc5
mov eax, dword [esp + 0x14]
cmp eax, 3
jne 0x406b25
cmp dword [esp + 0x10], 0x33
jne 0x406bd8
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 0x406b54
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x406bd8
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 0x406bd8
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x406b7f
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 0x406ba2
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 0x406bd8
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 0x406bd8
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