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

Disassembly:
push 0xf4
mov eax, 0x5eb785
call fcn.005ae057
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0xf4], edi
mov dword [ebp - 0xfc], esi
push esi
xor eax, eax
mov dword [ebp - 4], esi
push 0x694738
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], esi
mov word [ebp - 0x28], ax
call fcn.004028f0
lea ecx, [ebp - 0xe4]
mov byte [ebp - 4], 1
call fcn.0041e760
call fcn.004776b0
test al, al
je 0x5ae9fa
push edx
push ebp
pop esp
pop edx
push esi
pop esi
pop edx
push eax
pop edx
pop ebx
pop ebx
pop esp
pop edx
push edi
push esp
push edi
xor esi, esi
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 0x5aec85
cmp dword [ebp + 0x20], 8
lea eax, [ebp + 0xc]
push esi
cmovae eax, dword [ebp + 0xc]
push 0x80
push 4
push esi
push 1
push accept
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0xe8], ebx
cmp ebx, 0xffffffff
jne 0x5aea54
push 0x694738
mov ecx, edi
call fcn.00402790
jmp 0x5aec90
call fcn.004777d0
test al, al
je 0x5aea75
pop ebp
push ecx
push ebx
push ebp
pop edx
pop edi
push edx
push esp
push esi
pop ebp
push edx
push edx
pop ecx
pop esp
pop esp
pop esi
mov edi, dword [ebp - 0xf4]
xor esi, esi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0xec], eax
inc eax
push eax
mov dword [ebp - 0xf8], eax
call fcn.005ad7e9
mov dword [ebp - 0xf0], eax
pop ecx
test eax, eax
je 0x5aea43
call fcn.00477ef0
test al, al
je 0x5aeac1
push ebx
pop eax
push ecx
pop ebp
push edi
pop ecx
push ecx
pop ecx
push eax
pop esi
push ebx
push ecx
push esi
push ebx
push esp
push ebp
pop ebp
push esi
push edi
pop esp
pop ebp
push eax
pop edx
push eax
push ebp
push edi
pop esp
pop ebx
pop ebx
call fcn.004775f0
test al, al
je 0x5aeae8
pop eax
pop edi
pop ecx
pop edi
push ebp
pop esp
pop ecx
push edi
pop ebp
push ebp
pop edx
push edi
push edi
push esi
push edi
push edi
push esi
push esi
pop esi
pop ebx
push esi
pop edx
push ecx
pop edx
pop eax
push ecx
push eax
pop ebp
pop esi
push ecx
push dword [ebp - 0xf8]
mov esi, dword [ebp - 0xf0]
push 0
push esi
call fcn.005be3a0
add esp, 0xc
lea eax, [ebp - 0x100]
push 0
push eax
push dword [ebp - 0xec]
push esi
push dword [ebp - 0xe8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
call fcn.00477dd0
test al, al
je 0x5aeb3b
push edi
pop ebx
push edi
push edx
push ecx
pop ebx
pop edx
push ebx
pop eax
push eax
pop ebp
pop edi
pop ebp
pop esp
pop ecx
push ecx
push edx
push esp
push ecx
push edi
pop ebp
pop ecx
pop ebx
call fcn.00477ad0
test al, al
je 0x5aeb5c
pop eax
pop ebx
pop edi
pop edi
pop ebp
pop edi
pop ecx
pop esp
push esp
pop edi
push eax
push ebp
pop esp
pop edi
pop edx
push ebx
pop esi
push edx
push esp
push ecx
pop ebp
pop ebp
pop edi
push edi
call fcn.00477470
test al, al
je 0x5aeb7d
push esi
push esi
push edx
pop esi
pop ecx
push ecx
pop edi
pop eax
pop ebp
pop eax
push esp
push ecx
pop edx
pop eax
pop ebx
push esi
pop esp
pop ecx
push ecx
pop ebp
pop edi
pop esi
push esi
push ebp
push dword [ebp - 0xe8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xec]
mov ebx, dword [ebp - 0xf0]
lea ecx, [ebp - 0xe4]
push ebx
call fcn.0041e810
push ebx
call fcn.005ad7e4
pop ecx
call fcn.00477d70
test al, al
je 0x5aebc3
push eax
push esi
push esi
push esi
pop esp
pop eax
pop esi
push ecx
push edi
push ecx
pop edx
push ecx
pop esp
pop esp
push ecx
pop edi
pop ebp
pop ebp
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0xe4]
call fcn.0041e960
push eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push eax
call fcn.005b64c1
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 4
call fcn.00422710
call fcn.00477d10
test al, al
je 0x5aec0f
push ebp
pop ebp
push eax
push esp
pop ebp
push ebx
pop ebp
push esi
pop ebx
push edi
pop eax
pop esp
push esi
push eax
push ebp
pop eax
pop esi
push ecx
push ebx
push edx
call fcn.00477ad0
test al, al
je 0x5aec36
push ebp
push ecx
push edi
push edx
push ebx
push ecx
pop esp
pop ebx
pop ebp
pop edx
pop ecx
pop edi
pop ebx
push esp
push eax
push edi
pop ebx
push edi
pop ebx
push eax
pop edx
push ebp
pop ecx
pop eax
pop eax
pop ebx
push ebx
pop ebx
push esp
push ebp
call fcn.00477b90
test al, al
je 0x5aec5e
push esi
push esp
push esp
push eax
pop ebx
pop esi
push ebp
push ecx
push eax
push esp
push esp
push edi
pop ebp
pop ebx
push edi
pop ecx
pop esi
push edi
push ecx
push esp
pop ebp
pop ecx
pop ebp
push eax
pop ebp
pop edi
push ecx
pop ebp
pop eax
pop ecx
push ecx
xor esi, esi
cmp dword [ebp - 0x30], esi
jbe 0x5aec74
push 0xffffffffffffffff
push esi
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x28]
call fcn.00402b60
push esi
push 1
lea ecx, [ebp - 0x40]
call fcn.00402830
mov edi, dword [ebp - 0xf4]
lea eax, [ebp - 0x28]
mov ecx, edi
push eax
call fcn.00404ab0
push esi
push 1
lea ecx, [ebp - 0x28]
call fcn.00402830
push esi
push 1
lea ecx, [ebp + 0xc]
call fcn.00402830
mov eax, edi
call fcn.005ae012
ret