Function at 0x405370
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14c
mov eax, dword [0x40c004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push edi
push 0
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x13c], 0
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x130], 0
call dword [sym.imp.KERNEL32.dll_SetThreadUILanguage]
push 0x114
lea eax, [ebp - 0x118]
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x118], 0x114
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x405416
mov eax, dword [ebp - 0x114]
cmp eax, 6
ja 0x405411
jne 0x405416
cmp dword [ebp - 0x110], 1
jb 0x405416
call fcn.00406b40
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0x148]
mov dword [ebp - 0x128], 0xffffffff
push eax
lea eax, [ebp - 0x13c]
mov dword [ebp - 0x134], 0xffffffff
push eax
lea eax, [ebp - 0x140]
mov dword [ebp - 0x124], 0xffffffff
push eax
lea eax, [ebp - 0x138]
mov dword [ebp - 0x140], 0xffffffff
push eax
lea eax, [ebp - 0x124]
mov dword [ebp - 0x148], 0xffffffff
push eax
lea eax, [ebp - 0x134]
mov dword [ebp - 0x144], 0xffffffff
push eax
lea eax, [ebp - 0x128]
mov edx, ebx
push eax
lea eax, [ebp - 0x12c]
push eax
call fcn.00406640
mov edi, eax
test edi, edi
jne 0x40562c
call fcn.00406b00
test al, al
mov eax, dword [ebp - 0x128]
jne 0x408339
cmp eax, 2
je 0x408369
cmp eax, 4
jne 0x4054d0
mov dword [ebp - 0x128], 3
mov ebx, dword [ebp - 0x124]
cmp ebx, 0xffffffff
jne 0x40564b
mov byte [ebp - 0x119], 1
push esi
lea eax, [ebp - 0x130]
push eax
push ecx
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x134]
lea edx, [ebp - 0x128]
lea ecx, [ebp - 0x12c]
call fcn.004061d0
mov esi, dword [ebp - 0x130]
mov edi, eax
test edi, edi
jne 0x405683
cmp dword [ebp - 0x144], 0xffffffff
jne 0x405657
xor cl, cl
or esi, 0xffffffff
cmp ebx, esi
jg 0x40565e
mov eax, dword [ebp - 0x148]
cmp eax, esi
jg 0x405665
mov eax, dword [ebp - 0x140]
cmp eax, esi
jg 0x40566c
mov edi, dword [ebp - 0x128]
inc esi
mov byte [ebp - 0x124], 0
cmp edi, 1
je 0x40558b
cmp edi, 2
je 0x405673
mov eax, dword [ebp + 8]
sub eax, esi
test cl, cl
jne 0x408378
cmp eax, 1
jle 0x408387
mov byte [ebp - 0x124], cl
cmp edi, 2
je 0x405673
mov edi, 3
mov ebx, dword [ebp - 0x138]
test ebx, ebx
jne 0x40839a
mov ebx, dword [ebp - 0x120]
mov dword [ebp - 0x120], 0
mov ecx, dword [ebp - 0x12c]
push edi
push ebx
call fcn.004056b0
mov edi, eax
test edi, edi
jne 0x40567d
push dword [ebp - 0x14c]
push dword [ebp + 8]
push esi
push dword [ebp - 0x124]
mov esi, dword [ebp - 0x130]
push ecx
push esi
push ebx
push dword [ebp - 0x13c]
mov ebx, dword [ebp - 0x12c]
mov ecx, ebx
call fcn.00405b50
mov edi, eax
mov eax, dword [ebp - 0x120]
test eax, eax
jne 0x40568e
test esi, esi
je 0x405618
push esi
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
cmp byte [ebp - 0x119], 0
pop esi
je 0x40562c
push ebx
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
mov eax, dword [0x40c414]
test eax, eax
jne 0x4083b8
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop ebx
call fcn.00407980
mov esp, ebp
pop ebp
ret
mov byte [ebp - 0x119], 0
jmp 0x4054e6
mov cl, 1
jmp 0x40552c
mov esi, ebx
jmp 0x405537
mov esi, eax
jmp 0x405545
mov esi, eax
jmp 0x405553
mov edi, 1
jmp 0x405599
mov esi, dword [ebp - 0x130]
mov ebx, dword [ebp - 0x12c]
jmp 0x4055fc
push eax
call dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
add esp, 4
jmp 0x40560a
cmp eax, 1
je 0x408347
cmp eax, 2
jne 0x4054c1
fld qword [0x405358]
sub esp, 8
mov edi, 0x23
fstp qword [esp]
push eax
push edi
push 0
call fcn.0040948b
add esp, 0x14
jmp 0x40562c
mov dword [ebp - 0x128], 1
jmp 0x4054d0
cmp eax, 2
setle byte [ebp - 0x124]
jmp 0x40558b
call fcn.00409644
test al, al
sete byte [ebp - 0x124]
jmp 0x40558b
push ebx
push 0x24
push 0
call fcn.0040948b
mov eax, dword [ebp - 0x120]
add esp, 0xc
mov dword [ebp - 0x120], eax
jmp 0x4055b7
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x405639