Function at 0x476560
Capabilities:
Encode data using base64

Disassembly:
lea r12, [rsp - 8]
cmp r12, qword [r14 + 0x10]
jbe 0x476c86
push rbp
mov rbp, rsp
add rsp, 0xffffffffffffff80
mov qword [rsp + 0x90], rax
mov rdx, qword [r11]
add rdx, 0xffffffffffffffc4
neg rdx
mov r11, rcx
mov rcx, rdx
mov r12, r9
shl r9, cl
test r12, r12
mov r12d, 0
cmove r10, r12
cmp rcx, 0x40
sbb rdx, rdx
and r9, rdx
jmp 0x4765b4
shl r9, 1
dec r10
test r9, r9
je 0x4765c2
bt r9, 0x3c
nop
jae 0x4765ae
mov qword [rsp + 0xa8], rdi
mov byte [rsp + 0xb0], sil
mov byte [rsp + 0xb1], r8b
mov qword [rsp + 0x98], rbx
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x70], r11
cmp rdi, 0xf
jae 0x47666a
mov rcx, rdi
shl rcx, 2
mov rdx, r9
shl r9, cl
lea r12, [rcx - 0x3c]
neg r12
mov r13, rcx
mov rcx, r12
shr rdx, cl
cmp r13, 0x40
sbb r13, r13
and r13, r9
movabs r9, 0xfffffffffffffff
and r9, r13
cmp rcx, 0x40
sbb r13, r13
and rdx, r13
mov r15, rdx
and edx, 1
or r9, rdx
movabs rdx, 0x800000000000000
cmp rdx, r9
jae 0x476651
lea rdx, [r15 + 1]
jmp 0x476654
mov rdx, r15
shl rdx, cl
and rdx, r13
bt rdx, 0x3d
nop
jae 0x47666d
shr rdx, 1
inc r10
jmp 0x47666d
mov rdx, r9
mov qword [rsp + 0x68], r10
mov qword [rsp + 0x60], rdx
call fcn.0047b580
movzx ecx, byte [rsp + 0xb0]
cmp cl, 0x58
jne 0x476696
call fcn.0047b8c0
movzx ecx, byte [rsp + 0xb0]
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x50], rbx
movzx edx, byte [rsp + 0xb1]
test dl, dl
je 0x476710
mov rdx, qword [rsp + 0x98]
inc rdx
mov r8, qword [rsp + 0x70]
nop dword [rax]
cmp r8, rdx
jb 0x4766cf
mov rsi, qword [rsp + 0x90]
jmp 0x476709
mov rax, qword [rsp + 0x90]
mov rbx, rdx
mov rcx, r8
mov edi, 1
lea rsi, [0x00514da0]
call fcn.004491e0
mov rdx, rbx
mov rsi, rax
mov r8, rcx
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rsp + 0xb0]
mov rbx, qword [rsp + 0x50]
mov byte [rdx + rsi - 1], 0x2d
jmp 0x476725
mov r8, qword [rsp + 0x70]
mov rdx, qword [rsp + 0x98]
mov rsi, qword [rsp + 0x90]
add rdx, 3
cmp r8, rdx
jae 0x476763
mov rax, rsi
mov rbx, rdx
mov rcx, r8
mov edi, 3
lea rsi, [0x00514da0]
call fcn.004491e0
mov rsi, rax
mov rdx, rbx
mov r8, rcx
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rsp + 0xb0]
mov rbx, qword [rsp + 0x50]
mov byte [rdx + rsi - 3], 0x30
mov byte [rdx + rsi - 2], cl
mov r9, qword [rsp + 0x60]
mov r10, r9
shr r9, 0x3c
and r9d, 1
add r9d, 0x30
mov byte [rdx + rsi - 1], r9b
shl r10, 4
mov qword [rsp + 0x60], r10
mov r9, qword [rsp + 0xa8]
test r9, r9
jge 0x4767f4
nop dword [rax + rax]
test r10, r10
je 0x4767f1
inc rdx
cmp r8, rdx
jae 0x4767e7
mov rax, rsi
mov rbx, rdx
mov rcx, r8
mov edi, 1
lea rsi, [0x00514da0]
call fcn.004491e0
mov r10, qword [rsp + 0x60]
mov rdx, rbx
mov rsi, rax
mov r8, rcx
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rsp + 0xb0]
mov rbx, qword [rsp + 0x50]
mov byte [rdx + rsi - 1], 0x2e
jmp 0x476c00
test r9, r9
jle 0x47684a
inc rdx
cmp r8, rdx
jae 0x476840
mov rax, rsi
mov rbx, rdx
mov rcx, r8
mov edi, 1
lea rsi, [0x00514da0]
call fcn.004491e0
mov r9, qword [rsp + 0xa8]
mov r10, qword [rsp + 0x60]
mov rdx, rbx
mov rsi, rax
mov r8, rcx
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rsp + 0xb0]
mov rbx, qword [rsp + 0x50]
mov byte [rdx + rsi - 1], 0x2e
jmp 0x476b61
mov r9d, ecx
or ecx, 0x20
nop
cmp r9b, cl
jne 0x47685d
mov eax, 0x70
jmp 0x476862
mov eax, 0x50
lea rbx, [rdx + 1]
cmp r8, rbx
jae 0x476891
mov byte [rsp + 0x45], al
mov rax, rsi
mov rcx, r8
mov edi, 1
lea rsi, [0x00514da0]
call fcn.004491e0
mov rsi, rax
mov r8, rcx
movzx eax, byte [rsp + 0x45]
mov byte [rbx + rsi - 1], al
mov rdx, qword [rsp + 0x68]
test rdx, rdx
jge 0x4768a9
neg rdx
mov eax, 0x2d
jmp 0x4768ae
mov eax, 0x2b
inc rbx
cmp r8, rbx
jae 0x4768e6
mov qword [rsp + 0x70], rdx
mov byte [rsp + 0x45], al
mov rax, rsi
mov rcx, r8
mov edi, 1
lea rsi, [0x00514da0]
call fcn.004491e0
mov rdx, qword [rsp + 0x70]
mov rsi, rax
mov r8, rcx
movzx eax, byte [rsp + 0x45]
mov byte [rbx + rsi - 1], al
cmp rdx, 0x64
jge 0x47696a
add rbx, 2
mov r9, rdx
sar rdx, 0x3f
movabs rax, 0xcccccccccccccccd
mov rcx, rdx
imul r9
add rdx, r9
sar rdx, 3
sub rdx, rcx
lea r10, [rdx + rdx*4]
shl r10, 1
sub r9, r10
nop
cmp r8, rbx
jae 0x476956
mov qword [rsp + 0x70], rdx
mov qword [rsp + 0x68], r9
mov rax, rsi
mov rcx, r8
mov edi, 2
lea rsi, [0x00514da0]
call fcn.004491e0
mov rdx, qword [rsp + 0x70]
mov r9, qword [rsp + 0x68]
mov rsi, rax
mov r8, rcx
add edx, 0x30
mov byte [rbx + rsi - 2], dl
lea edx, [r9 + 0x30]
mov byte [rbx + rsi - 1], dl
jmp 0x476b46
cmp rdx, 0x3e8
jge 0x476a45
add rbx, 3
movabs rax, 0xa3d70a3d70a3d70b
mov rcx, rdx
imul rdx
movabs rax, 0xcccccccccccccccd
mov rdi, rdx
imul rcx
add rdx, rcx
mov r9, rdx
sar rdx, 3
movabs rax, 0xcccccccccccccccd
mov r10, rdx
imul rdx
add rdx, r10
sar rdx, 3
sar r9, 0x3f
sub rdx, r9
lea rdx, [rdx + rdx*4]
shl rdx, 1
lea r9, [r10 + r10*4]
shl r9, 1
lea r11, [rcx + rdi]
sub r10, rdx
sub rcx, r9
nop dword [rax + rax]
cmp r8, rbx
jae 0x476a20
mov qword [rsp + 0x70], r10
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x58], r11
mov rax, rsi
mov rcx, r8
mov edi, 3
lea rsi, [0x00514da0]
call fcn.004491e0
mov r10, qword [rsp + 0x70]
mov r11, qword [rsp + 0x58]
mov rsi, rax
mov r8, rcx
mov rcx, qword [rsp + 0x68]
sar r11, 6
lea edx, [r11 + 0x30]
mov byte [rbx + rsi - 3], dl
lea edx, [r10 + 0x30]
mov byte [rbx + rsi - 2], dl
lea edx, [rcx + 0x30]
mov byte [rbx + rsi - 1], dl
nop dword [rax + rax]
jmp 0x476b46
add rbx, 4
movabs rax, 0xa3d70a3d70a3d70b
mov rcx, rdx
imul rdx
add rdx, rcx
sar rdx, 6
movzx r9d, dl
imul r9d, r9d, 0x19a
shr r9d, 0xc
lea r9d, [r9 + r9*4]
shl r9d, 1
movabs rax, 0xcccccccccccccccd
mov rdi, rdx
imul rcx
add rdx, rcx
mov r10, rdx
sar rdx, 3
lea r11, [rdx + rdx*4]
shl r11, 1
movabs rax, 0xcccccccccccccccd
mov r12, rdx
imul rdx
add rdx, r12
sar rdx, 3
sar r10, 0x3f
sub rdx, r10
lea rdx, [rdx + rdx*4]
shl rdx, 1
mov r10, rcx
sub rcx, r11
movabs rax, 0x4189374bc6a7ef9e
mov r11, rdx
imul r10
sub edi, r9d
sub r12, r11
cmp r8, rbx
jae 0x476b22
mov qword [rsp + 0x70], rcx
mov byte [rsp + 0x47], dil
mov qword [rsp + 0x68], r12
mov qword [rsp + 0x58], rdx
mov rax, rsi
mov rcx, r8
mov edi, 4
lea rsi, [0x00514da0]
call fcn.004491e0
mov rdx, qword [rsp + 0x58]
movzx edi, byte [rsp + 0x47]
mov r12, qword [rsp + 0x68]
mov rsi, rax
mov r8, rcx
mov rcx, qword [rsp + 0x70]
lea r9d, [rcx + 0x30]
sar rdx, 8
add edx, 0x30
mov byte [rbx + rsi - 4], dl
lea edx, [rdi + 0x30]
mov byte [rbx + rsi - 3], dl
lea edx, [r12 + 0x30]
mov byte [rbx + rsi - 2], dl
mov byte [rbx + rsi - 1], r9b
mov rax, rsi
mov rcx, r8
sub rsp, 0xffffffffffffff80
pop rbp
ret
mov byte [rdx + rsi - 1], r10b
dec r9
shl r11, 4
mov r10, r11
test r9, r9
jle 0x47684a
mov r11, r10
shr r10, 0x3c
and r10d, 0xf
cmp rbx, r10
jbe 0x476be5
inc rdx
movzx r10d, byte [rax + r10]
cmp r8, rdx
jae 0x476b52
mov qword [rsp + 0x48], r9
mov byte [rsp + 0x46], r10b
mov qword [rsp + 0x60], r11
mov rax, rsi
mov rbx, rdx
mov rcx, r8
mov edi, 1
lea rsi, [0x00514da0]
call fcn.004491e0
mov r9, qword [rsp + 0x48]
movzx r10d, byte [rsp + 0x46]
mov r11, qword [rsp + 0x60]
mov rdx, rbx
mov rsi, rax
mov r8, rcx
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rsp + 0xb0]
mov rbx, qword [rsp + 0x50]
nop dword [rax + rax]
jmp 0x476b52
mov rax, r10
mov rcx, rbx
call fcn.00462cc0
mov byte [rdx + rsi - 1], r10b
shl r9, 4
mov r10, r9
nop dword [rax]
test r10, r10
je 0x47684a
mov r9, r10
shr r10, 0x3c
and r10d, 0xf
cmp rbx, r10
jbe 0x476c75
inc rdx
movzx r10d, byte [rax + r10]
cmp r8, rdx
jae 0x476bf0
mov qword [rsp + 0x60], r9
mov byte [rsp + 0x46], r10b
mov rax, rsi
mov rbx, rdx
mov rcx, r8
mov edi, 1
lea rsi, [0x00514da0]
call fcn.004491e0
mov r9, qword [rsp + 0x60]
movzx r10d, byte [rsp + 0x46]
mov rdx, rbx
mov rsi, rax
mov r8, rcx
mov rax, qword [rsp + 0x78]
movzx ecx, byte [rsp + 0xb0]
mov rbx, qword [rsp + 0x50]
jmp 0x476bf0
mov rax, r10
mov rcx, rbx
nop dword [rax + rax]
call fcn.00462cc0
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
mov qword [rsp + 0x20], rdi
mov byte [rsp + 0x28], sil
mov byte [rsp + 0x29], r8b
mov qword [rsp + 0x30], r9
mov qword [rsp + 0x38], r10
mov qword [rsp + 0x40], r11
call fcn.004609c0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
movzx esi, byte [rsp + 0x28]
movzx r8d, byte [rsp + 0x29]
mov r9, qword [rsp + 0x30]
mov r10, qword [rsp + 0x38]
mov r11, qword [rsp + 0x40]
jmp fcn.00476560