Function at 0x696250
Capabilities:
Encode data using base64

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
xor ebp, ebp
mov rax, rcx
mov qword [rsp + 0xa0], rcx
mov ecx, dword [rcx]
mov qword [rsp + 0xb0], r8
lea r8, [rax + 8]
mov qword [rsp + 0xa8], rdx
test ecx, ecx
jle 0x696296
movsxd rax, ecx
cmp byte [r8 + rax - 1], 0x3d
je 0x696600
mov r11d, dword [rsp + 0xc0]
xor r12d, r12d
test r11d, r11d
je 0x696478
mov rdi, qword [rsp + 0xa0]
lea rax, [0x00915240]
mov r10d, dword [rsp + 0xc0]
lea rdx, [0x009151c0]
mov r15, rax
test byte [rdi + 0x5c], 2
cmovne r15, rdx
test r10d, r10d
jle 0x696670
mov edi, dword [rsp + 0xc0]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0xc0], 0
lea r10d, [rdi - 1]
add rax, 0x48
lea rdi, [r9 + r10 + 1]
mov qword [rsp + 0x40], rax
lea eax, [r8 + 0x40]
mov qword [rsp + 0x28], rdi
mov dword [rsp + 0x4c], eax
jmp 0x696354
test ebp, ebp
je 0x69638d
or eax, 0x13
cmp al, 0xf3
jne 0x696472
cmp r10d, 0xf2
je 0x696628
cmp ecx, 0x40
je 0x6963b9
cmp qword [rsp + 0x28], r9
je 0x696430
movzx edx, byte [r9]
add r9, 1
test dl, dl
js 0x696472
movzx eax, dl
movzx r10d, byte [r15 + rax]
mov eax, r10d
cmp r10d, 0xff
je 0x696472
cmp dl, 0x3d
jne 0x696328
add ebp, 1
cmp ebp, 3
je 0x696472
cmp r10d, 0xf2
je 0x696628
or eax, 0x13
cmp al, 0xf3
je 0x696344
cmp ecx, 0x3f
jg 0x696472
movsxd rax, ecx
add ecx, 1
mov byte [r8 + rax], dl
cmp ecx, 0x40
jne 0x696349
mov rax, qword [rsp + 0xa0]
mov rbx, qword [rsp + 0x38]
mov rdx, r8
mov r10, qword [rsp + 0x40]
mov ecx, dword [rsp + 0x4c]
test byte [rax + 0x5c], 2
cmovne rbx, qword [rsp + 0x30]
nop dword [rax]
movzx eax, byte [rdx]
mov esi, ecx
sub esi, edx
test al, al
js 0x6964b0
cmp byte [rbx + rax], 0xe0
jne 0x6964b0
add rdx, 1
cmp r10, rdx
jne 0x6963e0
test ebp, ebp
jne 0x696470
xor r12d, r12d
sub r12d, ebp
xor ecx, ecx
add dword [rsp + 0xc0], r12d
movsxd r12, r12d
add qword [rsp + 0xa8], r12
cmp qword [rsp + 0x28], r9
jne 0x696354
nop dword [rax]
test ecx, ecx
jle 0x696439
test cl, 3
je 0x69644d
test ecx, ecx
setne r12b
test ebp, ebp
sete al
or r12d, eax
movzx r12d, r12b
jmp 0x696478
mov r9d, ecx
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0xa0]
call sym.evp_decodeblock_int
cmp eax, ebp
jge 0x696680
nop dword [rax]
xor ecx, ecx
mov r12d, 0xffffffff
mov rax, qword [rsp + 0xb0]
mov edi, dword [rsp + 0xc0]
mov dword [rax], edi
mov rax, qword [rsp + 0xa0]
mov dword [rax], ecx
mov eax, r12d
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp esi, 3
jle 0x6964de
movsxd rax, esi
lea rcx, [rdx + rax - 1]
jmp 0x6964d7
movzx eax, byte [rbx + rax]
or eax, 0x13
cmp al, 0xf3
jne 0x6964de
sub esi, 1
sub rcx, 1
cmp esi, 3
je 0x696470
movzx eax, byte [rcx]
test al, al
jns 0x6964c0
test sil, 3
jne 0x696470
test esi, esi
jle 0x696402
mov rdi, qword [rsp + 0xa8]
xor r13d, r13d
xor r12d, r12d
jmp 0x696599
movzx eax, byte [rbx + rax]
movzx ecx, byte [rdx + 1]
mov r14d, eax
test cl, cl
js 0x6965c0
movzx r11d, byte [rbx + rcx]
movzx ecx, byte [rdx + 2]
test cl, cl
js 0x6965d8
add rdx, 4
movzx r10d, byte [rbx + rcx]
movzx ecx, byte [rdx - 1]
test cl, cl
js 0x6965f0
movzx ecx, byte [rbx + rcx]
test r14b, r14b
js 0x696470
test r11b, r11b
js 0x696470
test r10b, r10b
js 0x696470
test cl, cl
js 0x696470
shl eax, 0x12
shl r11d, 0xc
add rdi, 3
add r13d, 4
shl r10d, 6
or eax, r11d
add r12d, 3
or eax, r10d
mov byte [rdi - 2], ah
mov r10d, eax
or ecx, eax
shr r10d, 0x10
mov byte [rdi - 3], r10b
mov byte [rdi - 1], cl
cmp r13d, esi
jge 0x696409
movzx eax, byte [rdx]
test al, al
jns 0x696500
movzx ecx, byte [rdx + 1]
mov r14d, 0xffffffff
mov eax, 0xff
test cl, cl
jns 0x696513
nop dword [rax + rax]
movzx ecx, byte [rdx + 2]
mov r11d, 0xff
test cl, cl
jns 0x696524
nop word [rax + rax]
movzx ecx, byte [rdx + 3]
add rdx, 4
mov r10d, 0xff
test cl, cl
jns 0x696539
nop
mov ecx, 0xff
jmp 0x69653d
mov ebp, 1
cmp ecx, 1
je 0x696296
xor ebp, ebp
cmp byte [r8 + rax - 2], 0x3d
sete bpl
add ebp, 1
jmp 0x696296
xor r12d, r12d
test ecx, ecx
jle 0x696478
mov r12d, ecx
and r12d, 3
jne 0x696472
mov r9d, ecx
mov rdx, qword [rsp + 0xa8]
mov rcx, qword [rsp + 0xa0]
call sym.evp_decodeblock_int
cmp ebp, eax
jg 0x696470
sub eax, ebp
xor ecx, ecx
add dword [rsp + 0xc0], eax
jmp 0x696478
mov dword [rsp + 0xc0], 0
jmp 0x696430
sub eax, ebp
xor ecx, ecx
add dword [rsp + 0xc0], eax
jmp 0x696439