Function at 0x18001bbe0
Capabilities:
Encode data using base64

Disassembly:
mov qword [rsp + 0x10], rdx
push r12
push r13
push r14
sub rsp, 0x60
mov eax, dword [0x18008b0c8]
mov r13d, r9d
mov r14, r8
mov r12, rcx
test al, 1
jne 0x18001bc0b
or eax, 1
mov dword [0x18008b0c8], eax
mov qword [rsp + 0x80], rbx
lea eax, [r9 + 4]
mov qword [rsp + 0x58], rbp
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], r15
mov dword [rsp + 0x98], eax
cmp r9d, eax
jae 0x18001be89
mov rdi, qword [rsp + 0x30]
lea rcx, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov r9, qword [rsp + 0x30]
xor ebx, ebx
mov ebp, dword [rsp + 0x98]
movabs rdx, 0xaaaaaaaaaaaaaaab
mov esi, dword [rsp + 0x98]
mov r15d, dword [rsp + 0x98]
mov r10, qword [0x18008b0c0]
nop word [rax + rax]
mov eax, r13d
sub eax, 0x1e
je 0x18001beb5
sub eax, 4
je 0x18001be2c
sub eax, 1
je 0x18001be08
cmp eax, 1
jne 0x18001be67
mov rax, qword [rsp + 0x30]
mov r11, rbx
test rax, rax
je 0x18001bd5c
lea rcx, [rax - 1]
mov rax, rdx
mul rcx
shr rdx, 1
inc rdx
lea r11, [rdx + rdx*2]
nop dword [rax]
mov r8d, 0xa6
mov eax, r8d
sub eax, 0xa6
je 0x18001bceb
cmp eax, 0x23
jne 0x18001bd45
add r9, 3
jmp 0x18001bd45
movzx eax, byte [r9]
shr rax, 2
movzx eax, byte [rax + r10]
mov byte [rdi], al
movzx eax, byte [r9 + 1]
movzx ecx, byte [r9]
shr eax, 4
and ecx, 3
shl ecx, 4
add ecx, eax
movzx ecx, byte [rcx + r10]
mov byte [rdi + 1], cl
movzx eax, byte [r9 + 2]
movzx ecx, byte [r9 + 1]
shr eax, 6
and ecx, 0xf
lea eax, [rax + rcx*4]
movzx eax, byte [rax + r10]
mov byte [rdi + 2], al
movzx eax, byte [r9 + 2]
and eax, 0x3f
movzx eax, byte [rax + r10]
mov byte [rdi + 3], al
add rdi, 4
add r8d, 0x23
cmp r8d, 0xec
jb 0x18001bcd6
sub rdx, 1
jne 0x18001bcd0
cmp r11, qword [r14 + 0x10]
jae 0x18001be67
mov edx, 0x2c
nop dword [rax + rax]
mov eax, edx
sub eax, 0x28
je 0x18001bdf5
sub eax, 1
je 0x18001bdce
sub eax, 1
je 0x18001bdb6
sub eax, 1
je 0x18001bda4
cmp eax, 1
jne 0x18001bdfb
movzx ebp, byte [r9]
lea rax, [r11 + 1]
cmp rax, qword [r14 + 0x10]
jae 0x18001bda0
movzx esi, byte [r9 + 1]
jmp 0x18001bdfb
mov esi, ebx
jmp 0x18001bdfb
mov eax, ebp
mov r15d, ebx
shr rax, 2
movzx eax, byte [rax + r10]
mov byte [rdi], al
jmp 0x18001bdf8
mov ecx, ebp
mov eax, esi
and ecx, 3
shr eax, 4
shl ecx, 4
add ecx, eax
movzx ecx, byte [rcx + r10]
mov byte [rdi], cl
jmp 0x18001bdf8
lea rax, [r11 + 1]
cmp rax, qword [r14 + 0x10]
jae 0x18001bdef
mov eax, r15d
mov ecx, esi
and ecx, 0xf
shr eax, 6
lea eax, [rax + rcx*4]
movzx eax, byte [rax + r10]
mov byte [rdi], al
jmp 0x18001bdf8
mov al, 0x3d
mov byte [rdi], al
jmp 0x18001bdf8
mov byte [rdi], 0x3d
inc rdi
dec edx
cmp edx, 0x27
ja 0x18001bd70
jmp 0x18001be67
cmp qword [r12 + 0x18], 0x10
mov rdi, r12
jb 0x18001be17
mov rdi, qword [r12]
mov rax, rdx
mul qword [r14 + 0x10]
shr rdx, 1
lea rax, [rdx + rdx*2]
mov qword [rsp + 0x30], rax
jmp 0x18001be67
mov qword [0x18008b0c0], rcx
mov rax, rdx
mov rcx, qword [r14 + 0x10]
xor r8d, r8d
add rcx, 2
mul rcx
mov rcx, r12
shr rdx, 1
shl rdx, 2
call fcn.1800385b0
cmp qword [r14 + 0x18], 0x10
mov r9, r14
jb 0x18001be60
mov r9, qword [r14]
mov r10, qword [0x18008b0c0]
inc r13d
lea rcx, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
movabs rdx, 0xaaaaaaaaaaaaaaab
cmp r13d, dword [rsp + 0x98]
jb 0x18001bc80
mov rax, qword [rsp + 0x30]
mov r15, qword [rsp + 0x40]
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rbp, qword [rsp + 0x58]
mov rbx, qword [rsp + 0x80]
add rsp, 0x60
pop r14
pop r13
pop r12
ret
mov rax, qword [rsp + 0x88]
lea r8, [rsp + 0x30]
mov rdx, qword [r12 + 8]
xor r9d, r9d
mov rcx, qword [r14 + 0x40]
mov dword [rsp + 0x28], SHSetFolderPathA
movsxd rax, dword [rax]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x20], rbx
call fcn.180026e00
test rax, rax
je 0x18001bef0
mov rbx, qword [rax]
mov rax, rbx
jmp 0x18001be8e