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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5834d0
mov eax, dword fs:[0]
push eax
sub esp, 0xe8
mov eax, dword [0x60b044]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov dword [ebp - 0xf0], 0
xor eax, eax
mov dword [ebp - 4], 0
push eax
push 0x5fe1c4
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.004031f0
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 1
call fcn.00420310
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 0x40eaa9
cmp dword [ebp + 0x20], 8
lea eax, [ebp + 0xc]
push 0
cmovae eax, dword [ebp + 0xc]
push 0x80
push 4
push 0
push 1
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40e9b0
push 0x5fe1c4
mov ecx, esi
call fcn.00402cd0
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40e989
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403400
mov ecx, dword [ebp + 0x20]
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp ecx, 8
jb 0x40eb05
inc ecx
push ecx
jmp 0x40eafa
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xe8], eax
inc eax
push eax
mov dword [ebp - 0xec], eax
call fcn.0041b7e2
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x40e9f6
push 0x5fe1c4
mov ecx, esi
call fcn.00402cd0
lea ecx, [ebp - 0x28]
call fcn.00403350
lea ecx, [ebp + 0xc]
call fcn.00403350
jmp 0x40eb05
push dword [ebp - 0xec]
push 0
push ebx
call fcn.0042bf30
add esp, 0xc
lea eax, [ebp - 0xf4]
push 0
push eax
push dword [ebp - 0xe8]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xe8]
lea ecx, [ebp - 0xe4]
push ebx
call fcn.00420dfe
push ebx
call fcn.0041b7eb
add esp, 4
lea eax, [ebp - 0x40]
lea ecx, [ebp - 0xe4]
push eax
call fcn.00420649
push eax
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 2
push eax
call fcn.0042562a
add esp, 8
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x40ea79
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.0040f830
cmp dword [ebp - 0x48], 0
mov dword [ebp - 0x2c], 0xf
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
jbe 0x40eaa1
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.00402de0
lea ecx, [ebp - 0x58]
call fcn.00403350
xor eax, eax
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov ecx, esi
mov word [esi], ax
lea eax, [ebp - 0x28]
push eax
call fcn.00402bf0
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40eadc
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00403400
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x18], 0
cmp eax, 8
jb 0x40eb05
inc eax
push eax
push dword [ebp + 0xc]
lea ecx, [ebp + 0xc]
call fcn.00403400
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041afe3
mov esp, ebp
pop ebp
ret 0x1c