Function at 0x408690
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov eax, dword [rsp + 0xa8]
mov qword [rsp + 0x70], rcx
mov qword [rsp + 0x78], rdx
mov r15, qword [rsp + 0x90]
and eax, 0xfffffff9
cmp eax, 1
jne 0x408981
mov r14d, dword [rsp + 0xa8]
mov rbp, r8
mov r12, r9
and r14d, 4
test r9, r9
je 0x40895e
xor ebx, ebx
xor esi, esi
xor r13d, r13d
xor edi, edi
mov r8d, 0x7a
mov r9d, 0x39
jmp 0x40877b
xor ecx, 0x2d
xor eax, 0x5f
movsx ecx, cl
neg ecx
shr ecx, 8
not ecx
and ecx, 0x3e
movsx eax, al
neg eax
shr eax, 8
not eax
and eax, 0x3f
or ecx, eax
or edx, ecx
mov eax, edx
neg eax
shr eax, 8
not eax
and r11d, eax
movzx eax, r11b
or edx, eax
cmp edx, 0xff
je 0x40880b
shl esi, 6
lea rcx, [rdi + 6]
add esi, edx
cmp rcx, 7
jbe 0x40876b
lea rcx, [rdi - 2]
cmp qword [rsp + 0x78], r13
jbe 0x408905
mov rdi, qword [rsp + 0x70]
mov eax, esi
shr eax, cl
mov byte [rdi + r13], al
add r13, 1
add rbx, 1
mov rdi, rcx
cmp r12, rbx
jbe 0x408839
movsx r10d, byte [rbp + rbx]
mov r11d, r8d
lea ecx, [r10 - 0x61]
sub r11d, r10d
lea edx, [r10 - 0x41]
mov eax, r10d
or r11d, ecx
lea ecx, [r10 - 0x47]
shr r11d, 8
not r11d
and r11d, ecx
mov ecx, 0x5a
sub ecx, r10d
or ecx, edx
shr ecx, 8
not ecx
and edx, ecx
mov ecx, r9d
or edx, r11d
sub ecx, r10d
lea r11d, [r10 - 0x30]
or ecx, r11d
lea r11d, [r10 + 4]
shr ecx, 8
not ecx
and ecx, r11d
mov r11d, r10d
xor r11d, 0x41
or ecx, edx
movsx r11d, r11b
movzx edx, cl
mov ecx, r10d
neg r11d
shr r11d, 8
test r14d, r14d
jne 0x4086fa
xor ecx, 0x2b
xor eax, 0x2f
movsx ecx, cl
neg ecx
shr ecx, 8
not ecx
and ecx, 0x3e
jmp 0x40870d
test r15, r15
je 0x408839
mov edx, r10d
mov rcx, r15
call sym.strchr
test rax, rax
je 0x408839
add rbx, 1
mov r8d, 0x7a
mov r9d, 0x39
cmp r12, rbx
ja 0x40877b
mov eax, 0xffffffff
cmp rdi, 4
jbe 0x408889
xor r13d, r13d
cmp qword [rsp + 0xa0], 0
je 0x40889a
lea rsi, [rbp + rbx]
mov rdi, qword [rsp + 0xa0]
mov qword [rdi], rsi
cmp qword [rsp + 0x98], 0
je 0x408878
mov rdi, qword [rsp + 0x98]
mov qword [rdi], r13
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, edi
shl eax, cl
not eax
test eax, esi
je 0x4088a1
mov eax, 0xffffffff
jmp 0x408844
cmp r12, rbx
je 0x408862
jmp 0x4088e8
test byte [rsp + 0xa8], 2
je 0x40891e
test r15, r15
je 0x4088fe
cmp r12, rbx
ja 0x4088c0
jmp 0x4088fe
add rbx, 1
cmp rbx, r12
jae 0x4088fe
movsx edx, byte [rbp + rbx]
mov rcx, r15
lea rsi, [rbp + rbx]
call sym.strchr
test rax, rax
jne 0x4088b7
xor eax, eax
cmp qword [rsp + 0xa0], 0
jne 0x408857
call qword [sym.imp.msvcrt.dll__errno]
mov dword [rax], 0x16
mov eax, 0xffffffff
jmp 0x408862
xor eax, eax
jmp 0x408847
call qword [sym.imp.msvcrt.dll__errno]
xor r13d, r13d
mov dword [rax], 0x22
mov eax, 0xffffffff
jmp 0x408847
shr rdi, 1
je 0x4088ab
cmp r12, rbx
ja 0x408945
jmp 0x408905
test r15, r15
je 0x408968
mov rcx, r15
call sym.strchr
test rax, rax
je 0x408968
add rbx, 1
cmp rbx, r12
jae 0x408905
movsx edx, byte [rbp + rbx]
cmp edx, 0x3d
jne 0x40892a
add rbx, 1
sub rdi, 1
jne 0x408940
jmp 0x4088ab
xor r13d, r13d
xor ebx, ebx
jmp 0x4088ab
call qword [sym.imp.msvcrt.dll__errno]
xor r13d, r13d
mov dword [rax], 0x16
mov eax, 0xffffffff
jmp 0x408847
call sym.sodium_misuse
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop