Function at 0x14005a8b8
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
xor esi, esi
mov ebx, dword [rsp + 0xd0]
test r8, r8
lea eax, [rdx + 2]
mov r12, rcx
mov ebp, edx
sete sil
mov ecx, 3
xor edx, edx
mov r15, r9
div ecx
mov dword [rsp + 0x5c], 0
shl eax, 2
lea edi, [rax + 0x3f]
shr edi, 6
cmp ebx, 1
jne 0x14005a907
lea edi, [rdi + rdi*2]
jmp 0x14005a912
cmp ebx, 2
mov edx, 0
cmove edi, edx
add eax, edi
mov dword [rsp + 0x48], eax
mov eax, 0xffffff53
test r15, r15
je 0x14005abcc
mov eax, dword [rsp + 0x48]
cmp dword [r15], eax
jae 0x14005a93d
mov eax, 0xffffff53
test r8, r8
jne 0x14005abcc
xor edi, edi
xor r13d, r13d
lea r9, [rsp + 0x5c]
cmp ebp, 2
jbe 0x14005aa72
mov eax, r13d
lea ecx, [r13 + 1]
lea edx, [r13 + 2]
mov dword [rsp + 0x30], esi
mov al, byte [r12 + rax]
mov cl, byte [r12 + rcx]
add r13d, 3
mov dword [rsp + 0x28], 0
mov r11b, byte [r12 + rdx]
mov r14d, eax
mov edx, ecx
shl ecx, 2
shl r14d, 4
shr dl, 4
and ecx, 0x3c
and r14d, 0x30
shr al, 2
or r14d, edx
mov edx, r11d
and r11d, 0x3f
shr dl, 6
mov byte [rsp + 0x4f], r11b
or ecx, edx
movzx edx, al
mov eax, dword [r15]
mov byte [rsp + 0x4e], cl
mov ecx, ebx
mov dword [rsp + 0x20], eax
call fcn.14005a7af
test eax, eax
jne 0x14005aa74
mov eax, dword [r15]
mov dword [rsp + 0x30], esi
movsx edx, r14b
mov ecx, ebx
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], eax
call fcn.14005a7af
test eax, eax
jne 0x14005aa74
mov eax, dword [r15]
movsx edx, byte [rsp + 0x4e]
mov dword [rsp + 0x30], esi
mov ecx, ebx
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], eax
call fcn.14005a7af
test eax, eax
jne 0x14005aa74
mov eax, dword [r15]
movzx edx, byte [rsp + 0x4f]
mov dword [rsp + 0x30], esi
mov ecx, ebx
mov dword [rsp + 0x28], 0
mov dword [rsp + 0x20], eax
call fcn.14005a7af
test eax, eax
jne 0x14005aa74
sub ebp, 3
cmp ebx, 2
je 0x14005a947
inc edi
test dil, 0xf
jne 0x14005a947
test ebp, ebp
je 0x14005aa72
mov eax, dword [r15]
mov dword [rsp + 0x30], esi
mov edx, 0xa
mov ecx, ebx
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], eax
call fcn.14005a7af
test eax, eax
je 0x14005a947
jmp 0x14005aa74
xor eax, eax
test ebp, ebp
je 0x14005ab63
test eax, eax
jne 0x14005ab90
mov eax, r13d
xor r14d, r14d
mov dil, byte [r12 + rax]
cmp ebp, 2
jne 0x14005aa9b
lea eax, [r13 + 1]
mov r14b, byte [r12 + rax]
mov eax, dword [r15]
mov edx, edi
mov dword [rsp + 0x30], esi
lea r9, [rsp + 0x5c]
mov dword [rsp + 0x28], 0
shr dl, 2
mov ecx, ebx
mov dword [rsp + 0x20], eax
movzx edx, dl
call fcn.14005a7af
test eax, eax
jne 0x14005ab90
shl edi, 4
mov eax, r14d
mov dword [rsp + 0x30], esi
mov ecx, ebx
mov edx, edi
shr al, 4
mov dword [rsp + 0x28], 0
and edx, 0x30
or edx, eax
mov eax, dword [r15]
movsx edx, dl
mov dword [rsp + 0x20], eax
call fcn.14005a7af
test eax, eax
jne 0x14005ab90
mov eax, dword [r15]
cmp ebp, 2
jne 0x14005ab24
lea edx, [r14*4]
mov dword [rsp + 0x30], esi
mov dword [rsp + 0x28], 0
and edx, 0x3c
mov dword [rsp + 0x20], eax
jmp 0x14005ab39
mov dword [rsp + 0x30], esi
mov edx, 0x3d
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], eax
mov ecx, ebx
call fcn.14005a7af
test eax, eax
jne 0x14005ab90
mov eax, dword [r15]
mov dword [rsp + 0x30], esi
mov edx, 0x3d
mov ecx, ebx
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], eax
call fcn.14005a7af
test eax, eax
jne 0x14005ab90
cmp ebx, 2
je 0x14005ab90
mov eax, dword [r15]
mov dword [rsp + 0x30], esi
lea r9, [rsp + 0x5c]
mov ecx, ebx
mov dword [rsp + 0x28], 1
mov edx, 0xa
mov dword [rsp + 0x20], eax
call fcn.14005a7af
mov edx, dword [rsp + 0x5c]
cmp edx, dword [rsp + 0x48]
je 0x14005aba2
dec ebx
je 0x14005aba2
test eax, eax
je 0x14005abc7
test r8, r8
je 0x14005abb3
cmp edx, dword [r15]
jae 0x14005abb3
mov ecx, edx
mov byte [r8 + rcx], 0
mov dword [r15], edx
test eax, eax
jne 0x14005abcc
test r8, r8
mov edx, 0xffffff36
cmove eax, edx
jmp 0x14005abcc
mov eax, 0xffffff66
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret