Function at 0x140012530
Capabilities:
Encode data using base64

Disassembly:
sub rsp, 0x68
mov qword [rsp + 0x60], r8
mov qword [rsp + 0x58], rdx
mov qword [rsp + 0x50], rcx
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x40], rax
call fcn.140012830
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
mov ecx, 3
xor edx, edx
div rcx
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov rcx, rax
add rcx, 0xffffffffffffffff
mov qword [rsp + 0x30], rcx
cmp rax, 0
je 0x14001267d
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
movsx ecx, byte [rcx]
and ecx, 0xfc
sar ecx, 2
movsxd rcx, ecx
mov cl, byte [rax + rcx]
mov rax, qword [rsp + 0x48]
mov rdx, rax
add rdx, 1
mov qword [rsp + 0x48], rdx
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
movsx ecx, byte [rcx]
and ecx, 3
shl ecx, 4
mov rdx, qword [rsp + 0x40]
movsx edx, byte [rdx + 1]
and edx, 0xf0
sar edx, 4
add ecx, edx
movsxd rcx, ecx
mov cl, byte [rax + rcx]
mov rax, qword [rsp + 0x48]
mov rdx, rax
add rdx, 1
mov qword [rsp + 0x48], rdx
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
movsx ecx, byte [rcx + 2]
and ecx, 0xc0
sar ecx, 6
mov rdx, qword [rsp + 0x40]
movsx edx, byte [rdx + 1]
and edx, 0xf
shl edx, 2
add ecx, edx
movsxd rcx, ecx
mov cl, byte [rax + rcx]
mov rax, qword [rsp + 0x48]
mov rdx, rax
add rdx, 1
mov qword [rsp + 0x48], rdx
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
movsx ecx, byte [rcx + 2]
and ecx, 0x3f
movsxd rcx, ecx
mov cl, byte [rax + rcx]
mov rax, qword [rsp + 0x48]
mov rdx, rax
add rdx, 1
mov qword [rsp + 0x48], rdx
mov byte [rax], cl
mov rax, qword [rsp + 0x40]
add rax, 3
mov qword [rsp + 0x40], rax
jmp 0x140012575
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x20], rax
movabs rcx, 0xaaaaaaaaaaaaaaab
mul rcx
mov rax, qword [rsp + 0x20]
shr rdx, 1
lea rcx, [rdx + rdx*2]
sub rax, rcx
mov qword [rsp + 0x28], rax
je 0x140012818
jmp 0x1400126b3
mov rax, qword [rsp + 0x28]
sub rax, 1
je 0x140012790
jmp 0x1400126c7
mov rax, qword [rsp + 0x28]
sub rax, 2
jne 0x14001281d
jmp 0x1400126db
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
movsx ecx, byte [rcx]
and ecx, 0xfc
sar ecx, 2
movsxd rcx, ecx
mov cl, byte [rax + rcx]
mov rax, qword [rsp + 0x48]
mov rdx, rax
add rdx, 1
mov qword [rsp + 0x48], rdx
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
movsx ecx, byte [rcx]
and ecx, 3
shl ecx, 4
mov rdx, qword [rsp + 0x40]
movsx edx, byte [rdx + 1]
and edx, 0xf0
sar edx, 4
add ecx, edx
movsxd rcx, ecx
mov cl, byte [rax + rcx]
mov rax, qword [rsp + 0x48]
mov rdx, rax
add rdx, 1
mov qword [rsp + 0x48], rdx
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
movsx ecx, byte [rcx + 1]
and ecx, 0xf
shl ecx, 2
movsxd rcx, ecx
mov cl, byte [rax + rcx]
mov rax, qword [rsp + 0x48]
mov rdx, rax
add rdx, 1
mov qword [rsp + 0x48], rdx
mov byte [rax], cl
mov rax, qword [rsp + 0x48]
mov rcx, rax
add rcx, 1
mov qword [rsp + 0x48], rcx
mov byte [rax], 0x3d
jmp 0x14001281d
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
movsx ecx, byte [rcx]
and ecx, 0xfc
sar ecx, 2
movsxd rcx, ecx
mov cl, byte [rax + rcx]
mov rax, qword [rsp + 0x48]
mov rdx, rax
add rdx, 1
mov qword [rsp + 0x48], rdx
mov byte [rax], cl
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x40]
movsx ecx, byte [rcx]
and ecx, 3
shl ecx, 4
movsxd rcx, ecx
mov cl, byte [rax + rcx]
mov rax, qword [rsp + 0x48]
mov rdx, rax
add rdx, 1
mov qword [rsp + 0x48], rdx
mov byte [rax], cl
mov rax, qword [rsp + 0x48]
mov rcx, rax
add rcx, 1
mov qword [rsp + 0x48], rcx
mov byte [rax], 0x3d
mov rax, qword [rsp + 0x48]
mov rcx, rax
add rcx, 1
mov qword [rsp + 0x48], rcx
mov byte [rax], 0x3d
jmp 0x14001281d
jmp 0x14001281d
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x50]
sub rax, rcx
add rsp, 0x68
ret