Function at 0x1402d8090
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 r12d, r12d
mov rax, rcx
mov qword [rsp + 0x90], rcx
mov ecx, dword [rcx]
mov qword [rsp + 0xa0], r8
lea r8, [rax + 8]
mov qword [rsp + 0x98], rdx
test ecx, ecx
jle 0x1402d80d7
movsxd rax, ecx
cmp byte [r8 + rax - 1], 0x3d
je 0x1402d83e0
mov edx, dword [rsp + 0xb0]
xor r13d, r13d
test edx, edx
je 0x1402d82a8
mov rax, qword [rsp + 0x90]
lea r15, [0x1403c0ee0]
test byte [rax + 0x5c], 2
lea rax, [0x1403c0e60]
cmovne r15, rax
mov eax, dword [rsp + 0xb0]
test eax, eax
jle 0x1402d8452
movsxd rax, dword [rsp + 0xb0]
mov dword [rsp + 0xb0], 0
add rax, r9
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x90]
add rax, 0x48
mov qword [rsp + 0x30], rax
lea eax, [r8 + 0x40]
mov dword [rsp + 0x3c], eax
jmp 0x1402d817d
test r12d, r12d
je 0x1402d81b8
or eax, 0x13
cmp al, 0xf3
jne 0x1402d82a2
cmp r10d, 0xf2
je 0x1402d8408
cmp ecx, 0x40
je 0x1402d81e4
cmp qword [rsp + 0x28], r9
je 0x1402d8260
movzx edx, byte [r9]
add r9, 1
test dl, dl
js 0x1402d82a2
movzx eax, dl
movzx r10d, byte [r15 + rax]
mov eax, r10d
cmp r10d, 0xff
je 0x1402d82a2
cmp dl, 0x3d
jne 0x1402d8150
add r12d, 1
cmp r12d, 3
je 0x1402d82a2
cmp r10d, 0xf2
je 0x1402d8408
or eax, 0x13
cmp al, 0xf3
je 0x1402d816d
cmp ecx, 0x3f
jg 0x1402d82a2
movsxd rax, ecx
add ecx, 1
mov byte [r8 + rax], dl
cmp ecx, 0x40
jne 0x1402d8172
mov rax, qword [rsp + 0x90]
lea rbx, [0x1403c0ee0]
mov r10, qword [rsp + 0x30]
mov rcx, r8
mov edx, dword [rsp + 0x3c]
test byte [rax + 0x5c], 2
lea rax, [0x1403c0e60]
cmovne rbx, rax
nop
movzx eax, byte [rcx]
mov edi, edx
sub edi, ecx
test al, al
js 0x1402d82e0
cmp byte [rbx + rax], 0xe0
jne 0x1402d82e0
add rcx, 1
cmp r10, rcx
jne 0x1402d8210
test r12d, r12d
jne 0x1402d82a0
xor r14d, r14d
sub r14d, r12d
xor ecx, ecx
add dword [rsp + 0xb0], r14d
movsxd r14, r14d
add qword [rsp + 0x98], r14
cmp qword [rsp + 0x28], r9
jne 0x1402d817d
nop dword [rax]
test ecx, ecx
jle 0x1402d8269
test cl, 3
je 0x1402d827e
test ecx, ecx
setne r13b
test r12d, r12d
sete al
or r13d, eax
movzx r13d, r13b
jmp 0x1402d82a8
mov r9d, ecx
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
call fcn.1402d7bd0
cmp r12d, eax
jle 0x1402d8462
nop
xor ecx, ecx
mov r13d, 0xffffffff
mov rax, qword [rsp + 0xa0]
mov esi, dword [rsp + 0xb0]
mov dword [rax], esi
mov rax, qword [rsp + 0x90]
mov dword [rax], ecx
mov eax, r13d
add rsp, 0x48
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp edi, 3
jle 0x1402d830e
movsxd rax, edi
lea rdx, [rcx + rax - 1]
jmp 0x1402d8307
movzx eax, byte [rbx + rax]
or eax, 0x13
cmp al, 0xf3
jne 0x1402d830e
sub edi, 1
sub rdx, 1
cmp edi, 3
je 0x1402d82a0
movzx eax, byte [rdx]
test al, al
jns 0x1402d82f0
test dil, 3
jne 0x1402d82a0
test edi, edi
je 0x1402d8232
mov rsi, qword [rsp + 0x98]
xor r13d, r13d
xor r14d, r14d
jmp 0x1402d83b4
movzx edx, byte [rcx + 1]
movzx eax, byte [rbx + rax]
test dl, dl
js 0x1402d83d0
movzx edx, byte [rbx + rdx]
mov ebp, edx
or ebp, eax
movzx r10d, byte [rcx + 2]
test r10b, r10b
js 0x1402d82a0
add rcx, 4
movzx r11d, byte [rbx + r10]
movzx r10d, byte [rcx - 1]
or ebp, r11d
test r10b, r10b
js 0x1402d82a0
movzx r10d, byte [rbx + r10]
or bpl, r10b
js 0x1402d82a0
shl edx, 0xc
shl eax, 0x12
add rsi, 3
add r13d, 4
or eax, edx
shl r11d, 6
add r14d, 3
or eax, r11d
mov byte [rsi - 2], ah
mov edx, eax
or r10d, eax
shr edx, 0x10
mov byte [rsi - 3], dl
mov byte [rsi - 1], r10b
cmp r13d, edi
jge 0x1402d823a
movzx eax, byte [rcx]
test al, al
jns 0x1402d8330
movzx edx, byte [rcx + 1]
mov eax, 0xff
test dl, dl
jns 0x1402d8340
mov ebp, 0xffffffff
mov edx, 0xff
jmp 0x1402d8348
mov r12d, 1
cmp ecx, 1
je 0x1402d80d7
xor r12d, r12d
cmp byte [r8 + rax - 2], 0x3d
sete r12b
add r12d, 1
jmp 0x1402d80d7
xor r13d, r13d
test ecx, ecx
jle 0x1402d82a8
mov r13d, ecx
and r13d, 3
jne 0x1402d82a2
mov r9d, ecx
mov rdx, qword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
call fcn.1402d7bd0
cmp r12d, eax
jg 0x1402d82a0
sub eax, r12d
xor ecx, ecx
add dword [rsp + 0xb0], eax
jmp 0x1402d82a8
mov dword [rsp + 0xb0], 0
jmp 0x1402d8260
sub eax, r12d
xor ecx, ecx
add dword [rsp + 0xb0], eax
jmp 0x1402d8269