Function at 0x140046490
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
mov qword [rsp + 0x30], 0
mov r12, rcx
mov rsi, rdx
mov rbp, r8
mov qword [rsp + 0x38], 0
test r9b, r9b
je 0x140046758
imul rcx, r8, 4
jo 0x140046710
movabs rdi, 0x5555555555555556
mov rax, rcx
sar rcx, 0x3f
imul rdi
sub rdx, rcx
add rdx, 6
mov r9, rdx
js 0x140046720
lea r14, [rsp + 0x30]
mov rcx, r14
call fcn.14000a130
mov rax, rbp
imul rdi
mov rax, rbp
sar rax, 0x3f
mov rdi, rdx
sub rdi, rax
lea rax, [rdi + rdi*2]
mov rdi, rbp
sub rdi, rax
mov rax, rbp
sub rax, rdi
mov qword [rsp + 0x28], rdi
seto r15b
mov qword [rsp + 0x20], rax
movzx r15d, r15b
jo 0x140046710
xor ebx, ebx
lea r13, [0x1400b1380]
cmp qword [rsp + 0x20], r15
je 0x140046a00
cmp rbp, r15
jle 0x1400469d8
movzx eax, byte [rsi + r15]
mov r9, r15
shl eax, 0x10
mov ecx, eax
add r9, 1
js 0x140046710
cmp r9, r15
jb 0x140046710
test r9, r9
js 0x140046b70
cmp r9, rbp
jge 0x140046b70
movzx eax, byte [rsi + r9]
shl eax, 8
or eax, ecx
mov rcx, r9
add rcx, 1
jo 0x140046710
test rcx, rcx
js 0x1400469f0
cmp rcx, rbp
jge 0x1400469f0
movzx ecx, byte [rsi + rcx]
lea r15, [r9 + 2]
mov edi, ecx
mov rcx, qword [rsp + 0x30]
or edi, eax
test rbx, rbx
js 0x1400469c0
cmp rcx, rbx
jle 0x1400469c0
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400465f2
test byte [rcx + 7], 0x40
je 0x1400465f2
mov rcx, r14
call fcn.14000c430
mov rcx, qword [rsp + 0x38]
mov r8d, edi
shr r8d, 0x12
movzx r8d, byte [r13 + r8]
mov byte [rcx + rbx + 8], r8b
add rbx, 1
mov r8, rbx
jo 0x140046710
mov rcx, qword [rsp + 0x30]
test rbx, rbx
js 0x1400469a0
cmp rbx, rcx
jge 0x1400469aa
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140046645
test byte [rcx + 7], 0x40
je 0x140046645
mov rcx, r14
call fcn.14000c430
mov rcx, qword [rsp + 0x38]
mov r8d, edi
shr r8d, 0xc
and r8d, 0x3f
movzx r8d, byte [r13 + r8]
mov byte [rcx + rbx + 8], r8b
add rbx, 1
mov r8, rbx
jo 0x140046710
mov rcx, qword [rsp + 0x30]
test rbx, rbx
js 0x1400469a0
cmp rbx, rcx
jge 0x1400469aa
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14004669c
test byte [rcx + 7], 0x40
je 0x14004669c
mov rcx, r14
call fcn.14000c430
mov rcx, qword [rsp + 0x38]
mov r8d, edi
shr r8d, 6
and r8d, 0x3f
movzx r8d, byte [r13 + r8]
mov byte [rcx + rbx + 8], r8b
add rbx, 1
mov r8, rbx
jo 0x140046710
mov rcx, qword [rsp + 0x30]
test rbx, rbx
js 0x1400469a0
cmp rbx, rcx
jge 0x1400469aa
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400466ef
test byte [rcx + 7], 0x40
je 0x1400466ef
mov rcx, r14
call fcn.14000c430
mov rcx, qword [rsp + 0x38]
mov eax, edi
and eax, 0x3f
movzx eax, byte [r13 + rax]
mov byte [rcx + rbx + 8], al
add rbx, 1
jno 0x140046543
nop dword [rax + rax]
call fcn.140008cc0
jmp 0x140046734
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov rcx, r9
call fcn.1400093d0
movdqu xmm0, xmmword [rsp + 0x30]
mov rax, r12
movups xmmword [r12], xmm0
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
imul rcx, r8, 4
jo 0x140046710
movabs rdi, 0x5555555555555556
mov rax, rcx
sar rcx, 0x3f
imul rdi
sub rdx, rcx
add rdx, 6
mov r9, rdx
js 0x140046720
lea r14, [rsp + 0x30]
mov rcx, r14
call fcn.14000a130
mov rax, rbp
imul rdi
mov rax, rbp
sar rax, 0x3f
mov rdi, rdx
sub rdi, rax
lea rax, [rdi + rdi*2]
mov rdi, rbp
sub rdi, rax
mov rax, rbp
sub rax, rdi
mov qword [rsp + 0x28], rdi
seto r15b
mov qword [rsp + 0x20], rax
movzx r15d, r15b
jo 0x140046710
xor ebx, ebx
lea r13, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
cmp qword [rsp + 0x20], r15
je 0x140046b81
cmp rbp, r15
jle 0x1400469d8
movzx edx, byte [rsi + r15]
mov rcx, r15
shl edx, 0x10
mov r8d, edx
add rcx, 1
js 0x140046710
cmp rcx, r15
jb 0x140046710
test rcx, rcx
js 0x1400469f0
cmp rcx, rbp
jge 0x1400469f0
movzx edx, byte [rsi + rcx]
shl edx, 8
or edx, r8d
mov r8, rcx
add r8, 1
jo 0x140046710
test r8, r8
js 0x140046d60
cmp r8, rbp
jge 0x140046d60
movzx r8d, byte [rsi + r8]
lea r15, [rcx + 2]
mov rcx, qword [rsp + 0x30]
mov edi, r8d
or edi, edx
test rbx, rbx
js 0x1400469c0
cmp rcx, rbx
jle 0x1400469c0
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x140046881
test byte [rcx + 7], 0x40
je 0x140046881
mov rcx, r14
call fcn.14000c430
mov rcx, qword [rsp + 0x38]
mov r8d, edi
shr r8d, 0x12
movzx r8d, byte [r13 + r8]
mov byte [rcx + rbx + 8], r8b
add rbx, 1
mov r8, rbx
jo 0x140046710
mov rcx, qword [rsp + 0x30]
test rbx, rbx
js 0x1400469a0
cmp rcx, rbx
jle 0x1400469aa
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x1400468d4
test byte [rcx + 7], 0x40
je 0x1400468d4
mov rcx, r14
call fcn.14000c430
mov rcx, qword [rsp + 0x38]
mov r8d, edi
shr r8d, 0xc
and r8d, 0x3f
movzx r8d, byte [r13 + r8]
mov byte [rcx + rbx + 8], r8b
add rbx, 1
mov r8, rbx
jo 0x140046710
mov rcx, qword [rsp + 0x30]
test rbx, rbx
js 0x1400469a0
cmp rbx, rcx
jge 0x1400469aa
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14004692b
test byte [rcx + 7], 0x40
je 0x14004692b
mov rcx, r14
call fcn.14000c430
mov rcx, qword [rsp + 0x38]
mov r8d, edi
shr r8d, 6
and r8d, 0x3f
movzx r8d, byte [r13 + r8]
mov byte [rcx + rbx + 8], r8b
add rbx, 1
mov r8, rbx
jo 0x140046710
mov rcx, qword [rsp + 0x30]
test rbx, rbx
js 0x1400469a0
cmp rcx, rbx
jle 0x1400469aa
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x14004697a
test byte [rcx + 7], 0x40
je 0x14004697a
mov rcx, r14
call fcn.14000c430
mov rcx, qword [rsp + 0x38]
mov edx, edi
and edx, 0x3f
movzx edx, byte [r13 + rdx]
mov byte [rcx + rbx + 8], dl
add rbx, 1
jno 0x1400467cf
jmp 0x140046710
movabs r8, 0x8000000000000000
lea rdx, [rcx - 1]
mov rcx, r8
call fcn.14000b8e0
jmp 0x140046734
lea rdx, [rcx - 1]
mov rcx, rbx
call fcn.14000b8e0
jmp 0x140046734
lea rdx, [rbp - 1]
mov rcx, r15
call fcn.14000b8e0
jmp 0x140046734
lea rdx, [rbp - 1]
call fcn.14000b8e0
jmp 0x140046734
cmp qword [rsp + 0x28], 1
je 0x140046c42
cmp qword [rsp + 0x28], 2
jne 0x140046b4e
cmp rbp, qword [rsp + 0x20]
jle 0x140046e90
mov rcx, r15
add rcx, 1
js 0x140046710
cmp rcx, r15
jb 0x140046710
test rcx, rcx
js 0x1400469f0
cmp rcx, rbp
jge 0x1400469f0
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046d71
cmp rbx, rax
jge 0x140046d71
movzx eax, byte [rsi + r15]
movzx esi, byte [rsi + rcx]
mov rcx, r14
lea rdi, [0x1400b1380]
shl eax, 0x10
shl esi, 8
or esi, eax
call fcn.1400463f0
mov eax, esi
shr eax, 0x12
movzx edx, byte [rdi + rax]
mov rax, qword [rsp + 0x38]
mov byte [rax + rbx + 8], dl
add rbx, 1
mov r13, rbx
jo 0x140046710
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046c31
cmp rbx, rax
jge 0x140046c31
mov rcx, r14
call fcn.1400463f0
mov eax, esi
shr eax, 0xc
and eax, 0x3f
movzx edx, byte [rdi + rax]
mov rax, qword [rsp + 0x38]
mov byte [rax + r13 + 8], dl
add r13, 1
jo 0x140046710
mov rax, qword [rsp + 0x30]
test r13, r13
js 0x140046c31
cmp r13, rax
jge 0x140046c31
mov rcx, r14
call fcn.1400463f0
mov eax, esi
shr eax, 6
and eax, 0x3c
movzx edx, byte [rdi + rax]
mov rax, qword [rsp + 0x38]
mov byte [rax + r13 + 8], dl
add r13, 1
jo 0x140046710
mov rax, qword [rsp + 0x30]
test r13, r13
js 0x140046c31
cmp r13, rax
jge 0x140046c31
mov rcx, r14
mov rbx, r13
call fcn.1400463f0
mov rax, qword [rsp + 0x38]
add rbx, 1
mov byte [rax + r13 + 8], 0x3d
jo 0x140046710
test rbx, rbx
js 0x140046ea3
mov rdx, rbx
mov rcx, r14
call fcn.14000a130
jmp 0x140046734
lea rdx, [rbp - 1]
mov rcx, r9
call fcn.14000b8e0
jmp 0x140046734
cmp qword [rsp + 0x28], 1
je 0x140046d82
cmp qword [rsp + 0x28], 2
jne 0x140046b4e
cmp rbp, qword [rsp + 0x20]
jle 0x140046e90
mov rcx, r15
add rcx, 1
js 0x140046710
cmp rcx, r15
jb 0x140046710
test rcx, rcx
js 0x1400469f0
cmp rbp, rcx
jle 0x1400469f0
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046d71
cmp rbx, rax
jge 0x140046d71
movzx eax, byte [rsi + r15]
movzx esi, byte [rsi + rcx]
mov rcx, r14
lea rdi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
shl eax, 0x10
shl esi, 8
or esi, eax
call fcn.1400463f0
mov eax, esi
shr eax, 0x12
movzx edx, byte [rdi + rax]
mov rax, qword [rsp + 0x38]
mov byte [rax + rbx + 8], dl
add rbx, 1
mov r13, rbx
jo 0x140046710
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046c31
cmp rax, rbx
jg 0x140046ab0
lea rdx, [rax - 1]
mov rcx, r13
call fcn.14000b8e0
jmp 0x140046734
cmp rbp, qword [rsp + 0x20]
jle 0x140046e90
mov rdx, qword [rsp + 0x20]
mov rax, rdx
add rax, 1
js 0x140046710
cmp rax, rdx
jb 0x140046710
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046d71
cmp rax, rbx
jle 0x140046d71
movzx esi, byte [rsi + rdx]
mov rdx, qword [rsp + 0x38]
test rdx, rdx
je 0x140046ca0
test byte [rdx + 7], 0x40
je 0x140046ca0
mov rcx, r14
call fcn.14000c430
mov rdx, qword [rsp + 0x38]
movzx eax, sil
lea rdi, [0x1400b1380]
mov esi, eax
shr eax, 2
movzx eax, byte [rdi + rax]
shl esi, 0x10
mov byte [rdx + rbx + 8], al
add rbx, 1
jo 0x140046710
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046d71
cmp rbx, rax
jge 0x140046d71
mov rcx, r14
call fcn.1400463f0
mov eax, esi
shr eax, 0xc
and eax, 0x30
movzx edx, byte [rdi + rax]
mov rax, qword [rsp + 0x38]
mov byte [rax + rbx + 8], dl
add rbx, 1
jo 0x140046710
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046d71
cmp rbx, rax
jge 0x140046d71
mov rcx, r14
call fcn.1400463f0
mov rax, qword [rsp + 0x38]
mov byte [rax + rbx + 8], 0x3d
add rbx, 1
jo 0x140046710
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046d71
cmp rbx, rax
jge 0x140046d71
mov rcx, r14
call fcn.1400463f0
mov rax, qword [rsp + 0x38]
mov byte [rax + rbx + 8], 0x3d
add rbx, 1
jno 0x140046b4e
jmp 0x140046710
lea rdx, [rbp - 1]
mov rcx, r8
call fcn.14000b8e0
jmp 0x140046734
lea rdx, [rax - 1]
mov rcx, rbx
call fcn.14000b8e0
jmp 0x140046734
cmp rbp, qword [rsp + 0x20]
jle 0x140046e90
mov rdx, qword [rsp + 0x20]
mov rax, rdx
add rax, 1
js 0x140046710
cmp rax, rdx
jb 0x140046710
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046d71
cmp rax, rbx
jle 0x140046d71
movzx esi, byte [rsi + rdx]
mov rdx, qword [rsp + 0x38]
test rdx, rdx
je 0x140046dd8
test byte [rdx + 7], 0x40
je 0x140046dd8
mov rcx, r14
call fcn.14000c430
mov rdx, qword [rsp + 0x38]
movzx eax, sil
lea rdi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__
mov esi, eax
shr eax, 2
movzx eax, byte [rdi + rax]
shl esi, 0x10
mov byte [rdx + rbx + 8], al
add rbx, 1
mov r13, rbx
jo 0x140046710
mov rax, qword [rsp + 0x30]
test rbx, rbx
js 0x140046c31
cmp rax, rbx
jle 0x140046c31
mov rcx, r14
call fcn.1400463f0
mov eax, esi
shr eax, 0xc
and eax, 0x30
add r13, 1
movzx edx, byte [rdi + rax]
mov rax, qword [rsp + 0x38]
mov byte [rax + rbx + 8], dl
jo 0x140046710
mov rax, qword [rsp + 0x30]
test r13, r13
js 0x140046c31
cmp rax, r13
jle 0x140046c31
mov rcx, r14
call fcn.1400463f0
mov rax, qword [rsp + 0x38]
mov byte [rax + r13 + 8], 0x3d
add r13, 1
jo 0x140046710
mov rax, qword [rsp + 0x30]
test r13, r13
js 0x140046c31
cmp rax, r13
jle 0x140046c31
jmp 0x140046b2e
mov rcx, qword [rsp + 0x20]
lea rdx, [rbp - 1]
call fcn.14000b8e0
jmp 0x140046734
movabs r8, 0x7fffffffffffffff
xor edx, edx
mov rcx, rbx
call fcn.1400093d0
jmp 0x140046734