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

Disassembly:
push 0xfc
mov eax, 0x55ec80
call fcn.004a99a0
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, 0x563a30
mov dword [ebp - 0x18], 7
push esi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x1c], ebx
mov word [ebp - 0x2c], ax
call fcn.00419ff0
lea ecx, [ebp - 0xc8]
mov byte [ebp - 4], 1
call fcn.00479eff
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 0x470904
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 0x4706ae
push esi
mov ecx, edi
call fcn.00419540
jmp 0x47090f
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 0x4706e2
mov ecx, dword [ebp - 0xe4]
xor eax, eax
add eax, edx
adc ecx, ebx
jmp 0x4706ee
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.004a9c20
or ecx, ebx
pop ebx
mov dword [ebp - 0xd4], eax
mov dword [ebp - 0x100], edx
je 0x470720
inc eax
mov dword [ebp - 0xd4], eax
push 0x2801
mov byte [ebp - 4], 2
call fcn.00464ea6
xor ebx, ebx
mov esi, eax
inc ebx
mov dword [ebp - 4], ebx
pop ecx
test esi, esi
jne 0x470758
push 0x563a30
mov ecx, edi
call fcn.00419540
push esi
push ebx
lea ecx, [ebp - 0x2c]
call fcn.00419c20
push esi
push ebx
jmp 0x47091d
xor ebx, ebx
xorps xmm0, xmm0
push 0x2801
push ebx
push esi
mov byte [ebp - 0xc9], bl
movlpd qword [ebp - 0xec], xmm0
call fcn.00485370
add esp, 0xc
mov dword [ebp - 0xd0], ebx
cmp dword [ebp - 0xd4], ebx
jle 0x47088c
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 0x4707b4
cmp byte [eax], 1
je 0x47086d
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 0x470876
push dword [ebp - 0xdc]
lea ecx, [ebp - 0xc8]
push esi
call fcn.0047a8f1
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 0x470852
mov edx, ecx
mov ecx, eax
call fcn.004a9860
mov edx, dword [ebp - 0xf0]
mov ecx, dword [ebp - 0xf4]
movsd qword [ebp - 0xe0], xmm0
call fcn.004a9860
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 0x4707a4
jmp 0x47088c
mov byte [ebp - 0xc9], 1
jmp 0x47088c
mov eax, dword [ebp - 0xd8]
test eax, eax
je 0x47088c
movsd xmm0, qword [0x561ec0]
movsd qword [eax], xmm0
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0xc8]
call fcn.0047a13f
push eax
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 4
push eax
call fcn.00472eb6
pop ecx
pop ecx
push ebx
push 1
lea ecx, [ebp - 0x5c]
mov byte [ebp - 4], 6
call fcn.0041bbd0
cmp dword [ebp - 0x34], 0
jbe 0x4708cf
push 0xffffffffffffffff
push ebx
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x2c]
call fcn.00419f20
cmp byte [ebp - 0xc9], 0
je 0x4708e6
push ebx
push 0x563a30
lea ecx, [ebp - 0x2c]
call fcn.00419ff0
push esi
call fcn.00464eaf
pop ecx
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 1
lea ecx, [ebp - 0x44]
call fcn.00419c20
lea eax, [ebp - 0x2c]
mov ecx, edi
push eax
call fcn.004200d0
push ebx
push 1
lea ecx, [ebp - 0x2c]
call fcn.00419c20
push ebx
push 1
lea ecx, [ebp + 0xc]
call fcn.00419c20
mov eax, edi
call fcn.004a98ed
ret