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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b1400
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x639210]
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 0x6079a2
mov dword [ebp - 0x40], eax
call fcn.0041da10
mov edi, 1
mov dword [ebp - 4], 0
cmp dword [ebx + 0x14], 8
mov dword [ebp - 0x28], edi
jb 0x404a6e
mov eax, dword [ebx]
jmp 0x404a70
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 0x404adc
push ecx
mov ecx, ebx
mov dword [ebp - 0x3c], 0x603bc0
mov dword [ebp - 0x38], 0
call fcn.004026b0
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.00404e40
add esp, 0x18
xor esi, esi
jmp 0x404c22
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 0x404b40
push ecx
mov ecx, ebx
mov dword [ebp - 0x3c], 0x603c30
mov dword [ebp - 0x38], eax
call fcn.004026b0
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.00404e40
add esp, 0x18
mov eax, dword [ebp - 0x20]
cmp eax, 3
jne 0x404baf
cmp byte [ebp - 0x1c], 0xef
jne 0x404b62
cmp byte [ebp - 0x1b], 0xbb
jne 0x404b62
cmp byte [ebp - 0x1a], 0xbf
jne 0x404b62
mov ebx, dword [ebp - 0x24]
add ebx, 0xfffffffd
jmp 0x404bc6
push ecx
mov ecx, ebx
mov dword [ebp - 0x3c], 0x603cb8
mov dword [ebp - 0x38], 2
call fcn.004026b0
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.00404e40
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.0041dc30
push ebx
call fcn.0043f39a
add esp, 4
mov dword [ebp - 0x24], eax
test eax, eax
je 0x404c22
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 0x404c08
mov eax, dword [ebp - 0x20]
cmp eax, ebx
mov ebx, dword [ebp - 0x24]
jne 0x404c0b
mov ecx, dword [ebp - 0x40]
push eax
push ebx
call fcn.0041dc30
push ebx
call fcn.0043f3a3
add esp, 4
jmp 0x404c22
mov ebx, dword [ebp - 0x24]
push ebx
call fcn.0043f3a3
add esp, 4
jmp 0x404c22
test esi, esi
je 0x404c2d
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.00567455
mov esp, ebp
pop ebp
ret 0xc