Function at 0x140001710
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 0x140001752
add rcx, 0x78
lea rdx, [0x140023420]
call fcn.140002bb0
mov qword [rdi], rax
mov rbp, rax
test rax, rax
je 0x140001861
xor r15d, r15d
mov ecx, 0x2000
mov esi, r15d
call fcn.14000a43c
mov r14, rax
test rax, rax
je 0x14000182f
xor edx, edx
lea r8d, [r15 + 2]
mov rcx, rbp
call fcn.14000aae4
test eax, eax
js 0x14000182f
mov rcx, rbp
call fcn.14000afbc
mov rbx, rax
cmp rax, 8
jb 0x14000182f
nop dword [rax]
cmp rbx, 0x2000
lea rsi, [rbx - 0x2000]
cmovb rsi, r15
sub rbx, rsi
cmp rbx, 8
jb 0x140001817
xor r8d, r8d
mov rdx, rsi
mov rcx, rbp
call fcn.14000aae4
test eax, eax
js 0x140001817
mov r9, rbp
mov r8, rbx
mov edx, 1
mov rcx, r14
call fcn.14000a814
cmp rax, rbx
jne 0x140001817
lea rcx, [rbx - 7]
test rcx, rcx
je 0x14000180e
mov rax, qword [str.MEI_f_v_n_v]
lea rdx, [r14 - 1]
add rdx, rcx
nop dword [rax]
cmp qword [rdx], rax
je 0x140001829
dec rdx
sub rcx, 1
jne 0x140001800
lea rbx, [rsi + 7]
test rsi, rsi
jne 0x1400017a0
mov rcx, r14
call fcn.14000a428
mov eax, 0xffffffff
jmp 0x1400019d3
dec rsi
add rsi, rcx
mov rcx, r14
call fcn.14000a428
test rsi, rsi
je 0x140001861
mov rcx, qword [rdi]
xor r8d, r8d
mov rdx, rsi
call fcn.14000aae4
test eax, eax
jns 0x14000186b
lea rdx, str.failed_to_seek_to_cookie_position.
lea rcx, str.fseek
call fcn.140001bb0
mov eax, 0xffffffff
jmp 0x1400019d3
mov r9, qword [rdi]
lea rcx, [rdi + 0x20]
mov edx, 0x58
lea r8d, [rdx - 0x57]
call fcn.14000a814
cmp rax, 1
jae 0x1400018a3
lea rdx, str.failed_to_read_cookie.
lea rcx, str.fread
call fcn.140001bb0
mov eax, 0xffffffff
jmp 0x1400019d3
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 [0x140034b04], eax
mov edx, dword [rdi + 0x2c]
add rdx, qword [rdi + 8]
mov rcx, qword [rdi]
call fcn.14000aae4
movsxd rcx, dword [rdi + 0x30]
call fcn.14000a43c
mov qword [rdi + 0x10], rax
test rax, rax
jne 0x14000191e
lea rdx, str.Could_not_allocate_buffer_for_TOC.
lea rcx, str.malloc
call fcn.140001bb0
mov eax, 0xffffffff
jmp 0x1400019d3
movsxd rdx, dword [rdi + 0x30]
mov r8d, 1
mov r9, qword [rdi]
mov rcx, rax
call fcn.14000a814
cmp rax, 1
jae 0x140001945
lea rdx, str.Could_not_read_from_file.
jmp 0x14000188d
movsxd rax, dword [rdi + 0x30]
add rax, qword [rdi + 0x10]
mov rcx, qword [rdi]
mov qword [rdi + 0x18], rax
call fcn.14000a558
test eax, eax
je 0x140001970
lea rcx, str.Error_on_file_n.
call fcn.140001bf0
mov eax, 0xffffffff
jmp 0x1400019d3
mov rdx, qword [rdi + 0x10]
cmp rdx, qword [rdi + 0x18]
jae 0x1400019c1
nop word [rax + rax]
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 0x1400019b5
cmp rax, qword [rdi + 0x18]
jb 0x140001980
jmp 0x1400019c1
lea rcx, str.Cannot_read_Table_of_Contents._n
call fcn.140001bf0
mov rcx, qword [rdi]
test rcx, rcx
je 0x1400019d1
call fcn.14000a4c8
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