Function at 0x1400a35e1
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 r15, r8
mov r12, 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 r13, r8
sub r13, rax
je 0x1400a3a6e
mov rcx, r15
shr rcx, 0x3e
add rsi, 4
setb al
cmp ecx, 2
ja 0x1400a3a7e
test al, al
jne 0x1400a3a7e
mov rcx, rsi
mov dl, 1
call fcn.140012c31
mov qword [rsp + 0x28], rax
mov rbx, rdx
xor ecx, ecx
mov r8, r15
mov eax, 0
sub r8, 0x1a
cmovb r8, rcx
jbe 0x1400a3926
mov ecx, 0x20
xor eax, eax
lea r9, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
lea rdx, [rax + 0x1a]
cmp rdx, r15
ja 0x1400a3bd8
test rcx, rcx
je 0x1400a3be4
cmp rcx, rsi
ja 0x1400a3bf9
mov rdx, qword [r12 + 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 [r12 + 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 [r12 + 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 [r12 + 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
add rcx, 0x20
cmp rax, r8
jbe 0x1400a367b
add rcx, 0xffffffffffffffe0
mov r10, r15
sub r10, r13
cmp rax, r10
jae 0x1400a39e3
lea r8, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
lea r9, [rax + 3]
cmp rax, 0xfffffffffffffffc
ja 0x1400a3c02
cmp r9, r15
ja 0x1400a3c14
lea rdx, [rcx + 4]
cmp rcx, 0xfffffffffffffffb
ja 0x1400a3c26
cmp rdx, rsi
ja 0x1400a3c32
movzx r11d, byte [r12 + rax]
mov ebp, r11d
shr ebp, 2
mov bpl, byte [rbp + r8]
mov byte [rbx + rcx], bpl
mov r14b, byte [r12 + rax + 1]
shl r11b, 4
mov ebp, r14d
shr bpl, 4
or bpl, r11b
movzx r11d, bpl
and r11d, 0x3f
mov r11b, byte [r11 + r8]
mov byte [rbx + rcx + 1], r11b
movzx eax, byte [r12 + rax + 2]
shl r14b, 2
mov r11d, eax
shr r11b, 6
or r11b, r14b
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 0x1400a393c
jmp 0x1400a39e6
mov rdx, rcx
cmp r13, 1
je 0x1400a3a96
cmp r13, 2
jne 0x1400a3ae3
cmp rdx, rsi
jae 0x1400a3b90
movzx r8d, byte [r12 + r10]
mov eax, r8d
shr eax, 2
lea r9, str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_
mov al, byte [rax + r9]
mov byte [rbx + rdx], al
inc r10
cmp r10, r15
jae 0x1400a3ba5
lea rcx, [rdx + 1]
cmp rcx, rsi
jae 0x1400a3bc0
mov al, byte [r12 + 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 0x1400a3bc9
shl al, 2
and al, 0x3c
mov r8d, 3
jmp 0x1400a3acf
mov rax, r15
shr rax, 0x3e
cmp eax, 3
jb 0x1400a3643
lea rcx, [0x14015d07e]
lea r8, [0x14015d108]
mov edx, 0x2d
call fcn.1400e3279
cmp rdx, rsi
jae 0x1400a3b99
movzx eax, byte [r12 + r10]
mov ecx, eax
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 0x1400a3bb7
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 0x1400a3c44
xor eax, eax
test r13, r13
je 0x1400a3b16
xor r13, 3
je 0x1400a3b16
mov r8, rbx
add r8, rdx
xor eax, eax
cmp rcx, rax
je 0x1400a3b81
mov byte [r8 + rax], 0x3d
inc rax
cmp r13, rax
jne 0x1400a3b04
add rdx, rax
jb 0x1400a3c56
lea r15, [rsp + 0x30]
mov rcx, r15
mov rdx, rbx
mov r8, rsi
call fcn.14001be40
cmp qword [r15], 0
je 0x1400a3b60
mov rax, qword [rsp + 0x38]
movabs rcx, 0x8000000000000000
mov rdx, qword [rsp + 0x28]
cmp rdx, rcx
jne 0x1400a3c6e
mov rcx, rbx
mov rbx, rsi
mov rsi, rax
jmp 0x1400a3b65
mov rcx, qword [rsp + 0x28]
mov qword [rdi], rcx
mov qword [rdi + 8], rbx
mov qword [rdi + 0x10], rsi
add rsp, 0x58
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea r8, [0x140106f60]
mov rdx, rcx
call fcn.14001a4d0
lea r8, [0x140106e70]
jmp 0x1400a3ba0
lea r8, [0x140106ed0]
mov rcx, rdx
jmp 0x1400a3bd0
lea r8, [0x140106e88]
mov rcx, r10
mov rdx, r15
call fcn.14001a4d0
lea r8, [0x140106ee8]
jmp 0x1400a3bd0
lea r8, [0x140106ea0]
jmp 0x1400a3bd0
lea r8, [0x140106eb8]
mov rdx, rsi
call fcn.14001a4d0
lea r8, [0x140106f30]
mov rcx, rdx
jmp 0x1400a3c1e
lea r8, [0x140106f48]
mov rcx, 0xffffffffffffffe0
xor edx, edx
call fcn.14001bb10
lea r8, [0x140106f48]
jmp 0x1400a3c3c
lea r8, [0x140106f00]
mov rcx, rax
mov rdx, r9
call fcn.14001bb10
lea r8, [0x140106f00]
mov rcx, r9
mov rdx, r15
call fcn.14001b0d0
lea r8, [0x140106f18]
call fcn.14001bb10
lea r8, [0x140106f18]
mov rcx, rdx
mov rdx, rsi
call fcn.14001b0d0
lea r8, [0x140106e10]
mov rcx, rdx
mov rdx, rsi
call fcn.14001a450
lea rcx, str.usize_overflow_when_calculating_b64_length
lea r8, [0x140106e58]
mov edx, 0x2a
call fcn.14001e680
lea r8, [rsp + 0x30]
mov rcx, qword [r8 + 0x10]
mov qword [r8], rdx
mov qword [r8 + 8], rbx
mov qword [r8 + 0x10], rsi
mov qword [r8 + 0x18], rax
mov qword [r8 + 0x20], rcx
lea rax, [0x14015d130]
mov qword [rsp + 0x20], rax
lea rcx, str.Invalid_UTF8
lea r9, [0x14015ac78]
mov edx, 0xc
call fcn.14001cff0
int3