Function at 0x140001590
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, section..rdata
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.14000b7b0
mov r12d, eax
test eax, eax
jne 0x1400018bc
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov r13, rax
test rax, rax
je 0x140001932
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov r14, rax
test rax, rax
je 0x140001906
mov rax, qword [rsp + 0xf8]
mov eax, dword [rax + 8]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov ebp, 0x2000
mov r9, rbx
mov rcx, r13
mov edx, 1
cmp rax, 0x2000
cmovbe rbp, rax
mov r8, rbp
call sub.msvcrt.dll_fread
cmp rax, rbp
jne 0x1400018a0
mov rcx, rbx
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400018a0
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.14000b860
mov ebx, eax
cmp eax, 0xffffffff
jge 0x140001770
cmp eax, 0xfffffffc
jge 0x1400017d8
mov edx, dword [rsp + 0x58]
mov r8d, 0x2000
sub r8, rdx
mov rax, rdx
cmp qword [rsp + 0x100], 0
je 0x1400017e8
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 0x1400018ab
mov rcx, qword [rsp + 0x100]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400018ab
mov eax, dword [rsp + 0x58]
test eax, eax
je 0x1400016a8
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 0x1400017a6
test rax, rax
jne 0x14000164e
cmp r10d, 1
je 0x1400017a6
jmp 0x140001785
cmp eax, 2
jne 0x1400016d3
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.140002bc0
mov rcx, r15
call fcn.14000d410
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 0x140001785
cmp qword [rsp + 0x108], 0
je 0x140001733
cmp r8, 8
jae 0x140001848
test r8b, 4
jne 0x1400018e2
test r8, r8
je 0x140001838
movzx edx, byte [rbp]
mov rsi, qword [rsp + 0x108]
mov byte [rsi], dl
test r8b, 2
je 0x140001838
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 0x140001733
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 0x140001838
mov r12d, 0xffffffff
jmp 0x1400017a6
mov r14, rbp
mov r15, r12
mov r10d, 0xffffffff
jmp 0x140001785
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.140002bc0
jmp 0x1400017be
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 0x140001838
call qword [sym.imp.msvcrt.dll__errno]
mov rsi, qword [rsp + 0xf8]
lea r8, str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
lea rcx, str.malloc
mov edx, dword [rax]
lea r9, [rsi + 0x12]
call fcn.140002cd0
jmp 0x1400017a6
call qword [sym.imp.msvcrt.dll__errno]
mov rsi, qword [rsp + 0xf8]
lea r8, str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
xor r14d, r14d
mov edx, dword [rax]
lea rcx, str.malloc
lea r9, [rsi + 0x12]
call fcn.140002cd0
jmp 0x1400017a6