Function at 0x1400017a0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r14
push r15
sub rsp, 0x20
mov rbp, qword [rcx]
mov rdi, rcx
test rbp, rbp
jne 0x1400017e2
add rcx, 0x78
lea rdx, [0x140025530]
call fcn.140002d80
mov qword [rdi], rax
mov rbp, rax
test rax, rax
je 0x1400018f8
xor r15d, r15d
mov ecx, 0x2000
mov esi, r15d
call fcn.140010064
mov r14, rax
test rax, rax
je 0x1400018c6
xor edx, edx
lea r8d, [r15 + 2]
mov rcx, rbp
call fcn.14000c468
test eax, eax
js 0x1400018c6
mov rcx, rbp
call fcn.14000c940
mov rbx, rax
cmp rax, 8
jb 0x1400018c6
nop dword [rax]
cmp rbx, 0x2000
lea rsi, [rbx - 0x2000]
cmovb rsi, r15
sub rbx, rsi
cmp rbx, 8
jb 0x1400018ae
xor r8d, r8d
mov rdx, rsi
mov rcx, rbp
call fcn.14000c468
test eax, eax
js 0x1400018ae
mov r9, rbp
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.14000c198
cmp rax, rbx
jne 0x1400018ae
lea rcx, [rbx - 7]
test rcx, rcx
je 0x1400018a5
mov edx, dword [0x140025508]
lea rax, [r14 - 1]
mov r8d, dword [str.MEI_f_v]
add rax, rcx
cmp dword [rax], r8d
jne 0x14000189c
cmp dword [rax + 4], edx
je 0x1400018c0
dec rax
sub rcx, 1
jne 0x140001892
lea rbx, [rsi + 7]
test rsi, rsi
jne 0x140001830
mov rcx, r14
call fcn.140010050
mov eax, 0xffffffff
jmp 0x140001a64
dec rsi
add rsi, rcx
mov rcx, r14
call fcn.140010050
test rsi, rsi
je 0x1400018f8
mov rcx, qword [rdi]
xor r8d, r8d
mov rdx, rsi
call fcn.14000c468
test eax, eax
jns 0x140001902
lea rdx, str.Failed_to_seek_to_cookie_position__n
lea rcx, str.fseek
call fcn.140001cc0
mov eax, 0xffffffff
jmp 0x140001a64
mov r9, qword [rdi]
lea rcx, [rdi + 0x20]
mov edx, 0x58
lea r8d, [rdx - 0x57]
call fcn.14000c198
cmp rax, 1
jae 0x14000193a
lea rdx, str.Failed_to_read_cookie__n
lea rcx, str.fread
call fcn.140001cc0
mov eax, 0xffffffff
jmp 0x140001a64
mov ecx, dword [rdi + 0x28]
xor r8d, r8d
mov eax, dword [rdi + 0x2c]
bswap eax
mov dword [rdi + 0x2c], eax
mov eax, dword [rdi + 0x30]
bswap eax
mov dword [rdi + 0x30], eax
mov eax, dword [rdi + 0x34]
bswap ecx
mov ecx, ecx
sub rsi, rcx
mov dword [rdi + 0x28], ecx
bswap eax
mov dword [rdi + 0x34], eax
add rsi, 0x58
mov qword [rdi + 8], rsi
mov dword [rdi + 0x507c], r15d
mov dword [0x140037c14], eax
mov edx, dword [rdi + 0x2c]
add rdx, qword [rdi + 8]
mov rcx, qword [rdi]
call fcn.14000c468
movsxd rcx, dword [rdi + 0x30]
call fcn.140010064
mov qword [rdi + 0x10], rax
test rax, rax
jne 0x1400019b5
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
lea rcx, str.malloc
call fcn.140001cc0
mov eax, 0xffffffff
jmp 0x140001a64
movsxd rdx, dword [rdi + 0x30]
mov r8d, 1
mov r9, qword [rdi]
mov rcx, rax
call fcn.14000c198
cmp rax, 1
jae 0x1400019dc
lea rdx, str.Could_not_read_full_TOC__n
jmp 0x140001924
movsxd rax, dword [rdi + 0x30]
add rax, qword [rdi + 0x10]
mov rcx, qword [rdi]
mov qword [rdi + 0x18], rax
call fcn.14000bf0c
test eax, eax
je 0x140001a07
lea rcx, str.Error_on_file._n
call fcn.140001d00
mov eax, 0xffffffff
jmp 0x140001a64
mov rdx, qword [rdi + 0x10]
cmp rdx, qword [rdi + 0x18]
jae 0x140001a52
mov eax, dword [rdx + 4]
mov ecx, dword [rdx]
bswap eax
mov dword [rdx + 4], eax
mov eax, dword [rdx + 8]
bswap eax
mov dword [rdx + 8], eax
mov eax, dword [rdx + 0xc]
bswap eax
mov dword [rdx + 0xc], eax
bswap ecx
mov dword [rdx], ecx
movsxd rax, ecx
add rax, rdx
mov rdx, rax
cmp rax, qword [rdi + 0x10]
jb 0x140001a46
cmp rax, qword [rdi + 0x18]
jb 0x140001a11
jmp 0x140001a52
lea rcx, str.Cannot_read_Table_of_Contents._n
call fcn.140001d00
mov rcx, qword [rdi]
test rcx, rcx
je 0x140001a62
call fcn.14000be7c
mov qword [rdi], r15
xor eax, eax
mov rbx, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rdi
ret