Function at 0x14005864f
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 eax, eax
xor ebx, ebx
test r8, r8
mov dword [rsp + 0x5c], eax
mov rbp, rcx
lea eax, [rdx + 2]
sete bl
mov edi, edx
mov ecx, 3
xor edx, edx
div ecx
mov r15, r9
shl eax, 2
lea esi, [rax + 0x3f]
shr esi, 6
cmp dword [rsp + 0xd0], 1
jne 0x140058699
lea esi, [rsi + rsi*2]
jmp 0x1400586a6
xor edx, edx
cmp dword [rsp + 0xd0], 2
cmove esi, edx
add esi, eax
mov eax, 0xffffff53
test r15, r15
je 0x140058993
cmp dword [r15], esi
jae 0x1400586c4
test r8, r8
jne 0x140058993
mov r14, rbp
xor r13d, r13d
lea r9, [rsp + 0x5c]
xor r12d, r12d
cmp edi, 2
jbe 0x140058814
mov r11b, byte [r14]
lea eax, [r12 + 1]
lea edx, [r12 + 2]
add r12d, 3
mov al, byte [rbp + rax]
mov cl, byte [rbp + rdx]
mov dword [rsp + 0x30], ebx
mov edx, r11d
shr r11b, 2
shl edx, 4
mov r10d, eax
shl eax, 2
and edx, 0x30
shr r10b, 4
and eax, 0x3c
or edx, r10d
mov byte [rsp + 0x4d], dl
mov edx, ecx
and ecx, 0x3f
shr dl, 6
mov byte [rsp + 0x4f], cl
mov ecx, dword [rsp + 0xd0]
or eax, edx
movzx edx, r11b
mov byte [rsp + 0x4e], al
xor eax, eax
mov dword [rsp + 0x28], eax
mov eax, dword [r15]
mov dword [rsp + 0x20], eax
call fcn.140058551
test eax, eax
jne 0x140058816
xor eax, eax
mov dword [rsp + 0x30], ebx
movzx edx, byte [rsp + 0x4d]
mov dword [rsp + 0x28], eax
mov eax, dword [r15]
mov ecx, dword [rsp + 0xd0]
mov dword [rsp + 0x20], eax
call fcn.140058551
test eax, eax
jne 0x140058816
xor eax, eax
mov dword [rsp + 0x30], ebx
movzx edx, byte [rsp + 0x4e]
mov dword [rsp + 0x28], eax
mov eax, dword [r15]
mov ecx, dword [rsp + 0xd0]
mov dword [rsp + 0x20], eax
call fcn.140058551
test eax, eax
jne 0x140058816
xor eax, eax
mov dword [rsp + 0x30], ebx
movzx edx, byte [rsp + 0x4f]
mov dword [rsp + 0x28], eax
mov eax, dword [r15]
mov ecx, dword [rsp + 0xd0]
mov dword [rsp + 0x20], eax
call fcn.140058551
test eax, eax
jne 0x140058816
sub edi, 3
cmp dword [rsp + 0xd0], 2
je 0x14005880b
inc r13d
test r13d, 0xf
jne 0x14005880b
test edi, edi
je 0x14005880b
mov dword [rsp + 0x30], ebx
mov ecx, dword [rsp + 0xd0]
mov edx, 0xa
mov dword [rsp + 0x28], 1
mov eax, dword [r15]
mov dword [rsp + 0x20], eax
call fcn.140058551
test eax, eax
jne 0x140058816
add r14, 3
jmp 0x1400586d2
xor eax, eax
test edi, edi
je 0x14005891c
test eax, eax
jne 0x140058953
mov eax, r12d
xor r13d, r13d
mov r14b, byte [rbp + rax]
cmp edi, 2
jne 0x140058840
lea eax, [r12 + 1]
mov r13b, byte [rbp + rax]
xor r11d, r11d
mov dword [rsp + 0x30], ebx
mov edx, r14d
lea r9, [rsp + 0x5c]
mov dword [rsp + 0x28], r11d
mov eax, dword [r15]
shr dl, 2
mov ecx, dword [rsp + 0xd0]
movzx edx, dl
mov dword [rsp + 0x20], eax
call fcn.140058551
test eax, eax
jne 0x140058953
mov edx, r14d
mov eax, r13d
xor r10d, r10d
mov dword [rsp + 0x30], ebx
shl edx, 4
shr al, 4
mov dword [rsp + 0x28], r10d
mov ecx, dword [rsp + 0xd0]
and edx, 0x30
or edx, eax
mov eax, dword [r15]
movzx edx, dl
mov dword [rsp + 0x20], eax
call fcn.140058551
test eax, eax
jne 0x140058953
mov eax, dword [r15]
cmp edi, 2
jne 0x1400588d3
lea edx, [r13*4]
xor ecx, ecx
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], ecx
and edx, 0x3c
mov dword [rsp + 0x20], eax
jmp 0x1400588e8
mov dword [rsp + 0x30], ebx
mov edx, 0x3d
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], eax
mov ecx, dword [rsp + 0xd0]
call fcn.140058551
test eax, eax
jne 0x140058953
mov dword [rsp + 0x30], ebx
mov ecx, dword [rsp + 0xd0]
mov edx, 0x3d
mov dword [rsp + 0x28], 1
mov eax, dword [r15]
mov dword [rsp + 0x20], eax
call fcn.140058551
test eax, eax
jne 0x140058953
cmp dword [rsp + 0xd0], 2
je 0x140058953
mov dword [rsp + 0x30], ebx
lea r9, [rsp + 0x5c]
mov edx, 0xa
mov ecx, dword [rsp + 0xd0]
mov dword [rsp + 0x28], 1
mov eax, dword [r15]
mov dword [rsp + 0x20], eax
call fcn.140058551
mov edx, dword [rsp + 0x5c]
cmp edx, esi
je 0x140058969
cmp dword [rsp + 0xd0], 1
je 0x140058969
test eax, eax
je 0x14005898e
test r8, r8
je 0x14005897a
cmp edx, dword [r15]
jae 0x14005897a
mov ecx, edx
mov byte [r8 + rcx], 0
mov dword [r15], edx
test eax, eax
jne 0x140058993
test r8, r8
mov edx, 0xffffff36
cmove eax, edx
jmp 0x140058993
mov eax, 0xffffff66
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret