Function at 0x586d20
Capabilities:
Encode data using base64

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x587211
sub rsp, 0x60
mov qword [rsp + 0x58], rbp
lea rbp, [rsp + 0x58]
mov qword [rsp + 0x90], r8
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x78], rcx
test rbx, rbx
jne 0x586d65
mov rdx, rdi
xor esi, esi
xor ebx, ebx
xor r11d, r11d
xor r12d, r12d
nop
jmp 0x586eca
nop
cmp rbx, 0x14
jae 0x5871fd
mov rdx, qword [0x007fe918]
mov rsi, qword [0x007fe910]
nop
cmp rbx, rdx
jae 0x5871f2
mov qword [rsp + 0x90], r8
mov qword [rsp + 0x98], r9
mov qword [rsp + 0xa0], r10
mov qword [rsp + 0x68], rax
movzx edx, byte [rsi + rbx]
cmp rdi, rdx
je 0x586e0e
nop
lea rax, [0x0062c9c0]
call fcn.0040d940
mov qword [rax + 8], 0x28
lea rcx, [0x00664274]
mov qword [rax], rcx
mov rcx, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x80]
mov r8, qword [rsp + 0x90]
mov r9, qword [rsp + 0x98]
mov r10, qword [rsp + 0xa0]
xor edi, edi
xor esi, esi
lea rbx, [0x006c4e00]
xor r11d, r11d
mov r12, rax
mov rax, qword [rsp + 0x68]
jmp 0x586eca
mov qword [rsp + 0x48], rdx
mov rdx, qword [0x00807038]
lea rax, [0x00623ec0]
mov rcx, rbx
mov rbx, rdx
call fcn.00411680
mov rdx, qword [rax]
mov rsi, qword [rax + 8]
test bl, bl
je 0x586e70
mov rax, qword [rsp + 0x68]
mov rcx, qword [rsp + 0x78]
mov r8, qword [rsp + 0x90]
mov r9, qword [rsp + 0x98]
mov r10, qword [rsp + 0xa0]
mov rdi, qword [rsp + 0x48]
xor ebx, ebx
mov r11, rdx
xor r12d, r12d
mov rdx, qword [rsp + 0x80]
jmp 0x586eca
nop
lea rax, [0x0062c9c0]
call fcn.0040d940
mov qword [rax + 8], 0x25
lea rcx, [0x006632c3]
mov qword [rax], rcx
mov rcx, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x80]
mov r8, qword [rsp + 0x90]
mov r9, qword [rsp + 0x98]
mov r10, qword [rsp + 0xa0]
xor edi, edi
xor esi, esi
lea rbx, [0x006c4e00]
xor r11d, r11d
mov r12, rax
mov rax, qword [rsp + 0x68]
test rbx, rbx
jne 0x58708a
mov r12, qword [rax]
lea r13, [rdi + rsi]
nop
mov r15, qword [r12 + 0x10]
mov r12, qword [r12 + 8]
mov rbx, r11
lea r11, [r15 - 1]
test r11, r11
jl 0x586f4c
mov r12, qword [r12 + r15*8 - 8]
mov r15, r12
shr r12, 1
or r12, r15
mov r15, r12
shr r12, 2
or r12, r15
mov r15, r12
shr r12, 4
or r12, r15
mov r15, r12
shr r12, 8
or r12, r15
mov r15, r12
shr r12, 0x10
or r12, r15
mov r15, r12
shr r12, 0x20
or r12, r15
bsr r12, r12
mov r15, 0xffffffffffffffff
cmove r12, r15
shl r11, 6
inc r12
add r11, r12
jmp 0x586f4f
xor r11d, r11d
lea r12, [rdi + 0xb]
add r12, rsi
lea r15, [r11 + 7]
sar r15, 0x3f
shr r15, 0x3d
add r15, 7
add r11, r15
sar r11, 3
cmp r12, r11
jg 0x587072
cmp r9, r11
jne 0x58705a
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x30], r13
mov qword [rsp + 0x20], r11
mov qword [rsp + 0x50], rbx
mov qword [rsp + 0x28], rsi
mov rbx, r8
mov rcx, r9
mov rdi, r10
call fcn.00587f00
test rdi, rdi
jne 0x587042
test rbx, rbx
jbe 0x5871e8
movzx esi, byte [rax]
nop dword [rax + rax]
cmp rbx, 1
jbe 0x5871db
movzx edi, byte [rax + 1]
dec esi
shr esi, 0x1f
xor edi, 1
movzx edi, dil
dec edi
shr edi, 0x1f
and rsi, rdi
mov rdi, qword [rsp + 0x20]
mov r8, qword [rsp + 0x40]
mov r9, rdi
sub rdi, r8
cmp rcx, r9
jb 0x5871d0
nop dword [rax + rax]
cmp r9, rdi
jb 0x5871c5
mov rdx, r9
sub r9, rdi
mov r8, rdi
sub rdi, rcx
sar rdi, 0x3f
and rdi, r8
add rdi, rax
mov r10, qword [rsp + 0x80]
cmp r10, r9
je 0x587033
xor edi, edi
jmp 0x5870cf
mov r10, qword [rsp + 0x78]
xor r11d, r11d
xor r12d, r12d
nop
jmp 0x5870c0
mov rax, qword [0x008088b0]
mov rbx, qword [0x008088b8]
mov rbp, qword [rsp + 0x58]
add rsp, 0x60
ret
mov rax, qword [0x008088b0]
mov rbx, qword [0x008088b8]
mov rbp, qword [rsp + 0x58]
add rsp, 0x60
ret
mov rax, qword [0x008088b0]
mov rbx, qword [0x008088b8]
mov rbp, qword [rsp + 0x58]
add rsp, 0x60
ret
mov rax, rbx
mov rbx, r12
mov rbp, qword [rsp + 0x58]
add rsp, 0x60
ret
lea r13, [r11 + 1]
mov qword [rsp + 0x38], r13
movzx r15d, byte [r11 + rdi]
movzx r13d, byte [r10 + r11]
xor r13d, r15d
or r12d, r13d
mov r13, qword [rsp + 0x38]
mov r11, r13
nop dword [rax + rax]
cmp r11, r9
jl 0x58709a
nop
movzx edi, r12b
dec edi
shr edi, 0x1f
and rdi, rsi
mov rsi, qword [rsp + 0x30]
sub rdx, rsi
nop word [rax + rax]
cmp rdx, r8
ja 0x5871b7
sub r8, rdx
mov rsi, rdx
sub rdx, rcx
sar rdx, 0x3f
and rdx, rsi
add rdx, rax
mov r9, qword [rsp + 0x28]
cmp r9, r8
je 0x58710a
xor edx, edx
jmp 0x58713c
mov r9, qword [rsp + 0x50]
xor ecx, ecx
xor r10d, r10d
jmp 0x58712d
lea r11, [rcx + 1]
movzx r12d, byte [rcx + rdx]
movzx r13d, byte [rcx + r9]
xor r13d, r12d
or r10d, r13d
mov rcx, r11
cmp rcx, r8
jl 0x587116
nop
movzx edx, r10b
dec edx
shr edx, 0x1f
and rdx, rdi
lea rdi, [rsi - 1]
cmp rbx, rdi
jbe 0x5871ac
movzx ecx, byte [rsi + rax - 1]
dec ecx
shr ecx, 0x1f
and rcx, rdx
mov edx, 2
jmp 0x587179
lea rsi, [rdx + 1]
movzx r8d, byte [rdx + rax]
not r8d
movzx r8d, r8b
dec r8d
shr r8d, 0x1f
and rcx, r8
mov rdx, rsi
cmp rdx, rdi
jl 0x58715c
nop
cmp rcx, 1
je 0x58719e
mov rax, qword [0x008088b0]
mov rbx, qword [0x008088b8]
mov rbp, qword [rsp + 0x58]
add rsp, 0x60
ret
xor eax, eax
xor ebx, ebx
mov rbp, qword [rsp + 0x58]
add rsp, 0x60
ret
mov rax, rdi
mov rcx, rbx
call fcn.00465060
mov rax, rdx
mov rcx, r8
nop dword [rax]
call fcn.00465120
mov rax, rdi
mov rcx, r9
call fcn.00465120
mov rdx, rcx
mov rcx, r9
call fcn.004650e0
mov eax, 1
mov rcx, rax
call fcn.00465060
xor eax, eax
mov rcx, rax
call fcn.00465060
mov rax, rbx
mov rcx, rdx
call fcn.00465080
lea rax, [0x0061b2e0]
lea rbx, [0x006c4260]
call fcn.00435da0
nop
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
mov qword [rsp + 0x20], rdi
mov qword [rsp + 0x28], rsi
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x38], r9
mov qword [rsp + 0x40], r10
call fcn.00462a00
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x28]
mov r8, qword [rsp + 0x30]
mov r9, qword [rsp + 0x38]
mov r10, qword [rsp + 0x40]
jmp fcn.00586d20