Function at 0x140001480
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
pxor xmm0, xmm0
lea r14, [rsp + 0x40]
mov r13, rcx
mov r12, rdx
movaps xmmword [rsp + 0x70], xmm0
mov qword [rsp + 0x100], r8
lea rdx, section..rdata
mov r8d, 0x58
mov rcx, r14
mov qword [rsp + 0x108], r9
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
call fcn.14000a2f0
test eax, eax
mov ebx, eax
jne 0x1400016c3
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
mov rdi, rax
je 0x140001708
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
test rax, rax
mov rbp, rax
je 0x1400016e1
mov r15d, dword [r12 + 8]
mov ebx, 0x2000
mov r9, r13
mov edx, 1
cmp r15, rbx
mov rcx, rdi
cmovbe rbx, r15
mov r8, rbx
call sub.msvcrt.dll_fread
cmp rax, rbx
jne 0x1400015af
mov rcx, r13
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400015af
mov dword [rsp + 0x48], ebx
mov esi, eax
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x28], rbx
xor edx, edx
mov rcx, r14
mov qword [rsp + 0x50], rbp
mov dword [rsp + 0x58], 0x2000
call fcn.14000a3c0
cmp eax, 0xffffffff
mov ebx, eax
jge 0x140001590
cmp eax, 0xfffffffc
jl 0x1400015e8
mov r10d, eax
jmp 0x14000159b
cmp eax, 2
jne 0x1400015e8
mov r10d, 0xfffffffd
lea rdx, [r12 + 0x12]
mov r8d, r10d
lea rcx, str.Failed_to_extract__s:_decompression_resulted_in_return_code__d__n
call fcn.140002920
mov ebx, 0xffffffff
mov rcx, r14
call fcn.14000c170
mov rcx, rdi
call sub.msvcrt.dll_free
mov rcx, rbp
call sub.msvcrt.dll_free
mov eax, ebx
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [rsp + 0x58]
mov r8d, 0x2000
sub r8, rax
mov r9, rax
cmp qword [rsp + 0x100], 0
je 0x140001680
mov r9, qword [rsp + 0x100]
mov edx, 1
mov rcx, rbp
mov qword [rsp + 0x30], r8
call sub.msvcrt.dll_fwrite
mov r8, qword [rsp + 0x30]
cmp rax, r8
jne 0x1400016b8
mov rcx, qword [rsp + 0x100]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400016b8
mov r9d, dword [rsp + 0x58]
test r9d, r9d
je 0x140001564
mov eax, esi
mov esi, ebx
mov rbx, qword [rsp + 0x28]
sub r15, rbx
cmp esi, 1
je 0x14000172f
test r15, r15
jne 0x140001524
cmp esi, 1
mov r10d, esi
mov ebx, eax
je 0x1400015b4
jmp 0x14000159b
cmp qword [rsp + 0x108], 0
je 0x140001641
mov rcx, qword [rsp + 0x108]
mov rdx, rbp
mov qword [rsp + 0x30], r8
mov dword [rsp + 0x3c], eax
call sub.msvcrt.dll_memcpy
mov r8, qword [rsp + 0x30]
mov r9d, dword [rsp + 0x3c]
add qword [rsp + 0x108], r8
jmp 0x140001641
mov r10d, 0xffffffff
jmp 0x14000159b
lea rdx, [r12 + 0x12]
mov r8d, eax
mov ebx, 0xffffffff
lea rcx, str.Failed_to_extract__s:_inflateInit___failed_with_return_code__d__n
call fcn.140002920
jmp 0x1400015cc
call qword [sym.imp.msvcrt.dll__errno]
lea r9, [r12 + 0x12]
xor ebp, ebp
mov edx, dword [rax]
lea r8, str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
lea rcx, str.malloc
call fcn.140002a30
jmp 0x1400015b4
call qword [sym.imp.msvcrt.dll__errno]
lea r9, [r12 + 0x12]
xor ebp, ebp
mov edx, dword [rax]
lea r8, str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
lea rcx, str.malloc
call fcn.140002a30
jmp 0x1400015b4
mov ebx, eax
jmp 0x1400015b4