Function at 0x140020962
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x50
mov r14, rdx
mov rsi, rcx
mov ecx, 3
mov rax, r8
xor edx, edx
div rcx
mov rcx, r8
shr rcx, 0x3e
cmp ecx, 2
ja 0x140020ec4
mov r15, r8
mov r12, rdx
shl rax, 2
test rdx, rdx
je 0x1400209b0
cmp rax, 0xfffffffffffffffc
je 0x140020ec4
add rax, 4
lea rbx, [rsp + 0x20]
mov rcx, rbx
mov rdx, rax
call fcn.14004399b
mov rdi, qword [rbx + 8]
mov rbx, qword [rbx + 0x10]
xor eax, eax
mov rdx, r15
mov ecx, 0
sub rdx, 0x1a
cmovb rdx, rax
jbe 0x140020cc5
mov eax, 0x20
xor ecx, ecx
lea r8, [0x1400e4cb5]
lea r9, [rcx + 0x1a]
cmp r9, r15
ja 0x140020ec4
test rax, rax
je 0x140020ec4
cmp rax, rbx
ja 0x140020ec4
mov r9, qword [r14 + rcx]
bswap r9
mov r10, r9
shr r10, 0x3a
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x20], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x1f], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x1e], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x1d], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x1c], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x1b], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x1a], r10b
shr r9d, 0x10
and r9d, 0x3f
mov r9b, byte [r9 + r8 + 3]
mov byte [rdi + rax - 0x19], r9b
mov r9, qword [r14 + rcx + 6]
bswap r9
mov r10, r9
shr r10, 0x3a
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x18], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x17], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x16], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x15], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x14], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x13], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x12], r10b
shr r9d, 0x10
and r9d, 0x3f
mov r9b, byte [r9 + r8 + 3]
mov byte [rdi + rax - 0x11], r9b
mov r9, qword [r14 + rcx + 0xc]
bswap r9
mov r10, r9
shr r10, 0x3a
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0x10], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0xf], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0xe], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0xd], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0xc], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0xb], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 0xa], r10b
shr r9d, 0x10
and r9d, 0x3f
mov r9b, byte [r9 + r8 + 3]
mov byte [rdi + rax - 9], r9b
mov r9, qword [r14 + rcx + 0x12]
bswap r9
mov r10, r9
shr r10, 0x3a
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 8], r10b
mov r10, r9
shr r10, 0x34
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 7], r10b
mov r10, r9
shr r10, 0x2e
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 6], r10b
mov r10, r9
shr r10, 0x28
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 5], r10b
mov r10, r9
shr r10, 0x22
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 4], r10b
mov r10, r9
shr r10, 0x1c
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 3], r10b
mov r10d, r9d
shr r10d, 0x16
and r10d, 0x3f
mov r10b, byte [r10 + r8 + 3]
mov byte [rdi + rax - 2], r10b
shr r9d, 0x10
and r9d, 0x3f
mov r9b, byte [r9 + r8 + 3]
mov byte [rdi + rax - 1], r9b
add rcx, 0x18
add rax, 0x20
cmp rcx, rdx
jbe 0x1400209ee
add rax, 0xffffffffffffffe0
mov r9, r15
sub r9, r12
add rax, 4
lea rdx, [0x1400e4cb5]
lea r8, [rax - 4]
cmp rcx, r9
jae 0x140020d84
mov r10, rcx
sub r10, 0xfffffffffffffffd
jae 0x140020ec4
cmp r10, r15
ja 0x140020ec4
cmp r8, 0xfffffffffffffffb
ja 0x140020ec4
cmp rax, rbx
ja 0x140020ec4
movzx r8d, byte [r14 + rcx]
mov r11d, r8d
shr r11d, 2
mov r11b, byte [r11 + rdx + 3]
mov byte [rdi + rax - 4], r11b
mov r11b, byte [r14 + rcx + 1]
shl r8b, 4
mov ebp, r11d
shr bpl, 4
or bpl, r8b
movzx r8d, bpl
and r8d, 0x3f
mov r8b, byte [r8 + rdx + 3]
mov byte [rdi + rax - 3], r8b
movzx ecx, byte [r14 + rcx + 2]
shl r11b, 2
mov r8d, ecx
shr r8b, 6
or r8b, r11b
movzx r8d, r8b
and r8d, 0x3f
mov r8b, byte [r8 + rdx + 3]
mov byte [rdi + rax - 2], r8b
and ecx, 0x3f
mov cl, byte [rcx + rdx + 3]
mov byte [rdi + rax - 1], cl
add rax, 4
mov rcx, r10
jmp 0x140020cd6
cmp r12, 1
je 0x140020e02
cmp r12, 2
jne 0x140020e42
cmp r8, rbx
jae 0x140020ec4
movzx ecx, byte [r14 + r9]
mov eax, ecx
shr eax, 2
mov al, byte [rax + rdx + 3]
mov byte [rdi + r8], al
inc r9
cmp r9, r15
jae 0x140020ec4
lea rax, [r8 + 1]
cmp rax, rbx
jae 0x140020ec4
mov al, byte [r14 + r9]
mov r9d, eax
shr r9b, 4
shl cl, 4
or cl, r9b
movzx ecx, cl
and ecx, 0x3f
mov cl, byte [rcx + rdx + 3]
mov byte [rdi + r8 + 1], cl
lea rcx, [r8 + 2]
cmp rcx, rbx
jae 0x140020ec4
shl al, 2
and al, 0x3c
mov r9d, 3
jmp 0x140020e35
cmp r8, rbx
jae 0x140020ec4
movzx eax, byte [r14 + r9]
mov ecx, eax
shr ecx, 2
mov cl, byte [rcx + rdx + 3]
mov byte [rdi + r8], cl
lea rcx, [r8 + 1]
cmp rcx, rbx
jae 0x140020ec4
shl al, 4
and al, 0x30
mov r9d, 2
movzx eax, al
mov al, byte [rax + rdx + 3]
mov byte [rdi + rcx], al
add r8, r9
mov rax, rbx
sub rax, r8
jb 0x140020ec4
lea rdx, [rdi + r8]
mov ecx, r8d
neg ecx
and ecx, 3
xor r9d, r9d
cmp rcx, r9
je 0x140020e6d
cmp rax, r9
je 0x140020ec4
mov byte [rdx + r9], 0x3d
inc r9
jmp 0x140020e59
add r8, rcx
jb 0x140020ec4
mov r15, qword [rsp + 0x20]
lea r14, [rsp + 0x38]
mov rcx, r14
mov rdx, rdi
mov r8, rbx
call fcn.140040d31
cmp qword [r14], 0
je 0x140020eaa
movabs rax, 0x8000000000000000
cmp r15, rax
jne 0x140020ec4
mov r15, rdi
mov rdi, rbx
mov rbx, qword [rsp + 0x40]
mov qword [rsi], r15
mov qword [rsi + 8], rdi
mov qword [rsi + 0x10], rbx
add rsp, 0x50
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
ud2