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, [0x14002a460]
call fcn.140002e10
mov qword [rdi], rax
mov rbp, rax
test rax, rax
je 0x1400018f8
xor r15d, r15d
mov ecx, 0x2000
mov esi, r15d
call fcn.14000e654
mov r14, rax
test rax, rax
je 0x1400018c6
xor edx, edx
mov r8d, 2
mov rcx, rbp
call fcn.14000dbf4
test eax, eax
js 0x1400018c6
mov rcx, rbp
call fcn.14000e180
mov rbx, rax
cmp rax, 8
jb 0x1400018c6
nop dword [rax + 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.14000dbf4
test eax, eax
js 0x1400018ae
mov r9, rbp
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.14000d8bc
cmp rax, rbx
jne 0x1400018ae
lea rcx, [rbx - 7]
test rcx, rcx
je 0x1400018a5
mov edx, dword [0x14002a438]
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.14000e640
mov eax, 0xffffffff
jmp 0x140001a66
dec rsi
add rsi, rcx
mov rcx, r14
call fcn.14000e640
test rsi, rsi
je 0x1400018f8
mov rcx, qword [rdi]
xor r8d, r8d
mov rdx, rsi
call fcn.14000dbf4
test eax, eax
jns 0x140001902
lea rdx, str.Failed_to_seek_to_cookie_position__n
lea rcx, str.fseek
call fcn.140001c50
mov eax, 0xffffffff
jmp 0x140001a66
mov r9, qword [rdi]
lea rcx, [rdi + 0x20]
mov edx, 0x58
mov r8d, 1
call fcn.14000d8bc
cmp rax, 1
jae 0x14000193c
lea rdx, str.Failed_to_read_cookie__n
lea rcx, str.fread
call fcn.140001c50
mov eax, 0xffffffff
jmp 0x140001a66
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 + 0x407c], r15d
mov dword [0x14003ccf4], eax
mov edx, dword [rdi + 0x2c]
add rdx, qword [rdi + 8]
mov rcx, qword [rdi]
call fcn.14000dbf4
movsxd rcx, dword [rdi + 0x30]
call fcn.14000e654
mov qword [rdi + 0x10], rax
test rax, rax
jne 0x1400019b7
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
lea rcx, str.malloc
call fcn.140001c50
mov eax, 0xffffffff
jmp 0x140001a66
movsxd rdx, dword [rdi + 0x30]
mov r8d, 1
mov r9, qword [rdi]
mov rcx, rax
call fcn.14000d8bc
cmp rax, 1
jae 0x1400019de
lea rdx, str.Could_not_read_full_TOC__n
jmp 0x140001926
movsxd rax, dword [rdi + 0x30]
add rax, qword [rdi + 0x10]
mov rcx, qword [rdi]
mov qword [rdi + 0x18], rax
call fcn.14000d630
test eax, eax
je 0x140001a09
lea rcx, str.Error_on_file._n
call fcn.140001c90
mov eax, 0xffffffff
jmp 0x140001a66
mov rdx, qword [rdi + 0x10]
cmp rdx, qword [rdi + 0x18]
jae 0x140001a54
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 0x140001a48
cmp rax, qword [rdi + 0x18]
jb 0x140001a13
jmp 0x140001a54
lea rcx, str.Cannot_read_Table_of_Contents._n
call fcn.140001c90
mov rcx, qword [rdi]
test rcx, rcx
je 0x140001a64
call fcn.14000d56c
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