Function at 0x14005137e
Capabilities:
Read file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
mov rbx, qword [0x1400b4a80]
cmp qword [rbx], 0
mov r14, rcx
jne 0x1400513aa
xor edx, edx
xor ecx, ecx
call fcn.14004c049
mov qword [rbx], rax
mov ecx, 0x4d0
call sub.msvcrt.dll_malloc
mov rbp, rax
test rax, rax
je 0x14005148b
mov dword [rax + 0x28], 2
mov ecx, 0x50
call sub.msvcrt.dll_malloc
mov rbx, rax
test rax, rax
je 0x140051483
mov byte [rax + 8], 0
mov ecx, 0x6f50
mov qword [rbp + 0x4c0], rax
call sub.msvcrt.dll_malloc
test rax, rax
je 0x14005147b
mov edi, 1
xor ecx, ecx
xor r13d, r13d
mov dword [rax + 0x5c], 0x4000000
shl rdi, 0x21
mov qword [rax + 0x28], rcx
mov rcx, rbp
mov qword [rax + 0x60], rdi
mov qword [rbp + 0x4b8], rax
call fcn.1400502ee
mov rax, qword [0x1400b4200]
mov ebx, dword [rax]
mov rcx, rbx
call sub.msvcrt.dll_malloc
mov rcx, rbx
mov r12, rax
call sub.msvcrt.dll_malloc
xor r8d, r8d
xor r9d, r9d
mov qword [rsp + 0x58], rbx
mov qword [rsp + 0x48], rax
mov r15, rax
lea rax, [rsp + 0x30]
mov ebx, 1
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x50], r9
mov qword [rsp + 0x28], rax
jmp case.0x1400517a9.9
mov rcx, rbx
call sub.msvcrt.dll_free
mov rcx, rbp
call sub.msvcrt.dll_free
mov rax, qword [0x1400b47a0]
lea rcx, str._nError:_memory_allocation_error
mov rax, qword [rax]
test rax, rax
je 0x1400514a8
call rax
jmp 0x1400518bd
call sub.msvcrt.dll_printf
mov ecx, 0xa
call sub.msvcrt.dll_putchar
jmp 0x1400518bd
cmp eax, 1
jne 0x140051685
mov rax, qword [0x1400b4200]
mov r8, qword [rsp + 0x50]
mov eax, dword [rax]
cmp r8, rax
je 0x1400516c2
test ebx, ebx
jne 0x1400516ed
mov rax, qword [rsp + 0x40]
cmp qword [rsp + 0x38], rax
jne 0x14005163e
mov rax, qword [0x1400b4200]
mov ecx, dword [r14 + 0x10]
mov r8d, dword [rax]
test ecx, ecx
jns 0x140051514
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 9
jmp 0x140051547
test r12, r12
jne 0x140051527
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0xe
jmp 0x140051547
mov rax, qword [0x1400b4790]
mov rax, qword [rax]
test rax, rax
je 0x140051555
cmp dword [rax], 0
je 0x140051555
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 4
mov qword [rsp + 0x40], 0xffffffffffffffff
jmp 0x1400515fb
mov rax, qword [0x1400b4750]
cmp ecx, dword [rax]
jne 0x1400515a5
mov r9, qword [0x1400b4770]
mov rdx, qword [0x1400b4760]
mov rax, qword [r9]
mov rcx, qword [rdx]
mov edx, r8d
add rdx, rax
cmp rcx, rdx
jae 0x140051585
mov r8d, ecx
sub r8d, eax
mov rcx, qword [0x1400b4740]
mov edx, r8d
mov rdi, r12
mov rsi, qword [rcx]
mov rcx, rdx
add rsi, rax
add rax, rdx
rep movsb byte [rdi], byte [rsi]
mov qword [r9], rax
jmp 0x1400515c4
mov rax, qword [0x1400b47c0]
mov rdx, r12
mov rax, qword [rax]
test rax, rax
je 0x1400515bb
call rax
jmp 0x1400515c1
call qword [sym.imp.msvcrt.dll__read]
mov r8d, eax
movsxd rsi, r8d
test r8d, r8d
jle 0x1400515f4
mov rax, qword [0x1400b4730]
mov rcx, qword [rax]
add rcx, rsi
mov qword [rax], rcx
mov rax, qword [0x1400b47b0]
mov rax, qword [rax]
test rax, rax
je 0x1400515ed
call rax
mov qword [rsp + 0x40], rsi
jmp 0x140051637
mov qword [rsp + 0x40], rsi
je 0x140051637
mov rax, qword [0x1400b47a0]
lea rsi, str._nError:_read_error__errno:__d_
mov rdi, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll__errno]
test rdi, rdi
je 0x140051626
call rax
mov rcx, rsi
mov edx, dword [rax]
call rdi
jmp 0x140051866
call rax
mov rcx, rsi
mov edx, dword [rax]
call sub.msvcrt.dll_printf
jmp 0x140051851
xor edx, edx
mov qword [rsp + 0x38], rdx
cmp dword [rbp + 0x28], 0
jne 0x14005164c
mov rcx, rbp
call fcn.1400502ee
mov rdx, qword [rsp + 0x28]
mov rcx, rbp
mov rdi, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x50]
call fcn.140050a9b
cmp dword [rbp + 0x28], 0
mov ebx, eax
jne 0x140051694
test eax, eax
jne 0x1400514bc
xor ebx, ebx
mov rax, qword [rsp + 0x40]
cmp qword [rsp + 0x38], rax
setne bl
add ebx, 7
mov qword [rsp + 0x38], rdi
mov qword [rsp + 0x50], rsi
jmp 0x1400514c5
mov rax, qword [rsp + 0x50]
test ebx, ebx
jne 0x1400516b9
cmp rdi, qword [rsp + 0x38]
jne 0x1400516b9
cmp rsi, rax
jne 0x1400516b9
movzx ebx, byte [rbp + 0x2c]
mov byte [rbp + 0x2c], 1
shl ebx, 3
jmp 0x1400514c5
mov byte [rbp + 0x2c], 0
jmp 0x1400514c5
mov rdx, qword [rsp + 0x48]
mov rcx, r14
call fcn.1400528e5
cmp rax, 0xffffffffffffffe4
je 0x14005185d
test rax, rax
js 0x140051744
add r13, rax
xor eax, eax
mov qword [rsp + 0x50], rax
jmp 0x1400514dc
cmp ebx, 2
jne 0x140051723
mov rax, qword [0x1400b47a0]
lea rcx, str._nError:_unsupported_check__not_verifying_file_integrity
mov rax, qword [rax]
test rax, rax
je 0x14005170f
call rax
jmp case.0x1400517a9.9
call sub.msvcrt.dll_printf
mov ecx, 0xa
call sub.msvcrt.dll_putchar
jmp case.0x1400517a9.9
mov r8, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x48]
mov rcx, r14
call fcn.1400528e5
cmp rax, 0xffffffffffffffe4
je 0x14005185d
test rax, rax
jns 0x14005178c
mov rax, qword [0x1400b47a0]
lea rbx, str._nError:_write_error__errno:__d_
mov rsi, qword [rax]
mov rax, qword [sym.imp.msvcrt.dll__errno]
test rsi, rsi
je 0x140051774
call rax
mov rcx, rbx
mov edx, dword [rax]
call rsi
mov ebx, 7
jmp 0x140051866
call rax
mov rcx, rbx
mov edx, dword [rax]
call sub.msvcrt.dll_printf
mov ecx, 0xa
call sub.msvcrt.dll_putchar
jmp 0x14005176a
add r13, rax
lea eax, [rbx - 1]
cmp eax, 8
ja case.0x1400517a9.2
lea rdx, [0x1400a8a50]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov rax, qword [0x1400b47a0]
lea rcx, str._nError:_memory_allocation_error
mov rax, qword [rax]
test rax, rax
jmp 0x140051846
mov rax, qword [0x1400b47a0]
lea rcx, str._nError:_memory_usage_limit_error
mov rax, qword [rax]
test rax, rax
jmp 0x140051846
mov rax, qword [0x1400b47a0]
lea rcx, str._nError:_not_a_.xz_file
mov rax, qword [rax]
test rax, rax
jmp 0x140051846
mov rax, qword [0x1400b47a0]
lea rcx, str._nError:_unsupported_XZ_header_option
mov rax, qword [rax]
test rax, rax
jmp 0x140051846
mov rax, qword [0x1400b47a0]
lea rcx, str._nError:_corrupted_archive
mov rax, qword [rax]
test rax, rax
jmp 0x140051846
mov rax, qword [0x1400b47a0]
lea rcx, str._nError:_corrupted_buffer
mov rax, qword [rax]
test rax, rax
jmp 0x140051846
mov rax, qword [0x1400b47a0]
lea rcx, str._nError:_XZ_decompression_bug_
mov rax, qword [rax]
test rax, rax
je 0x14005184c
call rax
jmp 0x140051866
call sub.msvcrt.dll_printf
mov ecx, 0xa
call sub.msvcrt.dll_putchar
jmp 0x140051866
mov ebx, 9
jmp 0x140051866
xor ebx, ebx
mov rsi, qword [rbp + 0x4b8]
cmp dword [rsi + 0x64], 0
je 0x14005187c
mov rcx, qword [rsi + 0x28]
call sub.msvcrt.dll_free
mov rcx, rsi
call sub.msvcrt.dll_free
mov rcx, qword [rbp + 0x4c0]
call sub.msvcrt.dll_free
mov rcx, rbp
call sub.msvcrt.dll_free
mov rcx, r12
call sub.msvcrt.dll_free
mov rcx, r15
call sub.msvcrt.dll_free
test ebx, ebx
je 0x1400518cd
mov r13d, ebx
neg r13d
cmp ebx, 9
jne 0x1400518cd
mov r13, qword [r14 + 0x30]
jmp 0x1400518cd
xor r15d, r15d
xor r12d, r12d
mov ebx, 1
xor r13d, r13d
jmp 0x140051898
mov rax, r13
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret