Function at 0x407c80
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x15c
mov eax, dword [0x40a00c]
xor eax, esp
mov dword [esp + reloc.ole32.dll_CoInitializeEx], eax
push ebx
xor ebx, ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push ebx
mov dword [esp + 0x48], edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_SetThreadUILanguage]
mov esi, 0x114
push esi
lea eax, [esp + 0x4c]
push ebx
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [esp + 0x48]
push eax
mov dword [esp + 0x4c], esi
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x407cff
cmp dword [esp + 0x4c], 6
ja 0x407cfa
jne 0x407cff
cmp dword [esp + 0x50], 1
jb 0x407cff
call fcn.00407bc7
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x2c]
push eax
or esi, reloc.ole32.dll_CoInitializeEx
lea eax, [esp + 0x40]
push eax
push edi
mov dword [esp + 0x38], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x44], esi
call fcn.00406ad0
mov edi, eax
test edi, edi
jne 0x407ef2
lea eax, [esp + 0x40]
push eax
push 0x20019
push ebx
push 0x401518
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407db3
push dword [esp + 0x40]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0x10], 1
je 0x407d91
cmp dword [esp + 0x10], 2
jne 0x407dc2
fld qword [0x404e98]
push 0x23
pop edi
push ecx
push ecx
fstp qword [esp]
push dword [esp + 0x18]
xor bl, bl
push edi
call fcn.0040616a
add esp, 0x10
jmp 0x407ef2
cmp dword [esp + 0x10], 2
jne 0x407dc2
mov dword [esp + 0x10], 1
cmp dword [esp + 0x14], esi
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x44]
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x30]
push eax
sete byte [esp + 0x2f]
call fcn.00405ebb
mov edi, eax
test edi, edi
jne 0x407ec4
cmp dword [esp + 0x1c], esi
setne al
cmp dword [esp + 0x14], esi
jle 0x407e03
mov esi, dword [esp + 0x14]
cmp dword [esp + 0x34], esi
jle 0x407e0d
mov esi, dword [esp + 0x34]
cmp dword [esp + 0x2c], esi
jle 0x407e17
mov esi, dword [esp + 0x2c]
xor edi, edi
inc edi
inc esi
mov byte [esp + 0x14], bl
cmp dword [esp + 0x10], edi
je 0x407e5a
cmp dword [esp + 0x10], 2
je 0x407e64
test al, al
mov eax, dword [ebp + 8]
je 0x407e3f
sub eax, esi
cmp eax, 2
setle byte [esp + 0x14]
jmp 0x407e5a
sub eax, esi
cmp eax, edi
jle 0x407e4b
mov byte [esp + 0x14], bl
jmp 0x407e5a
call fcn.004064ef
neg al
sbb al, al
inc al
mov byte [esp + 0x14], al
cmp dword [esp + 0x10], 2
je 0x407e64
push 3
pop edi
mov eax, dword [esp + 0x30]
mov dword [esp + 0x1c], eax
test eax, eax
jne 0x407e7a
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
jmp 0x407e8e
push eax
push 0x24
xor bl, bl
call fcn.0040616a
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
pop ecx
pop ecx
push edi
push eax
push dword [esp + 0x28]
call fcn.004075a4
mov edi, eax
test edi, edi
jne 0x407ec8
push dword [esp + 0x44]
push dword [ebp + 8]
push esi
push dword [esp + 0x20]
push dword [esp + 0x38]
push dword [esp + 0x30]
push dword [esp + 0x50]
push dword [esp + 0x3c]
call fcn.00406607
mov edi, eax
jmp 0x407ec8
mov ebx, dword [esp + 0x24]
mov esi, dword [sym.imp.msvcrt.dll____V_YAXPAX_Z]
test ebx, ebx
je 0x407ed6
push ebx
call esi
pop ecx
cmp dword [esp + 0x28], 0
je 0x407ee4
push dword [esp + 0x28]
call esi
pop ecx
cmp byte [esp + 0x1b], 0
je 0x407ef2
push dword [esp + 0x20]
call esi
pop ecx
mov eax, dword [0x40a430]
test eax, eax
je 0x407f02
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [esp + reloc.ole32.dll_CoInitializeEx]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00408e59
mov esp, ebp
pop ebp
ret