Function at 0x140001d60
Capabilities:
Read file on windows

Disassembly:
push r14
push r13
push r12
push rsi
push rbx
add rsp, 0xffffffffffffff80
lea rdx, [0x14002212c]
mov rsi, rcx
call fcn.1400043a0
mov r12, rax
test rax, rax
je 0x140001fb0
mov rax, qword [0x140027f40]
lea r14, [rsp + 0x20]
mov rcx, r12
xor r13d, r13d
mov r8d, 8
mov rdx, r14
mov rax, qword [rax]
mov qword [rsp + 0x20], rax
shr rax, 0x18
add eax, 0xc
mov byte [rsp + 0x23], al
call fcn.140008180
mov rbx, rax
test rax, rax
jne 0x140001de0
mov rcx, r12
call sub.msvcrt.dll_fclose
mov rax, r13
sub rsp, 0xffffffffffffff80
pop rbx
pop rsi
pop r12
pop r13
pop r14
ret
xor r8d, r8d
mov edx, eax
mov rcx, r12
call fcn.1400189f0
test eax, eax
js 0x140001fc8
mov r9, r12
mov r8d, 1
mov edx, 0x58
mov rcx, r14
call sub.msvcrt.dll_fread
test rax, rax
je 0x140001fe0
mov edx, 0x1060
mov ecx, 1
call sub.msvcrt.dll_calloc
mov r13, rax
test rax, rax
je 0x140002011
mov r9, rsi
lea r8, [0x140022129]
mov edx, 0x1000
mov rcx, rax
call fcn.140001950
mov eax, dword [rsp + 0x28]
lea r9, [rsp + 0x38]
lea rcx, [r13 + 0x1020]
lea r8, [0x140022129]
mov edx, 0x40
bswap eax
mov dword [rsp + 0x28], eax
mov eax, dword [rsp + 0x2c]
bswap eax
mov dword [rsp + 0x2c], eax
mov eax, dword [rsp + 0x30]
bswap eax
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x34]
bswap eax
mov dword [r13 + 0x101c], eax
mov dword [rsp + 0x34], eax
call fcn.140001950
mov eax, dword [rsp + 0x28]
xor r8d, r8d
mov rcx, r12
sub rbx, rax
lea rdx, [rbx + 0x58]
mov qword [r13 + 0x1000], rdx
add edx, dword [rsp + 0x2c]
call fcn.1400189f0
mov r14d, dword [rsp + 0x30]
mov rcx, r14
call sub.msvcrt.dll_malloc
mov qword [r13 + 0x1008], rax
mov rcx, rax
test rax, rax
je 0x140002029
mov r9, r12
mov r8d, 1
mov rdx, r14
call sub.msvcrt.dll_fread
test rax, rax
je 0x140001f90
mov eax, dword [rsp + 0x30]
add rax, qword [r13 + 0x1008]
mov rcx, r12
mov qword [r13 + 0x1010], rax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x140002000
mov rax, qword [r13 + 0x1008]
mov r9, qword [r13 + 0x1010]
cmp r9, rax
jbe 0x140001dc2
movzx r10d, byte [r13 + 0x1018]
lea r8, [0x1400223e8]
nop dword [rax]
mov ecx, dword [rax + 4]
movzx esi, byte [rax + 0x11]
mov edx, dword [rax]
bswap ecx
mov dword [rax + 4], ecx
mov ecx, dword [rax + 8]
bswap edx
mov dword [rax], edx
bswap ecx
mov dword [rax + 8], ecx
mov ecx, dword [rax + 0xc]
bswap ecx
mov dword [rax + 0xc], ecx
lea ecx, [rsi - 0x5a]
cmp cl, 0x1e
ja case.0x140001f6c.1
movzx ecx, cl
movsxd rcx, dword [r8 + rcx*4]
add rcx, r8
jmp rcx
mov r10d, 1
mov edx, edx
add rax, rdx
cmp r9, rax
ja 0x140001f38
mov byte [r13 + 0x1018], r10b
jmp 0x140001dc2
lea rdx, str.Could_not_read_full_TOC__n
lea rcx, str.fread
call fcn.140002b90
jmp 0x140001dc2
xor r13d, r13d
mov rax, r13
sub rsp, 0xffffffffffffff80
pop rbx
pop rsi
pop r12
pop r13
pop r14
ret
lea rdx, str.Failed_to_seek_to_cookie_position__n
lea rcx, str.fseek
call fcn.140002b90
jmp 0x140001dc2
lea rdx, str.Failed_to_read_cookie__n
lea rcx, str.fread
call fcn.140002b90
jmp 0x140001dc2
lea rcx, str.Error_on_file._n
call fcn.140002a30
jmp 0x140001dc2
lea rdx, str.Could_not_allocate_memory_for_archive_structure__n
lea rcx, [0x14002238a]
call fcn.140002b90
jmp 0x140001dc2
lea rdx, str.Could_not_allocate_buffer_for_TOC__n
lea rcx, str.malloc
call fcn.140002b90
jmp 0x140001dc2