Function at 0x5b2700
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x667280
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa38
mov eax, dword [0x700724]
mov edx, dword [eax + 0xc]
push ebx
push esi
push edi
xor edi, edi
mov ecx, 0x700724
mov dword [ebp - 0x14], edi
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
push 0x67fdf0
lea ecx, [ebp - 0x1c]
call fcn.0040aab0
mov ebx, 2
mov byte [ebp - 4], bl
push 1
push 0x1a
lea eax, [ebp - 0x244]
push eax
push edi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x5b2790
mov ecx, dword [ebp - 0x1c]
push str.ports.dat
push ecx
lea edx, [ebp - 0x244]
push edx
lea eax, [ebp - 0x10]
push 0x66ef48
push eax
call fcn.00405ab0
add esp, 0x14
jmp 0x5b280c
call fcn.005bc840
push edi
lea ecx, [ebp - 0x38]
push ecx
mov ecx, eax
call fcn.005bcb20
mov byte [ebp - 4], 3
cmp dword [ebp - 0x24], 8
jb 0x5b27b8
mov eax, dword [ebp - 0x38]
mov edx, eax
cmp eax, edi
jne 0x5b27bb
xor eax, eax
jmp 0x5b27ce
lea edx, [ebp - 0x38]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, ebx
cmp cx, di
jne 0x5b27c0
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x10]
call fcn.00401710
push 0xa
push 0x6797b8
lea ecx, [ebp - 0x10]
call fcn.00401710
mov byte [ebp - 4], bl
cmp dword [ebp - 0x24], 8
jb 0x5b27fc
mov edx, dword [ebp - 0x38]
push edx
call fcn.0060faf6
add esp, 4
xor eax, eax
mov dword [ebp - 0x24], 7
mov dword [ebp - 0x28], edi
mov word [ebp - 0x38], ax
mov ecx, dword [ebp - 0x10]
push edi
push 0x80
push 4
push edi
push edi
push connect
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea edx, [edi + 2]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0
mov ebx, eax
lea eax, [ebp - 0x3c]
push eax
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x18]
push ecx
push 0x400
lea edx, [ebp - 0xa44]
push edx
push ebx
mov dword [ebp - 0x18], ebx
call fcn.005b2320
add esp, 0x10
test eax, eax
je 0x5b2918
mov edi, dword [ebp + 8]
xor eax, eax
cmp word [ebp - 0xa44], ax
je 0x5b28f4
lea ecx, [ebp - 0xa44]
cmp word [ecx], 0x3a
je 0x5b28af
inc eax
cmp word [ebp + eax*2 - 0xa44], 0
lea ecx, [ebp + eax*2 - 0xa44]
jne 0x5b2894
jmp 0x5b28f4
lea edx, [ebp + eax*2 - 0xa42]
xor ecx, ecx
push edx
mov word [ebp + eax*2 - 0xa44], cx
call fcn.006115b5
movzx esi, ax
xor eax, eax
add esp, 4
test si, si
setne al
mov dword [ebp - 0x14], esi
test eax, eax
je 0x5b28f4
lea eax, [ebp - 0xa44]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x5b291b
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x18]
push ecx
push 0x400
lea edx, [ebp - 0xa44]
push edx
push eax
call fcn.005b2320
add esp, 0x10
test eax, eax
jne 0x5b2883
mov esi, dword [ebp - 0x14]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5b294e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5b2974
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
pop edi
mov ax, si
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret