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 rbp, rcx
lea rdx, [0x14001a050]
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.14000ad80
mov r12d, eax
test eax, eax
jne 0x140001b9c
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov r13, rax
test rax, rax
je 0x140001c02
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov r14, rax
mov rax, qword [rsp + 0xf8]
test r14, r14
je 0x140001be6
mov eax, dword [rax + 8]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov ebx, 0x2000
mov r9, rbp
mov rcx, r13
mov edx, 1
cmp rax, rbx
cmovbe rbx, rax
mov r8, rbx
call sub.msvcrt.dll_fread
cmp rax, rbx
jne 0x140001b80
mov rcx, rbp
call sub.msvcrt.dll_ferror
mov r12d, eax
test eax, eax
jne 0x140001b80
mov dword [rsp + 0x48], ebx
mov rax, r15
mov r15, rbp
mov rbp, r14
mov qword [rsp + 0x40], r13
mov r14d, r12d
mov r12, rax
mov qword [rsp + 0x30], rbx
xor edx, edx
mov rcx, r12
mov qword [rsp + 0x50], rbp
mov dword [rsp + 0x58], 0x2000
call fcn.14000ae30
mov ebx, eax
cmp eax, 0xffffffff
jge 0x140001a50
cmp eax, 0xfffffffc
jge 0x140001ab8
mov edx, dword [rsp + 0x58]
mov r8d, 0x2000
sub r8, rdx
mov rax, rdx
cmp qword [rsp + 0x100], 0
je 0x140001ac8
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 rax, r8
jne 0x140001b8b
mov rcx, qword [rsp + 0x100]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x140001b8b
mov eax, dword [rsp + 0x58]
test eax, eax
je 0x14000197b
mov rax, r12
mov r10d, ebx
mov r12d, r14d
mov rbx, qword [rsp + 0x30]
mov r14, rbp
sub qword [rsp + 0x28], rbx
mov rbp, r15
mov r15, rax
mov rax, qword [rsp + 0x28]
cmp r10d, 1
je 0x140001a86
test rax, rax
jne 0x14000191e
cmp r10d, 1
je 0x140001a86
jmp 0x140001a65
cmp eax, 2
jne 0x1400019a6
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.140002fe0
mov rcx, r15
call fcn.14000c9d0
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 0x140001a65
cmp qword [rsp + 0x108], 0
je 0x140001a06
cmp r8, 8
jae 0x140001b28
test r8b, 4
jne 0x140001bc2
test r8, r8
je 0x140001b18
movzx edx, byte [rbp]
mov rsi, qword [rsp + 0x108]
mov byte [rsi], dl
test r8b, 2
je 0x140001b18
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 0x140001a06
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 0x140001b18
mov r12d, 0xffffffff
jmp 0x140001a86
mov r14, rbp
mov r15, r12
mov r10d, 0xffffffff
jmp 0x140001a65
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.140002fe0
jmp 0x140001a9e
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 0x140001b18
lea r8, [rax + 0x12]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
lea rcx, str.malloc
call fcn.140003170
jmp 0x140001a86
mov rax, qword [rsp + 0xf8]
lea rdx, str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
lea rcx, str.malloc
xor r14d, r14d
lea r8, [rax + 0x12]
call fcn.140003170
jmp 0x140001a86