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

Disassembly:
push 0xfc
mov eax, 0x1010fa8b
call fcn.1010a057
mov edi, dword [ebp + 8]
xor ebx, ebx
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0xd0], edi
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0x108], ebx
push ebx
xor eax, eax
mov dword [ebp - 4], ebx
mov esi, 0x10112588
mov dword [ebp - 0x18], 7
push esi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
call fcn.1001a800
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 1
call fcn.100d901b
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 0x100cb047
cmp dword [ebp + 0x20], 8
lea eax, [ebp + 0xc]
push ebx
cmovae eax, dword [ebp + 0xc]
push 0x80
push 4
push ebx
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xfc], eax
cmp eax, 0xffffffff
jne 0x100cadf1
push esi
mov ecx, edi
call fcn.1001ab20
jmp 0x100cb052
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xe4], ebx
push ecx
xorps xmm0, xmm0
push eax
movlpd qword [ebp - 0xf8], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
cmp edx, 0xffffffff
je 0x100cae25
mov ecx, dword [ebp - 0xe4]
xor eax, eax
add eax, edx
adc ecx, ebx
jmp 0x100cae31
mov ecx, dword [ebp - 0xf4]
mov eax, dword [ebp - 0xf8]
push ebx
push ebx
push 0x2800
push ecx
push eax
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf0], ecx
call fcn.101098f0
or ecx, ebx
pop ebx
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0x100], edx
je 0x100cae63
inc eax
mov dword [ebp - 0xd4], eax
push 0x2801
mov byte [ebp - 4], 2
call fcn.1001cd3f
xor ebx, ebx
mov esi, eax
inc ebx
mov dword [ebp - 4], ebx
pop ecx
test esi, esi
jne 0x100cae9b
push 0x10112588
mov ecx, edi
call fcn.1001ab20
push esi
push ebx
lea ecx, [ebp - 0x2c]
call fcn.100ccb12
push esi
push ebx
jmp 0x100cb060
xor ebx, ebx
xorps xmm0, xmm0
push 0x2801
push ebx
push esi
mov byte [ebp - 0xc9], bl
movlpd qword [ebp - 0xec], xmm0
call fcn.100e23d0
add esp, 0xc
mov dword [ebp - 0xd0], ebx
cmp dword [ebp - 0xd4], ebx
jle 0x100cafcf
mov eax, dword [ebp - 0xe8]
mov dword [ebp - 0x100], eax
mov eax, dword [ebp - 0xec]
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x100caef7
cmp byte [eax], 1
je 0x100cafb0
push ebx
lea eax, [ebp - 0xdc]
mov dword [ebp - 0xdc], ebx
push eax
push 0x2800
push esi
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [ebp - 0xdc], ebx
je 0x100cafb9
push dword [ebp - 0xdc]
lea ecx, [ebp - 0xc8]
push esi
call fcn.100d9d14
mov eax, dword [ebp - 0xe8]
add eax, dword [ebp - 0xdc]
mov ecx, dword [ebp - 0x100]
adc ecx, ebx
mov dword [ebp - 0xe8], eax
mov dword [ebp - 0x100], ecx
cmp dword [ebp - 0xd8], ebx
je 0x100caf95
mov edx, ecx
mov ecx, eax
call fcn.1001d090
mov edx, dword [ebp - 0xf0]
mov ecx, dword [ebp - 0xf4]
movsd qword [ebp - 0xe0], xmm0
call fcn.1001d090
movsd xmm1, qword [ebp - 0xe0]
divsd xmm1, xmm0
mov eax, dword [ebp - 0xd8]
movsd qword [eax], xmm1
mov eax, dword [ebp - 0xd0]
inc eax
mov dword [ebp - 0xd0], eax
cmp eax, dword [ebp - 0xd4]
jl 0x100caee7
jmp 0x100cafcf
mov byte [ebp - 0xc9], 1
jmp 0x100cafcf
mov eax, dword [ebp - 0xd8]
test eax, eax
je 0x100cafcf
movsd xmm0, qword [0x1014f3e0]
movsd qword [eax], xmm0
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0xc8]
call fcn.100d9562
push eax
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 4
push eax
call fcn.100cc064
pop ecx
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 6
call fcn.100ccabd
cmp dword [ebp - 0x34], 0
jbe 0x100cb012
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.1001a6e0
cmp byte [ebp - 0xc9], 0
je 0x100cb029
push ebx
push 0x10112588
lea ecx, [ebp - 0x2c]
call fcn.1001a800
push esi
call fcn.1001cd48
pop ecx
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 1
lea ecx, [ebp - 0x44]
call fcn.100ccb12
lea eax, [ebp - 0x2c]
mov ecx, edi
push eax
call fcn.100ca7de
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.100ccb12
push ebx
push 1
lea ecx, [ebp + 0xc]
call fcn.100ccb12
mov eax, edi
call fcn.10109fa4
ret