Function at 0x140001390
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 r15, [rsp + 0x40]
mov rsi, rcx
mov r14, rdx
movaps xmmword [rsp + 0x70], xmm0
mov qword [rsp + 0x100], r8
lea rdx, section..rdata
mov r8d, 0x58
mov rcx, r15
mov qword [rsp + 0x108], r9
mov qword [rsp + 0x80], 0
mov dword [rsp + 0x48], 0
mov qword [rsp + 0x40], 0
call fcn.14000a970
mov ebx, eax
test eax, eax
jne 0x1400016e8
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov r12, rax
test rax, rax
je 0x14000174f
mov ecx, 0x2000
call sub.msvcrt.dll_malloc
mov r13, rax
test rax, rax
je 0x140001728
mov edi, dword [r14 + 8]
mov qword [rsp + 0xf8], r14
mov rax, r15
mov r15, r13
mov r13, r12
mov r12, rax
mov r14, rdi
mov rdi, rsi
mov rsi, qword [rsp + 0xf8]
mov ebx, 0x2000
mov r9, rdi
mov edx, 1
mov rcx, r13
cmp r14, rbx
cmovbe rbx, r14
mov r8, rbx
call sub.msvcrt.dll_fread
cmp rax, rbx
jne 0x1400016c0
mov rcx, rdi
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400016c0
mov qword [rsp + 0x40], r13
mov qword [rsp + 0xf0], rdi
mov dword [rsp + 0x48], ebx
mov qword [rsp + 0x28], r14
mov r14d, eax
mov qword [rsp + 0x30], rbx
mov rbx, r15
mov r15, rsi
xor edx, edx
mov rcx, r12
mov qword [rsp + 0x50], rbx
mov dword [rsp + 0x58], 0x2000
call fcn.14000aa20
mov ebp, eax
cmp eax, 0xffffffff
jge 0x1400014e8
cmp eax, 0xfffffffc
jl 0x140001550
mov r14, r15
mov r10d, eax
mov r15, r12
mov r12, r13
mov r13, rbx
jmp 0x1400014ff
cmp eax, 2
jne 0x140001550
mov r14, r15
mov r10d, 0xfffffffd
mov r15, r12
mov r12, r13
mov r13, rbx
lea rdx, [r14 + 0x12]
mov r8d, r10d
lea rcx, str.Failed_to_extract__s:_decompression_resulted_in_return_code__d__n
call fcn.140002950
mov ebx, 0xffffffff
nop word [rax + rax]
mov rcx, r15
call fcn.14000ca40
mov rcx, r12
call sub.msvcrt.dll_free
mov rcx, r13
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 edx, dword [rsp + 0x58]
mov r8d, 0x2000
sub r8, rdx
mov rax, rdx
cmp qword [rsp + 0x100], 0
je 0x140001610
mov r9, qword [rsp + 0x100]
mov edx, 1
mov rcx, rbx
mov qword [rsp + 0x38], r8
call sub.msvcrt.dll_fwrite
mov r8, qword [rsp + 0x38]
cmp rax, r8
jne 0x1400016d1
mov rcx, qword [rsp + 0x100]
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x1400016d1
mov eax, dword [rsp + 0x58]
test eax, eax
je 0x1400014b1
mov eax, r14d
mov rsi, r15
mov r14, qword [rsp + 0x28]
mov r15, rbx
mov rbx, qword [rsp + 0x30]
mov rdi, qword [rsp + 0xf0]
sub r14, rbx
cmp ebp, 1
je 0x140001770
test r14, r14
jne 0x140001455
mov ebx, eax
mov rax, r12
mov r10d, ebp
mov r12, r13
mov r14, rsi
mov r13, r15
mov r15, rax
cmp ebp, 1
je 0x140001520
jmp 0x1400014ff
cmp qword [rsp + 0x108], 0
je 0x1400015b0
cmp r8, 8
jae 0x140001670
test r8b, 4
jne 0x140001705
test r8, r8
je 0x140001660
movzx edx, byte [rbx]
mov rsi, qword [rsp + 0x108]
mov byte [rsi], dl
test r8b, 2
je 0x140001660
movzx edx, word [rbx + r8 - 2]
mov rsi, qword [rsp + 0x108]
mov word [rsi + r8 - 2], dx
nop word [rax + rax]
add qword [rsp + 0x108], r8
jmp 0x1400015b0
mov rdx, qword [rbx]
mov rsi, qword [rsp + 0x108]
mov qword [rsi], rdx
mov rsi, qword [rsp + 0x108]
mov rdx, qword [rbx + r8 - 8]
mov qword [rsi + r8 - 8], rdx
mov rsi, qword [rsp + 0x108]
lea rdi, [rsi + 8]
mov rcx, rsi
mov rsi, rbx
and rdi, 0xfffffffffffffff8
sub rcx, rdi
sub rsi, rcx
add rcx, r8
shr rcx, 3
rep movsq qword [rdi], qword [rsi]
jmp 0x140001660
mov rax, r12
mov r12, r13
mov r13, r15
mov r15, rax
jmp 0x140001512
mov r14, r15
mov r10d, 0xffffffff
mov r15, r12
mov r12, r13
mov r13, rbx
jmp 0x1400014ff
lea rdx, [r14 + 0x12]
mov r8d, eax
mov ebx, 0xffffffff
lea rcx, str.Failed_to_extract__s:_inflateInit___failed_with_return_code__d__n
call fcn.140002950
jmp 0x140001538
mov edx, dword [rbx]
mov rsi, qword [rsp + 0x108]
mov dword [rsi], edx
mov edx, dword [rbx + r8 - 4]
mov rsi, qword [rsp + 0x108]
mov dword [rsi + r8 - 4], edx
jmp 0x140001660
call qword [sym.imp.msvcrt.dll__errno]
lea r9, [r14 + 0x12]
lea r8, str.Failed_to_extract__s:_failed_to_allocate_temporary_output_buffer__n
mov edx, dword [rax]
lea rcx, str.malloc
call fcn.140002a60
xor r13d, r13d
jmp 0x140001520
call qword [sym.imp.msvcrt.dll__errno]
lea r9, [r14 + 0x12]
lea r8, str.Failed_to_extract__s:_failed_to_allocate_temporary_input_buffer__n
mov edx, dword [rax]
lea rcx, str.malloc
call fcn.140002a60
jmp 0x140001747
mov ebx, eax
mov rax, r12
mov r12, r13
mov r13, r15
mov r15, rax
jmp 0x140001520