Function at 0x10004e80
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1017ec70
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x101f7210]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
mov ecx, eax
mov ebx, dword [ebp + 8]
push 0
push 0x101cf8e2
mov dword [ebp - 0x40], eax
call fcn.1001ec60
mov edi, 1
mov dword [ebp - 4], 0
cmp dword [ebx + 0x14], 8
mov dword [ebp - 0x28], edi
jb 0x10004ede
mov eax, dword [ebx]
jmp 0x10004ee0
mov eax, ebx
push 0
push 0x8000027
push 3
push 0
push 1
push SysReAllocStringLen
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x48], esi
cmp esi, 0xffffffff
jne 0x10004f4c
push ecx
mov ecx, ebx
mov dword [ebp - 0x3c], 0x101cd130
mov dword [ebp - 0x38], 0
call fcn.10002930
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
movq xmm0, qword [ebp - 0x3c]
push eax
push esi
push str._tasp::library_CreateFile__s_err_lu.
sub esp, 0xc
mov eax, esp
movq qword [eax], xmm0
mov dword [eax + 8], 3
call fcn.10005540
add esp, 0x18
xor esi, esi
jmp 0x10005092
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x20]
push eax
push 3
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x10004fb0
push ecx
mov ecx, ebx
mov dword [ebp - 0x3c], 0x101cd1b0
mov dword [ebp - 0x38], eax
call fcn.10002930
mov dword [ebp - 0x44], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
movq xmm0, qword [ebp - 0x3c]
push eax
push dword [ebp - 0x44]
push str._tasp::library_ReadFile__s_err_lu.
sub esp, 0xc
mov eax, esp
movq qword [eax], xmm0
mov dword [eax + 8], 3
call fcn.10005540
add esp, 0x18
mov eax, dword [ebp - 0x20]
cmp eax, 3
jne 0x1000501f
cmp byte [ebp - 0x1c], 0xef
jne 0x10004fd2
cmp byte [ebp - 0x1b], 0xbb
jne 0x10004fd2
cmp byte [ebp - 0x1a], 0xbf
jne 0x10004fd2
mov ebx, dword [ebp - 0x24]
add ebx, 0xfffffffd
jmp 0x10005036
push ecx
mov ecx, ebx
mov dword [ebp - 0x3c], 0x101cd248
mov dword [ebp - 0x38], 2
call fcn.10002930
movq xmm0, qword [ebp - 0x3c]
mov ecx, eax
movzx eax, byte [ebp - 0x1a]
push eax
movzx eax, byte [ebp - 0x1b]
push eax
movzx eax, byte [ebp - 0x1c]
push eax
push ecx
push str._tasp::library__s_not_utf8_flag_b00x_x_b10x_x_b20x_x.
sub esp, 0xc
mov eax, esp
movq qword [eax], xmm0
mov dword [eax + 8], 1
call fcn.10005540
mov eax, dword [ebp - 0x20]
add esp, 0x20
mov ebx, dword [ebp - 0x24]
xor edi, edi
mov ecx, dword [ebp - 0x40]
sub ebx, eax
push eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x28], edi
push eax
call fcn.1001ee80
push ebx
call fcn.1002fb37
add esp, 4
mov dword [ebp - 0x24], eax
test eax, eax
je 0x10005092
push 0
lea ecx, [ebp - 0x20]
push ecx
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10005078
mov eax, dword [ebp - 0x20]
cmp eax, ebx
mov ebx, dword [ebp - 0x24]
jne 0x1000507b
mov ecx, dword [ebp - 0x40]
push eax
push ebx
call fcn.1001ee80
push ebx
call fcn.1002fb32
add esp, 4
jmp 0x10005092
mov ebx, dword [ebp - 0x24]
push ebx
call fcn.1002fb32
add esp, 4
jmp 0x10005092
test esi, esi
je 0x1000509d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.1014aad2
mov esp, ebp
pop ebp
ret 0xc