Function at 0x414370
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
mov eax, dword [0x41f004]
xor eax, ebp
mov dword [ebp - 0x1c], eax
cmp dword [ebp + 8], 0
jne 0x41439b
push 0x2007000a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4145a7
cmp dword [ebp + 0xc], 0
jne 0x4143b3
push 0x2007000a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4145a7
cmp dword [ebp + 0x10], 0
jne 0x4143cb
push 0x2007000a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4145a7
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov dword [ebp - 0xc0], 0
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0xc0]
push edx
push 0
push 0
push 2
push 0
call sub.WINSPOOL.DRV_EnumPortsA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x414420
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x7a
je 0x414420
push 0x2007000c
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4145a7
mov eax, dword [ebp - 0xc0]
shl eax, 1
mov dword [ebp - 0xc0], eax
mov ecx, dword [ebp - 0xc0]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0xc0]
push ecx
mov edx, dword [ebp - 0x14]
push edx
push 2
push 0
call sub.WINSPOOL.DRV_EnumPortsA
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x41446b
cmp dword [ebp - 4], 0
jne 0x41448d
cmp dword [ebp - 0x14], 0
je 0x41447b
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x2007000c
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4145a7
push 0x94
push 0
lea ecx, [ebp - 0xb8]
push ecx
call fcn.00401740
add esp, 0xc
mov dword [ebp - 0xb8], 0x94
lea edx, [ebp - 0xb8]
push edx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
jne 0x4144e0
cmp dword [ebp - 0x14], 0
je 0x4144ce
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x2007000c
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4145a7
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0xb4], 4
jne 0x414552
cmp dword [ebp - 0xa8], 1
jne 0x414552
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call fcn.004141d0
add esp, 0x14
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00414030
add esp, 0x14
mov dword [ebp - 0xbc], eax
cmp dword [ebp - 8], 0
jne 0x414549
cmp dword [ebp - 0xbc], 0
je 0x414550
mov dword [ebp - 0xc], 1
jmp 0x414583
cmp dword [ebp - 0xb4], 5
jb 0x414583
cmp dword [ebp - 0xa8], 2
jne 0x414583
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.00413c80
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], 0
je 0x414593
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp dword [ebp - 0xc], 0
jne 0x4145a4
push 0x2007000c
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00401194
mov esp, ebp
pop ebp
ret