Function at 0x1400c22de
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x58
mov r14, r8
mov r15, rdx
mov rdi, rcx
movabs rcx, 0xaaaaaaaaaaaaaaab
mov rax, r8
mul rcx
mov rsi, rdx
shr rsi, 1
lea rax, [rsi + rsi*2]
shl rsi, 2
mov r12, r8
sub r12, rax
je 0x1400c235a
mov rcx, r14
shr rcx, 0x3e
add rsi, 4
setb al
cmp ecx, 2
ja 0x1400c2366
test al, al
jne 0x1400c2366
test rsi, rsi
je 0x1400c237e
js 0x1400c2967
mov ecx, 8
mov rdx, rsi
call fcn.1400e4e70
test rax, rax
je 0x1400c296c
mov rbx, rax
jmp 0x1400c2383
mov rax, r14
shr rax, 0x3e
cmp eax, 3
jb 0x1400c2334
lea rcx, [0x14016e706]
lea r8, [0x14016e798]
mov edx, 0x2d
call fcn.140106aac
mov ebx, 1
xor ecx, ecx
mov r8, r14
mov eax, 0
sub r8, 0x1a
cmovb r8, rcx
jbe 0x1400c2653
mov edx, 0x20
xor eax, eax
lea r9, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov rcx, rdx
lea rdx, [rax + 0x1a]
cmp rdx, r14
ja 0x1400c28d1
test rcx, rcx
je 0x1400c28dd
cmp rcx, rsi
ja 0x1400c28f2
mov rdx, qword [r15 + rax]
bswap rdx
mov r10, rdx
shr r10, 0x3a
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x20], r10b
mov r10, rdx
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x1f], r10b
mov r10, rdx
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x1e], r10b
mov r10, rdx
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x1d], r10b
mov r10, rdx
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x1c], r10b
mov r10, rdx
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x1b], r10b
mov r10d, edx
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x1a], r10b
shr edx, 0x10
and edx, 0x3f
mov dl, byte [rdx + r9]
mov byte [rbx + rcx - 0x19], dl
mov rdx, qword [r15 + rax + 6]
bswap rdx
mov r10, rdx
shr r10, 0x3a
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x18], r10b
mov r10, rdx
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x17], r10b
mov r10, rdx
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x16], r10b
mov r10, rdx
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x15], r10b
mov r10, rdx
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x14], r10b
mov r10, rdx
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x13], r10b
mov r10d, edx
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x12], r10b
shr edx, 0x10
and edx, 0x3f
mov dl, byte [rdx + r9]
mov byte [rbx + rcx - 0x11], dl
mov rdx, qword [r15 + rax + 0xc]
bswap rdx
mov r10, rdx
shr r10, 0x3a
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0x10], r10b
mov r10, rdx
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0xf], r10b
mov r10, rdx
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0xe], r10b
mov r10, rdx
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0xd], r10b
mov r10, rdx
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0xc], r10b
mov r10, rdx
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0xb], r10b
mov r10d, edx
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 0xa], r10b
shr edx, 0x10
and edx, 0x3f
mov dl, byte [rdx + r9]
mov byte [rbx + rcx - 9], dl
mov rdx, qword [r15 + rax + 0x12]
bswap rdx
mov r10, rdx
shr r10, 0x3a
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 8], r10b
mov r10, rdx
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 7], r10b
mov r10, rdx
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 6], r10b
mov r10, rdx
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 5], r10b
mov r10, rdx
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 4], r10b
mov r10, rdx
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 3], r10b
mov r10d, edx
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r9]
mov byte [rbx + rcx - 2], r10b
shr edx, 0x10
and edx, 0x3f
mov dl, byte [rdx + r9]
mov byte [rbx + rcx - 1], dl
add rax, 0x18
lea rdx, [rcx + 0x20]
cmp rax, r8
jbe 0x1400c23a9
mov r10, r14
sub r10, r12
cmp rax, r10
jae 0x1400c2711
lea r8, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
lea r9, [rax + 3]
cmp rax, 0xfffffffffffffffc
ja 0x1400c2919
cmp r9, r14
ja 0x1400c292b
lea rdx, [rcx + 4]
cmp rcx, 0xfffffffffffffffb
ja 0x1400c28fb
cmp rdx, rsi
ja 0x1400c2907
movzx r11d, byte [r15 + rax]
mov r13d, r11d
shr r13d, 2
mov bpl, byte [r13 + r8]
mov byte [rbx + rcx], bpl
mov bpl, byte [r15 + rax + 1]
shl r11b, 4
mov r13d, ebp
shr r13b, 4
or r13b, r11b
movzx r11d, r13b
and r11d, 0x3f
mov r11b, byte [r11 + r8]
mov byte [rbx + rcx + 1], r11b
movzx eax, byte [r15 + rax + 2]
shl bpl, 2
mov r11d, eax
shr r11b, 6
or r11b, bpl
movzx r11d, r11b
and r11d, 0x3f
mov r11b, byte [r11 + r8]
mov byte [rbx + rcx + 2], r11b
and eax, 0x3f
mov al, byte [rax + r8]
mov byte [rbx + rcx + 3], al
mov rax, r9
mov rcx, rdx
cmp r9, r10
jb 0x1400c2669
jmp 0x1400c2714
mov rdx, rcx
cmp r12, 1
je 0x1400c2798
cmp r12, 2
jne 0x1400c27e5
cmp rdx, rsi
jae 0x1400c2889
mov r8b, byte [r15 + r10]
movzx eax, r8b
shr eax, 2
lea r9, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov al, byte [rax + r9]
mov byte [rbx + rdx], al
inc r10
cmp r10, r14
jae 0x1400c289e
lea rcx, [rdx + 1]
cmp rcx, rsi
jae 0x1400c28b9
mov al, byte [r15 + r10]
mov ecx, eax
shr cl, 4
shl r8b, 4
or r8b, cl
movzx ecx, r8b
and ecx, 0x3f
mov cl, byte [rcx + r9]
mov byte [rbx + rdx + 1], cl
lea rcx, [rdx + 2]
cmp rcx, rsi
jae 0x1400c28c2
shl al, 2
and al, 0x3c
mov r8d, 3
jmp 0x1400c27d1
cmp rdx, rsi
jae 0x1400c2892
mov al, byte [r15 + r10]
movzx ecx, al
shr ecx, 2
lea r8, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov cl, byte [rcx + r8]
mov byte [rbx + rdx], cl
lea rcx, [rdx + 1]
cmp rcx, rsi
jae 0x1400c28b0
shl al, 4
and al, 0x30
mov r8d, 2
movzx eax, al
lea r9, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov al, byte [rax + r9]
mov byte [rbx + rcx], al
add rdx, r8
mov rcx, rsi
sub rcx, rdx
jb 0x1400c293d
xor eax, eax
test r12, r12
je 0x1400c2816
xor r12, 3
je 0x1400c2816
lea r8, [rbx + rdx]
xor eax, eax
cmp rcx, rax
je 0x1400c287a
mov byte [r8 + rax], 0x3d
inc rax
cmp r12, rax
jne 0x1400c2804
add rdx, rax
jb 0x1400c294f
lea r14, [rsp + 0x30]
mov rcx, r14
mov rdx, rbx
mov r8, rsi
call fcn.14003cbc0
cmp qword [r14], 0
je 0x1400c2858
mov rax, qword [rsp + 0x38]
movabs rcx, 0x8000000000000000
cmp rsi, rcx
jne 0x1400c2979
mov rcx, rsi
mov rsi, rbx
jmp 0x1400c285e
mov rax, rsi
mov rcx, rbx
mov qword [rdi], rsi
mov qword [rdi + 8], rcx
mov qword [rdi + 0x10], rax
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea r8, [0x140115a70]
mov rdx, rcx
call fcn.140104820
lea r8, [0x140115980]
jmp 0x1400c2899
lea r8, [0x1401159e0]
mov rcx, rdx
jmp 0x1400c28c9
lea r8, [0x140115998]
mov rcx, r10
mov rdx, r14
call fcn.140104820
lea r8, [0x1401159f8]
jmp 0x1400c28c9
lea r8, [0x1401159b0]
jmp 0x1400c28c9
lea r8, [0x1401159c8]
mov rdx, rsi
call fcn.140104820
lea r8, [0x140115a40]
mov rcx, rdx
jmp 0x1400c2935
lea r8, [0x140115a58]
mov rcx, 0xffffffffffffffe0
xor edx, edx
call fcn.140104ad0
lea r8, [0x140115a58]
jmp 0x1400c2911
lea r8, [0x140115a28]
call fcn.140104ad0
lea r8, [0x140115a28]
mov rcx, rdx
mov rdx, rsi
call fcn.140104890
lea r8, [0x140115a10]
mov rcx, rax
mov rdx, r9
call fcn.140104ad0
lea r8, [0x140115a10]
mov rcx, r9
mov rdx, r14
call fcn.140104890
lea r8, [0x140115920]
mov rcx, rdx
mov rdx, rsi
call fcn.140104810
lea rcx, str.usize_overflow_when_calculating_b64_length
lea r8, [0x140115968]
mov edx, 0x2a
call fcn.140104c50
call fcn.140027c20
mov ecx, 1
mov rdx, rsi
call fcn.140103bc0
lea r8, [rsp + 0x30]
mov rcx, qword [r8 + 0x10]
mov qword [r8], rsi
mov qword [r8 + 8], rbx
mov qword [r8 + 0x10], rsi
mov qword [r8 + 0x18], rax
mov qword [r8 + 0x20], rcx
lea rax, [0x14016e7c0]
mov qword [rsp + 0x20], rax
lea rcx, str.Invalid_UTF8
lea r9, [0x14016c2c8]
mov edx, 0xc
call fcn.140104ba0
int3