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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x178
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov rax, qword [0x140322b20]
xor rax, rsp
mov qword [rsp + 0x168], rax
cmp dword [rsp + 0x1a8], 0
jne 0x14004d2a9
lea rdx, [0x14024ee86]
mov rcx, qword [rsp + 0x1a0]
call fcn.14000ca20
mov dword [rsp + 0x44], 1
mov qword [rsp + 0x48], 0
mov rcx, qword [rsp + 0x198]
call fcn.14001bd90
mov qword [rsp + 0x80], rax
mov rcx, qword [rsp + 0x80]
call fcn.140048030
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x8000027
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x48], rax
cmp qword [rsp + 0x48], 0xffffffffffffffff
jne 0x14004d3c2
lea r9, [0x140254850]
xor r8d, r8d
mov edx, 3
lea rcx, [rsp + 0x140]
call fcn.140038d20
mov qword [rsp + 0x90], rax
lea rax, [rsp + 0xf0]
mov rdi, rax
mov rsi, qword [rsp + 0x90]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
xor edx, edx
mov rcx, qword [rsp + 0x198]
call fcn.14002f250
mov qword [rsp + 0x98], rax
lea rax, [rsp + 0xd0]
lea rcx, [rsp + 0xf0]
mov rdi, rax
mov rsi, rcx
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, qword [rsp + 0x98]
lea rdx, str._tasp::library_CreateFile__s_err_lu.
lea rcx, [rsp + 0xd0]
call fcn.14003b980
mov qword [rsp + 0x48], 0
jmp 0x14004d6f7
xor edx, edx
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [rsp + 0x60], eax
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x164]
mov r8d, 3
lea rdx, [rsp + 0x160]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x14004d4a3
lea r9, [0x140254ad0]
xor r8d, r8d
mov edx, 3
lea rcx, [rsp + 0x150]
call fcn.140038d20
mov qword [rsp + 0xb8], rax
lea rax, [rsp + 0xe0]
mov rdi, rax
mov rsi, qword [rsp + 0xb8]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
xor edx, edx
mov rcx, qword [rsp + 0x198]
call fcn.14002f250
mov qword [rsp + 0xb0], rax
lea rax, [rsp + 0x100]
lea rcx, [rsp + 0xe0]
mov rdi, rax
mov rsi, rcx
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov r8, qword [rsp + 0xb0]
lea rdx, str._tasp::library_ReadFile__s_err_lu.
lea rcx, [rsp + 0x100]
call fcn.14003b980
cmp dword [rsp + 0x164], 3
jne 0x14004d5d1
mov eax, 1
imul rax, rax, 0
movzx eax, byte [rsp + rax + 0x160]
cmp eax, 0xef
jne 0x14004d4fe
mov eax, 1
imul rax, rax, 1
movzx eax, byte [rsp + rax + 0x160]
cmp eax, 0xbb
jne 0x14004d4fe
mov eax, 1
imul rax, rax, 2
movzx eax, byte [rsp + rax + 0x160]
cmp eax, 0xbf
jne 0x14004d4fe
jmp 0x14004d5cf
lea r9, [0x140254d80]
mov r8d, 2
mov edx, 1
lea rcx, [rsp + 0x130]
call fcn.140038d20
mov qword [rsp + 0x70], rax
lea rax, [rsp + 0x120]
mov rdi, rax
mov rsi, qword [rsp + 0x70]
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
xor edx, edx
mov rcx, qword [rsp + 0x198]
call fcn.14002f250
mov qword [rsp + 0xa0], rax
lea rax, [rsp + 0x110]
lea rcx, [rsp + 0x120]
mov rdi, rax
mov rsi, rcx
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetDim
rep movsb byte [rdi], byte [rsi]
mov eax, 1
imul rax, rax, 2
movzx eax, byte [rsp + rax + 0x160]
mov ecx, 1
imul rcx, rcx, 1
movzx ecx, byte [rsp + rcx + 0x160]
mov edx, 1
imul rdx, rdx, 0
movzx edx, byte [rsp + rdx + 0x160]
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], ecx
mov r9d, edx
mov r8, qword [rsp + 0xa0]
lea rdx, str._tasp::library__s_not_utf8_flag_b00x_x_b10x_x_b20x_x.
lea rcx, [rsp + 0x110]
call fcn.14003b980
mov dword [rsp + 0x44], 0
jmp 0x14004d5d9
mov dword [rsp + 0x44], 0
mov dword [rsp + 0x40], 0
cmp dword [rsp + 0x44], 0
je 0x14004d5f5
mov eax, dword [rsp + 0x60]
sub eax, 3
mov dword [rsp + 0x40], eax
jmp 0x14004d627
mov eax, dword [rsp + 0x164]
mov ecx, dword [rsp + 0x60]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x164]
mov r8d, eax
lea rdx, [rsp + 0x160]
mov rcx, qword [rsp + 0x1a0]
call fcn.1400075f0
mov eax, dword [rsp + 0x40]
mov ecx, eax
call fcn.14006dfa0
mov qword [rsp + 0xa8], rax
mov rax, qword [rsp + 0xa8]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x58], rax
cmp qword [rsp + 0x58], 0
je 0x14004d6f7
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x164]
mov r8d, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
je 0x14004d6bd
mov eax, dword [rsp + 0x40]
cmp dword [rsp + 0x164], eax
jne 0x14004d6bd
mov eax, dword [rsp + 0x164]
mov r8d, eax
mov rdx, qword [rsp + 0x58]
mov rcx, qword [rsp + 0x1a0]
call fcn.1400075f0
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x68], rax
mov rcx, qword [rsp + 0x68]
call fcn.14006dfa8
cmp qword [rsp + 0x68], 0
jne 0x14004d6e4
mov qword [rsp + 0x78], 0
jmp 0x14004d6f7
mov qword [rsp + 0x58], 0x8123
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x78], rax
jmp 0x14004d6f9
cmp qword [rsp + 0x48], 0
je 0x14004d70c
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x44]
mov rcx, qword [rsp + 0x168]
xor rcx, rsp
call fcn.1401fe250
add rsp, 0x178
pop rdi
pop rsi
ret