Function at 0x65c4b0
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x48
xor r15d, r15d
mov qword [rsp + 0x98], rdx
mov edx, dword [rcx]
lea rdi, [rcx + 8]
mov qword [rsp + 0x90], rcx
mov qword [rsp + 0xa0], r8
mov qword [rsp], rdi
mov qword [rsp + 0x38], rdi
test edx, edx
jle 0x65c4fc
movsxd rax, edx
cmp byte [rdi + rax - 1], 0x3d
je 0x65c880
mov ecx, dword [rsp + 0xb0]
xor eax, eax
test ecx, ecx
je 0x65c727
mov rax, qword [rsp + 0x90]
lea r10, [0x008f1ac0]
lea r11, [0x008f1a40]
test byte [rax + 0x5c], 2
mov rax, r10
cmovne rax, r11
mov rsi, rax
mov qword [rsp + 0x10], rax
mov eax, dword [rsp + 0xb0]
test eax, eax
jle 0x65cab6
movzx ecx, byte [r9]
lea rdi, [r9 + 1]
test cl, cl
js 0x65c965
movzx eax, cl
movzx r8d, byte [rsi + rax]
mov eax, r8d
cmp r8d, 0xff
je 0x65c965
mov esi, dword [rsp + 0xb0]
mov qword [rsp + 0x28], r11
mov ebp, 0xffffffff
mov dword [rsp + 0xb0], 0
lea ebx, [rsi - 1]
mov qword [rsp + 0x30], r10
lea rsi, [r9 + rbx + 1]
mov qword [rsp + 8], rsi
mov rsi, qword [rsp + 0x90]
lea rbx, [rsi + 0x48]
mov esi, dword [rsp]
mov qword [rsp + 0x18], rbx
lea ebx, [rsi + 0x40]
mov dword [rsp + 0x24], ebx
jmp 0x65c61a
test r15d, r15d
je 0x65c62d
or eax, 0x13
cmp al, 0xf3
jne 0x65c722
cmp r8d, 0xf2
je 0x65c8d1
cmp edx, 0x40
je 0x65c65c
cmp rdi, qword [rsp + 8]
je 0x65c6f0
add rdi, 1
movzx ecx, byte [rdi - 1]
test cl, cl
js 0x65c722
mov rbx, qword [rsp + 0x10]
movzx eax, cl
movzx r8d, byte [rbx + rax]
mov eax, r8d
cmp r8d, 0xff
je 0x65c722
cmp cl, 0x3d
jne 0x65c5c0
add r15d, 1
cmp r15d, 3
je 0x65c722
cmp r8d, 0xf2
je 0x65c8d1
or eax, 0x13
cmp al, 0xf3
je 0x65c5dd
cmp edx, 0x3f
jg 0x65c722
mov rbx, qword [rsp]
movsxd rax, edx
add edx, 1
mov byte [rbx + rax], cl
cmp edx, 0x40
jne 0x65c5e2
mov rax, qword [rsp + 0x90]
mov r11, qword [rsp + 0x30]
test byte [rax + 0x5c], 2
movzx eax, byte [rax + 8]
cmovne r11, qword [rsp + 0x28]
test al, al
js 0x65c8a4
cmp byte [r11 + rax], 0xe0
mov rcx, qword [rsp]
jne 0x65c8a4
mov rbx, qword [rsp + 0x18]
mov r10d, dword [rsp + 0x24]
lea r9, [rcx + 1]
mov r8d, r10d
movzx eax, byte [rcx + 1]
sub r8d, r9d
mov edx, r8d
test al, al
js 0x65c753
cmp byte [r11 + rax], 0xe0
jne 0x65c753
mov rcx, r9
cmp r9, rbx
jne 0x65c698
test r15d, r15d
jne 0x65c720
xor r12d, r12d
sub r12d, r15d
xor edx, edx
add dword [rsp + 0xb0], r12d
movsxd r12, r12d
add qword [rsp + 0x98], r12
cmp rdi, qword [rsp + 8]
jne 0x65c5ed
nop
test edx, edx
jle 0x65c701
mov r12d, edx
and r12d, 3
je 0x65c8eb
test edx, edx
setne al
test r15d, r15d
sete cl
or eax, ecx
movzx eax, al
jmp 0x65c727
test edx, edx
je 0x65c93e
nop dword [rax + rax]
xor edx, edx
mov eax, 0xffffffff
mov rdi, qword [rsp + 0xa0]
mov ebx, dword [rsp + 0xb0]
mov dword [rdi], ebx
mov rdi, qword [rsp + 0x90]
mov dword [rdi], edx
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp r8d, 3
jle 0x65cae0
movsxd rax, r8d
movzx eax, byte [rcx + rax]
test al, al
js 0x65cac6
movzx eax, byte [r11 + rax]
or eax, 0x13
cmp al, 0xf3
jne 0x65cae0
sub edx, 1
movsxd rax, edx
jmp 0x65c798
movzx ecx, byte [r11 + rcx]
lea r8, [rax - 1]
or ecx, 0x13
cmp cl, 0xf3
jne 0x65c7a9
mov rax, r8
mov edx, eax
cmp eax, 3
jle 0x65c7a9
movzx ecx, byte [r9 + rax - 1]
test cl, cl
jns 0x65c784
test al, 3
jne 0x65c720
mov rbx, qword [rsp + 0x98]
xor r13d, r13d
xor r12d, r12d
jmp 0x65c862
movzx ecx, byte [r11 + rax]
mov r14d, ecx
movzx eax, byte [r9 + 1]
movzx esi, bpl
test al, al
js 0x65c7de
movzx esi, byte [r11 + rax]
movzx eax, byte [r9 + 2]
movzx r10d, bpl
test al, al
js 0x65c7f0
movzx r10d, byte [r11 + rax]
add r9, 4
movzx eax, byte [r9 - 1]
movzx r8d, bpl
test al, al
js 0x65c806
movzx r8d, byte [r11 + rax]
test r14b, r14b
js 0x65c720
test sil, sil
js 0x65c720
test r10b, r10b
js 0x65c720
test r8b, r8b
js 0x65c720
movzx eax, cl
shl esi, 0xc
add rbx, 3
add r13d, 4
shl eax, 0x12
shl r10d, 6
add r12d, 3
or eax, esi
or eax, r10d
or eax, r8d
mov ecx, eax
mov byte [rbx - 2], ah
shr ecx, 0x10
mov byte [rbx - 3], cl
mov byte [rbx - 1], al
cmp r13d, edx
jge 0x65c6cc
movzx eax, byte [r9]
test al, al
jns 0x65c7c4
mov r14d, ebp
mov ecx, ebp
jmp 0x65c7cc
mov r15d, 1
cmp edx, 1
je 0x65c4fc
xor r15d, r15d
cmp byte [rdi + rax - 2], 0x3d
sete r15b
add r15d, 1
jmp 0x65c4fc
mov rax, qword [rsp + 0x90]
movzx eax, byte [rax + 0x47]
test al, al
js 0x65cad7
movzx eax, byte [r11 + rax]
or eax, 0x13
cmp al, 0xf3
jne 0x65cad7
mov r9, qword [rsp]
jmp 0x65c77c
test edx, edx
jg 0x65c8dc
xor eax, eax
jmp 0x65c727
test dl, 3
jne 0x65c722
mov r12d, 1
mov rax, qword [rsp + 0x90]
lea r10, [0x008f1a40]
test byte [rax + 0x5c], 2
lea rax, [0x008f1ac0]
cmove r10, rax
mov rax, qword [rsp + 0x90]
movzx eax, byte [rax + 8]
test al, al
js 0x65c97f
cmp byte [r10 + rax], 0xe0
mov rcx, qword [rsp + 0x38]
jne 0x65c97f
add rcx, 1
movzx eax, byte [rcx]
sub edx, 1
test al, al
js 0x65c97a
cmp byte [r10 + rax], 0xe0
jne 0x65c97a
test edx, edx
jne 0x65c925
test r15d, r15d
jne 0x65c720
xor edi, edi
sub edi, r15d
xor edx, edx
add dword [rsp + 0xb0], edi
test r12d, r12d
je 0x65c701
xor eax, eax
jmp 0x65c727
mov dword [rsp + 0xb0], 0
mov eax, 0xffffffff
jmp 0x65c727
mov qword [rsp + 0x38], rcx
cmp edx, 3
jle 0x65c713
mov rdi, qword [rsp + 0x38]
movsxd rax, edx
movzx eax, byte [rdi + rax - 1]
test al, al
js 0x65c9d2
movzx eax, byte [r10 + rax]
or eax, 0x13
cmp al, 0xf3
jne 0x65c9d2
lea eax, [rdx - 1]
mov r8, rdi
cdqe
jmp 0x65c9c1
movzx ecx, byte [r10 + rcx]
sub rax, 1
or ecx, 0x13
cmp cl, 0xf3
jne 0x65c9d2
mov edx, eax
cmp eax, 3
jle 0x65c9d2
movzx ecx, byte [r8 + rax - 1]
test cl, cl
jns 0x65c9b0
test dl, 3
jne 0x65c720
xor esi, esi
xor edi, edi
mov ebx, 0xffffffff
mov r8, qword [rsp + 0x38]
mov r9, qword [rsp + 0x98]
jmp 0x65caa0
movzx ecx, byte [r10 + rax]
mov r14d, ecx
movzx eax, byte [r8 + 1]
movzx r13d, bl
test al, al
js 0x65ca1a
movzx r13d, byte [r10 + rax]
movzx eax, byte [r8 + 2]
movzx ebp, bl
test al, al
js 0x65ca2b
movzx ebp, byte [r10 + rax]
add r8, 4
movzx eax, byte [r8 - 1]
movzx r11d, bl
test al, al
js 0x65ca41
movzx r11d, byte [r10 + rax]
test r14b, r14b
js 0x65c720
test r13b, r13b
js 0x65c720
test bpl, bpl
js 0x65c720
test r11b, r11b
js 0x65c720
movzx eax, cl
shl r13d, 0xc
add r9, 3
add esi, 4
shl eax, 0x12
shl ebp, 6
add edi, 3
or eax, r13d
or eax, ebp
or eax, r11d
mov ecx, eax
shr ecx, 0x10
mov byte [r9 - 3], cl
movzx ecx, ah
mov byte [r9 - 2], cl
mov byte [r9 - 1], al
cmp esi, edx
jge 0x65c949
movzx eax, byte [r8]
test al, al
jns 0x65ca00
mov r14d, ebx
mov ecx, ebx
jmp 0x65ca08
mov dword [rsp + 0xb0], 0
jmp 0x65c6f0
and r8b, 3
je 0x65c7b1
xor edx, edx
jmp 0x65c722
mov r9, qword [rsp]
jmp 0x65c7b1
test r8b, 3
jne 0x65c720
test r8d, r8d
jne 0x65c7b1
jmp 0x65c6c4