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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x594e70
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa38
mov eax, dword [0x5f5774]
mov edx, dword [eax + 0xc]
push ebx
push esi
push edi
xor edi, edi
mov ecx, 0x5f5774
mov dword [ebp - 0x14], edi
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 1
push 0x5a6ffc
lea ecx, [ebp - 0x1c]
call fcn.0040b4f0
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 0x4fb6d0
mov ecx, dword [ebp - 0x1c]
push str.ports.dat
push ecx
lea edx, [ebp - 0x244]
push edx
lea eax, [ebp - 0x10]
push str._s_s_s
push eax
call fcn.004060d0
add esp, 0x14
jmp 0x4fb74c
call fcn.005096c0
push edi
lea ecx, [ebp - 0x38]
push ecx
mov ecx, eax
call fcn.005099a0
mov byte [ebp - 4], 3
cmp dword [ebp - 0x24], 8
jb 0x4fb6f8
mov eax, dword [ebp - 0x38]
mov edx, eax
cmp eax, edi
jne 0x4fb6fb
xor eax, eax
jmp 0x4fb70e
lea edx, [ebp - 0x38]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, ebx
cmp cx, di
jne 0x4fb700
sub eax, esi
sar eax, 1
push eax
push edx
lea ecx, [ebp - 0x10]
call fcn.00406040
push 0xa
push 0x5a7050
lea ecx, [ebp - 0x10]
call fcn.00406040
mov byte [ebp - 4], bl
cmp dword [ebp - 0x24], 8
jb 0x4fb73c
mov edx, dword [ebp - 0x38]
push edx
call fcn.00553d26
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 bind
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.004fb260
add esp, 0x10
test eax, eax
je 0x4fb858
mov edi, dword [ebp + 8]
xor eax, eax
cmp word [ebp - 0xa44], ax
je 0x4fb834
lea ecx, [ebp - 0xa44]
cmp word [ecx], 0x3a
je 0x4fb7ef
inc eax
cmp word [ebp + eax*2 - 0xa44], 0
lea ecx, [ebp + eax*2 - 0xa44]
jne 0x4fb7d4
jmp 0x4fb834
lea edx, [ebp + eax*2 - 0xa42]
xor ecx, ecx
push edx
mov word [ebp + eax*2 - 0xa44], cx
call fcn.005553b5
movzx esi, ax
xor eax, eax
add esp, 4
test si, si
setne al
mov dword [ebp - 0x14], esi
test eax, eax
je 0x4fb834
lea eax, [ebp - 0xa44]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4fb85b
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.004fb260
add esp, 0x10
test eax, eax
jne 0x4fb7c3
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 0x4fb88e
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 0x4fb8b4
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