Function at 0x140017ed0
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x20
mov r14, rcx
cmp rdx, 1
jne 0x140017f47
mov r8, qword [r14]
cmp r8, 8
je 0x140017f7b
mov rax, qword [r14 + 8]
test rax, rax
je 0x140017fff
mov rcx, rax
shr rcx, 0x3b
jne 0x140017f40
mov rdx, rax
shl rdx, 4
lea rcx, [rdx - 1]
bsr rcx, rcx
xor ecx, 0x3f
neg cl
mov ebx, 1
shl rbx, cl
sub rbx, rdx
xor ecx, ecx
cmp rbx, 8
setae cl
lea r15, [rcx + rax*2]
mov rax, r15
shr rax, 0x3d
je 0x140018005
xor edi, edi
jmp 0x14001817d
xor edi, edi
add rdx, qword [r14 + 8]
jb 0x14001817d
mov rax, rdx
shr rax, 0x3c
jne 0x14001817d
test rdx, rdx
je 0x140017f83
lea rax, [rdx*8 - 1]
bsr rcx, rax
xor rcx, 0xffffffffffffffc0
add rcx, 0x41
jmp 0x140017f85
mov r15d, 1
jmp 0x140017f9b
xor ecx, ecx
mov r15d, 1
shl r15, cl
shr r15, 3
mov r8, qword [r14]
cmp r8, 8
jne 0x140018005
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rcx, qword [rax + 0x30]
lea r8, [r15*8]
xor edi, edi
xor edx, edx
call sub.ntdll.dll_RtlAllocateHeap
test rax, rax
je 0x14001817d
mov rdx, qword [r14 + 8]
test rdx, rdx
jle 0x140018173
mov rcx, qword [r14]
lea rdx, [rcx + rdx*8]
lea rdi, [rcx + 8]
cmp rdx, rdi
mov r9, rdi
cmova r9, rdx
mov rsi, rcx
not rsi
add r9, rsi
cmp r9, 0x18
jae 0x140018035
mov rdi, rax
jmp 0x140018160
mov r15d, 1
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rcx, qword [rax + 0x30]
lea r9, [r15*8]
xor edi, edi
xor edx, edx
call sub.ntdll.dll_RtlReAllocateHeap
test rax, rax
jne 0x140018173
jmp 0x14001817d
cmp rdx, rdi
cmova rdi, rdx
lea rbx, [rdi + rsi]
and rbx, 0xfffffffffffffff8
add rbx, rcx
add rbx, 8
cmp rax, rbx
jae 0x14001806c
lea rbx, [rdi + rsi]
add rbx, 8
and rbx, 0xfffffffffffffff8
add rbx, rax
cmp rbx, rcx
jbe 0x14001806c
mov rdi, rax
jmp 0x140018160
shr r9, 3
add r9, 1
mov r8, r9
and r8, 0xfffffffffffffffc
lea rbx, [r8 - 4]
mov rdi, rbx
shr rdi, 2
add rdi, 1
mov r10d, edi
and r10d, 3
cmp rbx, 0xc
jae 0x14001809b
xor esi, esi
jmp 0x140018108
and rdi, 0xfffffffffffffffc
xor esi, esi
nop word cs:[rax + rax]
nop dword [rax + rax]
movups xmm0, xmmword [rcx + rsi*8]
movups xmm1, xmmword [rcx + rsi*8 + 0x10]
movups xmmword [rax + rsi*8], xmm0
movups xmmword [rax + rsi*8 + 0x10], xmm1
movups xmm0, xmmword [rcx + rsi*8 + 0x20]
movups xmm1, xmmword [rcx + rsi*8 + 0x30]
movups xmmword [rax + rsi*8 + 0x20], xmm0
movups xmmword [rax + rsi*8 + 0x30], xmm1
movups xmm0, xmmword [rcx + rsi*8 + 0x40]
movups xmm1, xmmword [rcx + rsi*8 + 0x50]
movups xmmword [rax + rsi*8 + 0x40], xmm0
movups xmmword [rax + rsi*8 + 0x50], xmm1
movups xmm0, xmmword [rcx + rsi*8 + 0x60]
movups xmm1, xmmword [rcx + rsi*8 + 0x70]
movups xmmword [rax + rsi*8 + 0x60], xmm0
movups xmmword [rax + rsi*8 + 0x70], xmm1
add rsi, 0x10
add rdi, 0xfffffffffffffffc
jne 0x1400180b0
test r10, r10
je 0x14001814b
lea rdi, [rax + rsi*8]
add rdi, 0x10
lea rsi, [rcx + rsi*8]
add rsi, 0x10
shl r10, 5
xor ebx, ebx
nop word cs:[rax + rax]
nop dword [rax]
movups xmm0, xmmword [rsi + rbx - 0x10]
movups xmm1, xmmword [rsi + rbx]
movups xmmword [rdi + rbx - 0x10], xmm0
movups xmmword [rdi + rbx], xmm1
add rbx, 0x20
cmp r10, rbx
jne 0x140018130
cmp r9, r8
je 0x140018173
lea rcx, [rcx + r8*8]
lea rdi, [rax + r8*8]
nop dword [rax + rax]
mov rbx, qword [rcx]
mov qword [rdi], rbx
add rcx, 8
add rdi, 8
cmp rcx, rdx
jb 0x140018160
mov qword [r14], rax
mov qword [r14 + 0x10], r15
mov dil, 1
mov eax, edi
add rsp, 0x20
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret