Function at 0x1006685e
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push 0xd4
mov eax, 0x10170d26
call fcn.1016d10a
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [ebp - 0xcc], eax
mov dword [ebp - 0xdc], ecx
push ecx
mov dword [ebp - 4], ecx
xor eax, eax
mov dword [ebp - 0x18], ecx
lea ecx, [ebp - 0x28]
push 0x101744f4
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.10006830
lea ecx, [ebp - 0xc4]
mov byte [ebp - 4], 1
call fcn.100770e9
call fcn.10064be0
test al, al
je 0x100668d0
push eax
push esp
push edx
push edi
pop edx
pop esp
pop edi
push eax
push ebx
push esp
pop esi
pop ecx
pop ebx
push esp
push edi
push ebp
push edx
pop ebp
push esp
push ecx
pop edi
push edi
pop ecx
push ecx
pop ebx
call fcn.10064c6a
test al, al
je 0x100668ef
pop eax
pop edx
push esi
pop ebp
pop ebp
pop ebp
push eax
pop ebp
push edi
pop eax
pop ecx
push edx
push ebp
pop esp
pop eax
pop ecx
pop ebp
pop ecx
pop ebp
pop esi
pop ebp
push eax
call fcn.10064e92
test al, al
je 0x1006690b
push esi
push ecx
push esi
push edi
push esp
pop edx
push esi
push ebp
pop ecx
pop eax
pop ebx
pop edi
push ebx
push esi
push esp
pop esi
pop edx
push esp
pop edx
cmp dword [ebp + 0x20], 8
lea eax, [ebp + 0xc]
cmovae eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x10066bb9
cmp dword [ebp + 0x20], 8
lea eax, [ebp + 0xc]
cmovae eax, dword [ebp + 0xc]
xor edi, edi
push edi
push 0x80
push 4
push edi
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc8], eax
cmp eax, 0xffffffff
jne 0x10066975
mov ecx, dword [ebp - 0xcc]
push 0x101744f4
call fcn.10003560
push edi
push 1
lea ecx, [ebp - 0x28]
call fcn.10006390
push edi
jmp 0x10066bd6
call fcn.1006492e
test al, al
je 0x10066998
push ecx
push esi
pop esi
pop esi
pop ebx
pop ebp
pop ebp
push ebx
pop ecx
push ebp
pop esp
push esp
push esi
push esp
pop edi
pop ebp
pop ecx
pop edi
pop esi
push edi
push ecx
push ebp
pop esi
pop esp
xor edi, edi
push edi
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xd0], eax
inc eax
push eax
mov dword [ebp - 0xd8], eax
call fcn.10062f2d
mov ebx, eax
mov dword [ebp - 0xd4], ebx
pop ecx
test ebx, ebx
je 0x10066954
call fcn.10064fa6
test al, al
je 0x100669f5
pop eax
pop ebx
push edx
pop ebx
pop ebp
push eax
pop esp
pop esp
pop ecx
pop esi
push edx
pop ecx
push esp
push edx
push ebx
pop ebx
pop ebp
push eax
pop edi
pop esp
push esp
pop ebp
pop esi
push eax
pop ecx
pop edi
push edx
pop edx
push esi
pop ebp
push edi
mov ebx, dword [ebp - 0xd4]
xor edi, edi
push dword [ebp - 0xd8]
push edi
push ebx
call fcn.10080190
add esp, 0xc
lea eax, [ebp - 0xe0]
push edi
push eax
push dword [ebp - 0xd0]
push ebx
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
call fcn.10064b11
test al, al
je 0x10066a3d
pop esi
push edi
pop ecx
pop eax
pop eax
push esp
push ecx
pop eax
push edi
pop esi
pop ebp
pop edi
pop esi
push eax
push edx
pop eax
pop ebx
pop edi
pop ecx
pop esp
call fcn.10064b11
test al, al
je 0x10066a5c
pop ebp
push ecx
push edi
push ebp
pop ebx
pop edi
pop edx
push esp
pop ebp
push esp
push edi
pop edi
pop eax
push esi
push edi
pop edi
push edi
pop esi
pop ebp
pop edi
pop edi
pop eax
call fcn.10064dc3
test al, al
je 0x10066a85
push edx
pop esp
pop ecx
pop esp
pop esi
pop ecx
pop edi
pop ebp
push edi
pop esi
pop eax
push eax
pop ebp
push ecx
push eax
push ebp
push ecx
push esi
pop eax
pop eax
push ecx
push ebp
push esi
push ebx
pop ebp
push ecx
push ebp
pop eax
pop esp
push esp
push esp
pop eax
push dword [ebp - 0xc8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xd0]
mov esi, dword [ebp - 0xd4]
lea ecx, [ebp - 0xc4]
push esi
call fcn.10077ae8
push esi
call fcn.10062f36
pop ecx
call fcn.10064d7e
test al, al
je 0x10066ad6
push ecx
pop ecx
push eax
push edx
push esp
pop esi
pop ebp
push ebx
pop ebp
pop ebx
pop esp
push ecx
pop esp
pop edi
push ecx
push ebx
push edx
push ecx
pop edx
push edx
pop ecx
push ecx
push ebx
pop eax
push ebx
push eax
push ecx
pop ebx
pop edi
call fcn.10064e08
test al, al
je 0x10066af8
push eax
pop edi
pop edi
pop edi
push esp
pop edx
pop eax
pop eax
push eax
push esi
push esp
push edx
pop esp
push esp
push esi
pop eax
pop edi
pop edx
push ebx
push esp
pop ecx
push esp
push ebp
push esi
push esp
call fcn.10064fa6
test al, al
je 0x10066b20
push ebx
push eax
push esi
pop ebx
pop esi
push ebx
pop eax
push eax
pop edi
push ebp
push edi
pop ebx
pop ebx
pop edx
push esi
pop esp
push edx
push ebx
pop eax
push edx
push ebx
pop ebp
push esp
push eax
pop edx
push esi
push ebp
pop esp
push esi
push ebp
push eax
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0xc4]
call fcn.10077336
push eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push eax
call fcn.10069070
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 4
call fcn.10010fb0
call fcn.10064e08
test al, al
je 0x10066b70
push ecx
push esp
push esi
push ebx
push edx
pop esi
pop ebx
pop esp
pop edi
pop eax
pop esi
pop edx
pop esp
pop esi
pop esp
pop ebp
push ebx
pop edi
pop edx
pop ebx
pop esi
push eax
pop ecx
push ebx
call fcn.10064e08
test al, al
je 0x10066b97
push edi
pop ecx
push ecx
pop esi
push ebx
pop ebp
push edx
pop esp
pop esi
push edx
pop ebx
push ecx
push esp
pop ebp
pop edi
pop edi
pop ebp
pop edi
pop esp
pop ecx
push edx
pop edx
push ecx
push esp
pop eax
pop ebp
push esp
push eax
push esp
pop edi
cmp dword [ebp - 0x30], 0
jbe 0x10066bad
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x28]
call fcn.10006710
push 0
push 1
lea ecx, [ebp - 0x40]
call fcn.10006390
mov ecx, dword [ebp - 0xcc]
lea eax, [ebp - 0x28]
push eax
call fcn.100640ad
push 0
push 1
lea ecx, [ebp - 0x28]
call fcn.10006390
push 0
push 1
lea ecx, [ebp + 0xc]
call fcn.10006390
mov eax, dword [ebp - 0xcc]
call fcn.1016d0c5
ret