Function at 0x140017adc
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x38
xor eax, eax
mov qword [rcx], rax
mov rsi, rcx
mov r12, rdx
mov rbp, r8
mov qword [rcx + 8], rax
xor eax, eax
imul rbx, r8, 4
seto al
test r9b, r9b
jne 0x140017b1f
test rax, rax
je 0x140017e18
call fcn.140005648
jmp 0x140017e18
test rax, rax
je 0x140017b29
call fcn.140005648
mov rax, rbx
mov ecx, 3
cqo
idiv rcx
mov rbx, rax
add rbx, 6
jns 0x140017b53
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov rcx, rbx
call fcn.140005dce
mov rdx, rbx
mov rcx, rsi
call fcn.1400066e1
mov rax, rbp
mov ecx, 3
cqo
idiv rcx
mov rax, rbp
mov r14, rdx
sub rax, rdx
mov qword [rsp + 0x28], rax
jno 0x140017b80
call fcn.140005648
lea rax, [rbp - 1]
xor ebx, ebx
xor edi, edi
mov qword [rsp + 0x20], rax
lea r15, [0x14003d8c0]
cmp qword [rsp + 0x28], rdi
jne 0x140017baa
cmp r14, 1
jne 0x140017d2d
jmp 0x140017d39
test rdi, rdi
js 0x140017bb4
cmp rdi, rbp
jl 0x140017bc1
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.140006c7e
movzx r13d, byte [r12 + rdi]
shl r13d, 0x10
add rdi, 1
jno 0x140017bd5
call fcn.140005648
test rdi, rdi
js 0x140017bdf
cmp rdi, rbp
jl 0x140017bec
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.140006c7e
movzx eax, byte [r12 + rdi]
shl eax, 8
or r13d, eax
add rdi, 1
jno 0x140017c02
call fcn.140005648
test rdi, rdi
js 0x140017c0c
cmp rdi, rbp
jl 0x140017c19
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.140006c7e
movzx eax, byte [r12 + rdi]
or r13d, eax
add rdi, 1
jno 0x140017c2c
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017c39
cmp rbx, rdx
jl 0x140017c44
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov eax, r13d
mov rdx, qword [rsi + 8]
shr eax, 0x12
mov al, byte [r15 + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x140017c69
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017c76
cmp rbx, rdx
jl 0x140017c81
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov eax, r13d
mov rdx, qword [rsi + 8]
shr eax, 0xc
and eax, 0x3f
mov al, byte [r15 + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x140017ca9
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017cb6
cmp rbx, rdx
jl 0x140017cc1
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov eax, r13d
mov rdx, qword [rsi + 8]
shr eax, 6
and eax, 0x3f
mov al, byte [r15 + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x140017ce9
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017cf6
cmp rbx, rdx
jl 0x140017d01
dec rdx
mov rcx, rbx
call fcn.140006c7e
and r13d, 0x3f
mov rcx, rsi
call fcn.140017a45
mov rax, qword [rsi + 8]
mov dl, byte [r15 + r13]
mov byte [rax + rbx + 8], dl
add rbx, 1
jno 0x140017b94
call fcn.140005648
jmp 0x140017b94
cmp r14, 2
jne 0x14001824b
jmp 0x140017d92
test rdi, rdi
js 0x140017d43
cmp rdi, rbp
jl 0x140017d4f
lea rdx, [rbp - 1]
mov rcx, rdi
call fcn.140006c7e
movzx ebp, byte [r12 + rdi]
shl ebp, 0x10
add rdi, 1
jno 0x140017d62
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017d6f
cmp rbx, rdx
jl 0x140017d7a
dec rdx
mov rcx, rbx
call fcn.140006c7e
lea rdi, [0x14003d8c0]
mov rcx, rsi
call fcn.140017a45
mov rdx, qword [rsi + 8]
jmp 0x14001807f
test rdi, rdi
js 0x140017d9c
cmp rdi, rbp
jl 0x140017da8
lea rdx, [rbp - 1]
mov rcx, rdi
call fcn.140006c7e
movzx r13d, byte [r12 + rdi]
shl r13d, 0x10
add rdi, 1
jno 0x140017dbc
call fcn.140005648
test rdi, rdi
js 0x140017dc6
cmp rdi, rbp
jl 0x140017dd2
lea rdx, [rbp - 1]
mov rcx, rdi
call fcn.140006c7e
movzx eax, byte [r12 + rdi]
shl eax, 8
or r13d, eax
add rdi, 1
jno 0x140017de8
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017df5
cmp rbx, rdx
jl 0x140017e00
dec rdx
mov rcx, rbx
call fcn.140006c7e
lea rdi, [0x14003d8c0]
mov rcx, rsi
call fcn.140017a45
mov rdx, qword [rsi + 8]
jmp 0x140018181
mov rax, rbx
mov ecx, 3
cqo
idiv rcx
mov rbx, rax
add rbx, 6
jns 0x140017e42
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov rcx, rbx
call fcn.140005dce
mov rdx, rbx
mov rcx, rsi
call fcn.1400066e1
mov rax, rbp
mov ecx, 3
cqo
idiv rcx
mov rax, rbp
mov r14, rdx
sub rax, rdx
mov qword [rsp + 0x28], rax
jno 0x140017e6f
call fcn.140005648
lea rax, [rbp - 1]
xor ebx, ebx
xor edi, edi
mov qword [rsp + 0x20], rax
lea r15, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
cmp qword [rsp + 0x28], rdi
jne 0x140017e99
cmp r14, 1
jne 0x14001801c
jmp 0x14001802b
test rdi, rdi
js 0x140017ea3
cmp rdi, rbp
jl 0x140017eb0
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.140006c7e
movzx r13d, byte [r12 + rdi]
shl r13d, 0x10
add rdi, 1
jno 0x140017ec4
call fcn.140005648
test rdi, rdi
js 0x140017ece
cmp rdi, rbp
jl 0x140017edb
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.140006c7e
movzx eax, byte [r12 + rdi]
shl eax, 8
or r13d, eax
add rdi, 1
jno 0x140017ef1
call fcn.140005648
test rdi, rdi
js 0x140017efb
cmp rdi, rbp
jl 0x140017f08
mov rdx, qword [rsp + 0x20]
mov rcx, rdi
call fcn.140006c7e
movzx eax, byte [r12 + rdi]
or r13d, eax
add rdi, 1
jno 0x140017f1b
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017f28
cmp rbx, rdx
jl 0x140017f33
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov eax, r13d
mov rdx, qword [rsi + 8]
shr eax, 0x12
mov al, byte [r15 + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x140017f58
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017f65
cmp rbx, rdx
jl 0x140017f70
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov eax, r13d
mov rdx, qword [rsi + 8]
shr eax, 0xc
and eax, 0x3f
mov al, byte [r15 + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x140017f98
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017fa5
cmp rbx, rdx
jl 0x140017fb0
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov eax, r13d
mov rdx, qword [rsi + 8]
shr eax, 6
and eax, 0x3f
mov al, byte [r15 + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x140017fd8
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140017fe5
cmp rbx, rdx
jl 0x140017ff0
dec rdx
mov rcx, rbx
call fcn.140006c7e
and r13d, 0x3f
mov rcx, rsi
call fcn.140017a45
mov rax, qword [rsi + 8]
mov dl, byte [r15 + r13]
mov byte [rax + rbx + 8], dl
add rbx, 1
jno 0x140017e83
call fcn.140005648
jmp 0x140017e83
cmp r14, 2
jne 0x14001824b
jmp 0x140018100
test rdi, rdi
js 0x140018035
cmp rdi, rbp
jl 0x140018041
lea rdx, [rbp - 1]
mov rcx, rdi
call fcn.140006c7e
movzx ebp, byte [r12 + rdi]
shl ebp, 0x10
add rdi, 1
jno 0x140018054
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140018061
cmp rbx, rdx
jl 0x14001806c
dec rdx
mov rcx, rbx
call fcn.140006c7e
lea rdi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
mov rcx, rsi
call fcn.140017a45
mov rdx, qword [rsi + 8]
mov eax, ebp
shr eax, 0x12
mov al, byte [rdi + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x140018096
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x1400180a3
cmp rbx, rdx
jl 0x1400180ae
dec rdx
mov rcx, rbx
call fcn.140006c7e
shr ebp, 0xc
mov rcx, rsi
call fcn.140017a45
and ebp, 0x30
mov rax, qword [rsi + 8]
mov dl, byte [rdi + rbp]
mov byte [rax + rbx + 8], dl
add rbx, 1
jno 0x1400180d2
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x1400180df
cmp rbx, rdx
jl 0x1400180ea
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov rax, qword [rsi + 8]
mov byte [rax + rbx + 8], 0x3d
jmp 0x14001820c
test rdi, rdi
js 0x14001810a
cmp rdi, rbp
jl 0x140018116
lea rdx, [rbp - 1]
mov rcx, rdi
call fcn.140006c7e
movzx r13d, byte [r12 + rdi]
shl r13d, 0x10
add rdi, 1
jno 0x14001812a
call fcn.140005648
test rdi, rdi
js 0x140018134
cmp rdi, rbp
jl 0x140018140
lea rdx, [rbp - 1]
mov rcx, rdi
call fcn.140006c7e
movzx eax, byte [r12 + rdi]
shl eax, 8
or r13d, eax
add rdi, 1
jno 0x140018156
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140018163
cmp rbx, rdx
jl 0x14001816e
dec rdx
mov rcx, rbx
call fcn.140006c7e
lea rdi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
mov rcx, rsi
call fcn.140017a45
mov rdx, qword [rsi + 8]
mov eax, r13d
shr eax, 0x12
mov al, byte [rdi + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x140018199
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x1400181a6
cmp rbx, rdx
jl 0x1400181b1
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov eax, r13d
mov rdx, qword [rsi + 8]
shr eax, 0xc
and eax, 0x3f
mov al, byte [rdi + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x1400181d8
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x1400181e5
cmp rbx, rdx
jl 0x1400181f0
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov eax, r13d
mov rdx, qword [rsi + 8]
shr eax, 6
and eax, 0x3c
mov al, byte [rdi + rax]
mov byte [rdx + rbx + 8], al
add rbx, 1
jno 0x140018217
call fcn.140005648
test rbx, rbx
mov rdx, qword [rsi]
js 0x140018224
cmp rbx, rdx
jl 0x14001822f
dec rdx
mov rcx, rbx
call fcn.140006c7e
mov rcx, rsi
call fcn.140017a45
mov rax, qword [rsi + 8]
mov byte [rax + rbx + 8], 0x3d
add rbx, 1
jno 0x14001824b
call fcn.140005648
test rbx, rbx
jns 0x140018264
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov rcx, rbx
call fcn.140005dce
mov rdx, rbx
mov rcx, rsi
call fcn.1400066e1
mov rax, rsi
add rsp, 0x38
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret