Function at 0x405b87
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
mov eax, 0x100b4
call fcn.004035b0
push ebx
push esi
push edi
push 0xffff
xor ebx, ebx
lea eax, [ebp - 0x1003c]
push ebx
push eax
mov esi, ecx
call fcn.00403f53
add esp, 0xc
lea ecx, [ebp - 0x1003c]
mov edx, esi
call fcn.00406104
mov edi, eax
push esi
mov byte [edi], bl
inc edi
push edi
call fcn.00403f9f
pop ecx
pop ecx
mov ecx, dword [0x40c014]
cmp byte [ecx], bl
je 0x405bf1
push 0x4011ec
push edi
call fcn.00403f81
push dword [0x40c014]
push edi
call fcn.00403f81
add esp, 0x10
push 0x44
pop esi
push esi
lea eax, [ebp - 0x3c]
push ebx
push eax
call fcn.00403f53
push 0x10
lea eax, [ebp + 0x60]
mov dword [ebp - 0x3c], esi
push ebx
push eax
call fcn.00403f53
add esp, 0x18
mov cl, 1
call fcn.00406028
call dword [sym.imp.KERNEL32.dll_GetVersion]
mov ebx, eax
call fcn.004061ec
test al, al
je 0x405c6b
lea eax, [ebp + 0x60]
xor esi, esi
push eax
lea eax, [ebp - 0x3c]
mov edx, edi
push eax
push dword [0x40c018]
lea ecx, [ebp - 0x1003c]
push esi
push esi
push esi
push esi
push esi
call fcn.004045a1
test eax, eax
jne 0x405cf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0x2e4
je 0x405c6b
cmp esi, 0x202b
jne 0x405ce9
push 0x3c
pop esi
push esi
lea eax, [ebp + 0x24]
push 0
push eax
call fcn.00403f53
mov dword [ebp + 0x24], esi
add esp, 0xc
xor esi, esi
mov dword [ebp + 0x28], 0x40
cmp byte [0x40c02d], 0
mov dword [ebp + 0x2c], esi
je 0x405ca7
cmp ebx, 0x80000000
jae 0x405ca7
mov eax, 0x4011f8
cmp bl, 6
jae 0x405cac
mov eax, 0x4011f0
mov dword [ebp + 0x30], eax
lea ecx, [ebp + 0x24]
lea eax, [ebp - 0x1003c]
mov dword [ebp + 0x40], 1
mov dword [ebp + 0x34], eax
mov eax, dword [0x40c014]
mov dword [ebp + 0x38], eax
mov eax, dword [0x40c018]
mov dword [ebp + 0x3c], eax
call fcn.0040497c
mov eax, dword [ebp + 0x5c]
mov dword [ebp + 0x60], eax
test eax, eax
jne 0x405cf5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
xor cl, cl
call fcn.00406028
jmp 0x405dc3
xor cl, cl
call fcn.00406028
mov eax, dword [ebp + 0x60]
mov dword [ebp + 0x70], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
lea edx, [ebp - 0x1003c]
mov ecx, eax
call fcn.00406136
lea eax, [ebp - 0x1003c]
push eax
push esi
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
xor ebx, ebx
mov dword [ebp + 0x74], eax
test eax, eax
setne bl
inc ebx
push 0x1cff
push 0xffffffffffffffff
push esi
lea eax, [ebp + 0x70]
push eax
push ebx
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp eax, ebx
jne 0x405d76
push 1
push esi
push esi
push esi
lea eax, [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_PeekMessageA]
cmp dword [ebp + 0xc], 0x12
je 0x405d62
cmp dword [ebp + 0xc], 0x10
jne 0x405d6a
mov ecx, dword [ebp + 0x60]
call fcn.004066f3
lea eax, [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x405d30
cmp ebx, 2
jne 0x405d8a
cmp eax, 1
jne 0x405d8a
mov ecx, dword [ebp + 0x60]
call fcn.004066f3
jmp 0x405d30
cmp dword [ebp + 0x74], 0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x405d9b
push dword [ebp + 0x74]
call esi
push 0x40c004
push dword [ebp + 0x60]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp + 0x60]
call esi
cmp dword [ebp + 0x64], 0
je 0x405db9
push dword [ebp + 0x64]
call esi
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebx
lea esp, [ebp + 0x78]
pop ebp
ret