Function at 0x140001860
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
lea r15, [rsp + 0x40]
mov qword [rsp + 0xf8], rdx
mov rbx, rcx
lea rdx, [0x14001a053]
mov qword [rsp + 0x100], r8
mov rcx, r15
mov r8d, 0x58
mov qword [rsp + 0x108], r9
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
call fcn.140009080
mov r12d, eax
test eax, eax
jne 0x140001b8c
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov r13, rax
test rax, rax
je 0x140001bf2
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov r14, rax
mov rax, qword [rsp + 0xf8]
test r14, r14
je 0x140001bd6
mov eax, dword [rax + 8]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov ebp, 0x2000
mov r9, qword [rbx]
mov rcx, r13
mov edx, 1
cmp rax, 0x2000
cmovbe rbp, rax
mov r8, rbp
call sub.msvcrt.dll_fread
cmp rbp, rax
jne 0x140001b70
mov rcx, qword [rbx]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x140001b70
mov qword [rsp + 0x40], r13
mov r12, r15
mov r15, rbx
mov dword [rsp + 0x48], ebp
mov qword [rsp + 0x30], rbp
mov rbp, r14
mov r14d, eax
xor edx, edx
mov rcx, r12
mov qword [rsp + 0x50], rbp
mov dword [rsp + 0x58], 0x2000
call fcn.140009120
mov ebx, eax
cmp eax, 0xffffffff
jge 0x140001a40
cmp eax, 0xfffffffc
jge 0x140001aa8
mov edx, dword [rsp + 0x58]
mov r8d, 0x2000
sub r8, rdx
mov rax, rdx
cmp qword [rsp + 0x100], 0
je 0x140001ab8
mov r9, qword [rsp + 0x100]
mov edx, 1
mov rcx, rbp
mov qword [rsp + 0x38], r8
call sub.msvcrt.dll_fwrite
mov r8, qword [rsp + 0x38]
cmp r8, rax
jne 0x140001b7b
mov rcx, qword [rsp + 0x100]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x140001b7b
mov eax, dword [rsp + 0x58]
test eax, eax
je 0x140001978
mov r10d, ebx
mov rbx, r15
mov r15, r12
mov r12d, r14d
mov r14, rbp
mov rbp, qword [rsp + 0x30]
sub qword [rsp + 0x28], rbp
mov rax, qword [rsp + 0x28]
cmp r10d, 1
je 0x140001a76
test rax, rax
jne 0x14000191e
cmp r10d, 1
je 0x140001a76
jmp 0x140001a55
cmp eax, 2
jne 0x1400019a3
mov r14, rbp
mov r15, r12
mov r10d, 0xfffffffd
mov r8d, r10d
mov rax, qword [rsp + 0xf8]
lea rcx, str.Failed_to_extract__s:_decompression_resulted_in_return_code__d__n
mov r12d, 0xffffffff
lea rdx, [rax + 0x12]
call fcn.140002f50
mov rcx, r15
call fcn.14000ace0
mov rcx, r13
call sub.msvcrt.dll_free
mov rcx, r14
call sub.msvcrt.dll_free
mov eax, r12d
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r14, rbp
mov r10d, eax
mov r15, r12
jmp 0x140001a55
cmp qword [rsp + 0x108], 0
je 0x140001a03
cmp r8, 8
jae 0x140001b18
test r8b, 4
jne 0x140001bb2
test r8, r8
je 0x140001b08
movzx edx, byte [rbp]
mov rsi, qword [rsp + 0x108]
mov byte [rsi], dl
test r8b, 2
je 0x140001b08
movzx edx, word [rbp + r8 - 2]
mov rsi, qword [rsp + 0x108]
mov word [rsi + r8 - 2], dx
nop dword [rax]
add qword [rsp + 0x108], r8
jmp 0x140001a03
mov rdx, qword [rbp]
mov rdi, qword [rsp + 0x108]
mov qword [rdi], rdx
mov rsi, qword [rsp + 0x108]
mov rdx, qword [rbp + r8 - 8]
mov qword [rsi + r8 - 8], rdx
mov rdi, qword [rsp + 0x108]
mov rsi, rbp
mov rcx, qword [rsp + 0x108]
add rdi, 8
and rdi, 0xfffffffffffffff8
sub rcx, rdi
sub rsi, rcx
add rcx, r8
shr rcx, 3
rep movsq qword [rdi], qword [rsi]
jmp 0x140001b08
mov r12d, 0xffffffff
jmp 0x140001a76
mov r14, rbp
mov r15, r12
mov r10d, 0xffffffff
jmp 0x140001a55
mov rax, qword [rsp + 0xf8]
mov r8d, r12d
lea rcx, str.Failed_to_extract__s:_inflateInit___failed_with_return_code__d__n
mov r12d, 0xffffffff
lea rdx, [rax + 0x12]
call fcn.140002f50
jmp 0x140001a8e
mov edx, dword [rbp]
mov rsi, qword [rsp + 0x108]
mov dword [rsi], edx
mov edx, dword [rbp + r8 - 4]
mov rdi, qword [rsp + 0x108]
mov dword [rdi + r8 - 4], edx
jmp 0x140001b08
lea r8, [rax + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
lea rcx, [0x14001a0ea]
call fcn.1400030e0
jmp 0x140001a76
mov rax, qword [rsp + 0xf8]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
lea rcx, [0x14001a0ea]
xor r14d, r14d
lea r8, [rax + 0x12]
call fcn.1400030e0
jmp 0x140001a76