Function at 0x407460
Capabilities:
Check os version
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4f7b06
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x5370e4]
xor eax, esp
mov dword [esp + 0x78], eax
push ebx
push esi
push edi
mov eax, dword [0x5370e4]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
xor esi, esi
mov ebx, ecx
mov edi, edx
mov dword [esp + 0x30], 0xf
mov dword [esp + 0x2c], esi
mov byte [esp + 0x1c], 0
mov dword [esp + 0x98], esi
mov edx, dword [edi + 4]
cmp edx, esi
jbe 0x407893
xor eax, eax
cmp dword [ebx + 0x70], esi
jne 0x407505
push 0x5255b3
push 1
call fcn.00410730
push esi
push 8
xor eax, eax
mov ecx, ebx
call fcn.00410730
add esp, 0x10
cmp dword [esp + 0x30], 0x10
jb 0x407893
mov eax, dword [esp + 0x1c]
push eax
call fcn.0041ef45
add esp, 4
jmp 0x407893
mov ecx, dword [edi]
push ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
call fcn.00417b60
mov esi, eax
add esp, 4
test esi, esi
jne 0x40756c
push 0x5255b3
push 1
mov ecx, ebx
call fcn.00410730
push esi
push 8
xor eax, eax
mov ecx, ebx
call fcn.00410730
add esp, 0x10
cmp dword [esp + 0x30], 0x10
jb 0x407893
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0041ef45
add esp, 4
jmp 0x407893
push str.init
call fcn.00402880
cmp dword [eax + 4], 5
je 0x407583
mov eax, 0x5255b3
jmp 0x407586
mov eax, dword [eax + 0xc]
mov ecx, str.get_versions
jmp 0x407590
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4075b0
test dl, dl
je 0x4075ac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4075b0
add eax, 2
add ecx, 2
test dl, dl
jne 0x407590
xor eax, eax
jmp 0x4075b5
sbb eax, eax
sbb eax, 0xffffffff
push esi
test eax, eax
jne 0x407777
call fcn.00418ee0
add esp, 4
push 0xffffffffffffffff
push 0
lea ecx, [esp + 0x20]
call fcn.00402210
mov edx, dword [edi + 4]
mov eax, dword [edi]
push edx
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x34], esp
push eax
call fcn.00401c20
sub esp, 0x1c
mov ecx, esp
mov dword [esp + 0x4c], esp
push 0x544f0c
mov byte [esp + 0xd8], 1
call fcn.00405780
lea ecx, [esp + 0xa8]
push ecx
mov byte [esp + 0xd8], 0
call fcn.004070e0
add esp, 0x40
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0xa4], 2
call fcn.00401e70
lea ecx, [esp + 0x6c]
mov byte [esp + 0x98], 0
call fcn.00401c60
cmp dword [esp + 0x2c], 0
jne 0x40766e
push 0x5255b3
push 1
xor eax, eax
mov ecx, ebx
call fcn.00410730
push 0
push 8
xor eax, eax
mov ecx, ebx
call fcn.00410730
add esp, 0x10
jmp 0x40788a
mov eax, dword [ebx + 0x70]
add eax, 0x6c
push eax
lea ecx, [esp + 0x54]
call fcn.00405780
mov byte [esp + 0x98], 3
cmp dword [esp + 0x30], 0x10
mov ecx, dword [esp + 0x1c]
jae 0x407695
lea ecx, [esp + 0x1c]
mov edx, dword [esp + 0x2c]
push edx
lea esi, [esp + 0x38]
call fcn.00405750
mov byte [esp + 0x98], 4
cmp dword [edi + 4], 2
jne 0x4076d3
push 0
push 8
xor eax, eax
mov ecx, ebx
call fcn.00410730
add esp, 8
lea ecx, [esp + 0x34]
call fcn.00401c60
lea ecx, [esp + 0x50]
jmp 0x407885
cmp dword [esp + 0x30], 0x10
mov eax, dword [esp + 0x1c]
jae 0x4076e2
lea eax, [esp + 0x1c]
mov edx, dword [esp + 0x2c]
push eax
call fcn.004055f0
add esp, 4
test al, al
je 0x4076c1
mov edi, dword [ebx + 0x70]
lea eax, [edi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [edi + 8]
mov eax, dword [esi + 0x1c]
inc eax
cmp dword [esi + 0x14], eax
ja 0x407713
mov ebx, esi
call fcn.00408b90
mov ebx, dword [esi + 0x18]
add ebx, dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
cmp eax, ebx
ja 0x407722
sub ebx, eax
mov ecx, dword [esi + 0x10]
cmp dword [ecx + ebx*4], 0
jne 0x40773b
mov ecx, 1
call fcn.00408e80
mov edx, dword [esi + 0x10]
mov dword [edx + ebx*4], eax
mov ecx, dword [esi + 0x10]
mov ecx, dword [ecx + ebx*4]
lea eax, [esp + 0x18]
push eax
call fcn.00408ee0
inc dword [esi + 0x1c]
add esp, 4
lea eax, [edi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [edi + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [esp + 0x34]
call fcn.00401c60
lea ecx, [esp + 0x50]
jmp 0x407885
call fcn.00418ee0
mov eax, dword [ebx + 0x70]
add esp, 4
test eax, eax
je 0x407649
add eax, 0x6c
push eax
lea ecx, [esp + 0x38]
call fcn.00405780
mov byte [esp + 0x98], 5
mov eax, dword [edi + 4]
mov ecx, dword [edi]
push eax
lea esi, [esp + 0x54]
call fcn.00405750
mov byte [esp + 0x98], 6
mov edx, dword [edi + 4]
cmp edx, 2
jne 0x4077d3
push 0
push 8
xor eax, eax
mov ecx, ebx
call fcn.00410730
add esp, 8
jmp 0x407878
mov ecx, dword [edi]
push ecx
call fcn.004055f0
add esp, 4
test al, al
je 0x407878
mov edx, dword [edi + 4]
mov ecx, dword [edi]
push edx
lea esi, [esp + 0x70]
call fcn.00405750
mov byte [esp + 0x98], 7
mov edi, dword [ebx + 0x70]
lea eax, [edi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [edi + 8]
mov eax, dword [esi + 0x1c]
inc eax
cmp dword [esi + 0x14], eax
ja 0x40781d
mov ebx, esi
call fcn.00408b90
mov ebx, dword [esi + 0x18]
add ebx, dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
cmp eax, ebx
ja 0x40782c
sub ebx, eax
mov ecx, dword [esi + 0x10]
cmp dword [ecx + ebx*4], 0
jne 0x407845
mov ecx, 1
call fcn.00408e80
mov edx, dword [esi + 0x10]
mov dword [edx + ebx*4], eax
mov ecx, dword [esi + 0x10]
mov ecx, dword [ecx + ebx*4]
lea eax, [esp + 0x6c]
push eax
call fcn.00408ee0
inc dword [esi + 0x1c]
add esp, 4
lea eax, [edi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [edi + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_SetEvent]
lea ecx, [esp + 0x6c]
call fcn.00401c60
lea ecx, [esp + 0x50]
call fcn.00401c60
lea ecx, [esp + 0x34]
call fcn.00401c60
lea ecx, [esp + 0x18]
call fcn.00401c60
xor eax, eax
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00428ddf
mov esp, ebp
pop ebp
ret