Function at 0x5185a0
Capabilities:
Encode data using base64

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x5188d9
push rbp
mov rbp, rsp
sub rsp, 0x58
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x70], rbx
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x88], rsi
test rax, rax
je 0x5185ed
mov rdx, qword [rax + 8]
mov r8, qword [0x008eded0]
mov r9, qword [r8]
mov r10d, dword [rax + 0x10]
jmp 0x518874
mov rdx, rax
test rax, rax
jne 0x518839
mov rcx, qword [rdx + 0x30]
mov rax, rbx
call rcx
mov rcx, qword [rax + 0x28]
lea rdx, [rcx + 7]
sar rdx, 0x3f
shr rdx, 0x3d
lea rcx, [rdx + rcx]
lea rcx, [rcx + 7]
sar rcx, 3
lea rdx, [rcx + rcx]
lea rdx, [rdx + 1]
mov rbx, qword [rsp + 0x80]
cmp rbx, rdx
jne 0x51882e
nop word [rax + rax]
test rbx, rbx
jbe 0x51886a
mov rdx, qword [rsp + 0x78]
cmp byte [rdx], 4
jne 0x518823
mov qword [rsp + 0x30], rcx
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rcx + 0x30]
mov rax, qword [rsp + 0x70]
call rdx
mov rcx, qword [rsp + 0x30]
lea rdx, [rcx + 1]
mov qword [rsp + 0x38], rdx
mov rbx, qword [rax]
mov qword [rsp + 0x50], rbx
lea rax, [0x00698b80]
call fcn.0040da40
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x38]
nop dword [rax + rax]
cmp rdx, rcx
jb 0x518865
cmp rcx, 1
jb 0x518859
mov qword [rsp + 0x48], rax
lea r8, [rdx - 1]
mov r9, r8
neg r9
sar r9, 0x3f
and r9d, 1
mov r10, qword [rsp + 0x78]
lea rdi, [r9 + r10]
mov rbx, qword [rax + 0x10]
mov rcx, qword [rax + 0x18]
mov r9, qword [rax + 8]
mov rsi, qword [rsp + 0x30]
mov rax, r9
call fcn.00512de0
mov rdx, qword [rsp + 0x48]
mov qword [rdx + 0x10], rbx
mov qword [rdx + 0x18], rcx
cmp dword [0x00940250], 0
je 0x518712
call fcn.00472580
mov qword [r11], rax
mov rcx, qword [rdx + 8]
mov qword [r11 + 8], rcx
mov qword [rdx + 8], rax
mov byte [rdx], 0
lea rax, [0x00698b80]
call fcn.0040da40
mov rcx, qword [rsp + 0x80]
mov rdx, qword [rsp + 0x38]
cmp rcx, rdx
jb 0x518851
mov qword [rsp + 0x40], rax
mov r8, qword [rsp + 0x88]
mov r9, qword [rsp + 0x30]
sub r8, r9
sub rcx, r9
dec r8
lea rsi, [rcx - 1]
mov r9, r8
neg r9
sar r9, 0x3f
and r9, rdx
mov rdx, qword [rsp + 0x78]
lea rdi, [r9 + rdx]
mov rbx, qword [rax + 0x10]
mov rcx, qword [rax + 0x18]
mov rdx, qword [rax + 8]
mov rax, rdx
nop
call fcn.00512de0
mov rdx, qword [rsp + 0x40]
mov qword [rdx + 0x10], rbx
mov qword [rdx + 0x18], rcx
cmp dword [0x00940250], 0
je 0x5187b0
nop dword [rax + rax]
call fcn.00472580
mov qword [r11], rax
mov rcx, qword [rdx + 8]
mov qword [r11 + 8], rcx
mov qword [rdx + 8], rax
mov byte [rdx], 0
mov rax, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
call fcn.005082e0
test rax, rax
jge 0x5187df
mov rax, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
call fcn.005082e0
test rax, rax
jl 0x5187ea
xor eax, eax
mov rbx, rax
add rsp, 0x58
pop rbp
ret
mov rdx, qword [rsp + 0x68]
mov rdx, qword [rdx + 0x28]
mov rax, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call rdx
test al, al
je 0x518818
mov rax, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x40]
add rsp, 0x58
pop rbp
ret
xor eax, eax
mov rbx, rax
add rsp, 0x58
pop rbp
ret
xor eax, eax
mov rbx, rax
add rsp, 0x58
pop rbp
ret
xor eax, eax
mov rbx, rax
add rsp, 0x58
pop rbp
ret
mov rdx, qword [rax + 0x18]
mov rax, rbx
mov rbx, rcx
mov rcx, rdi
mov rdi, rsi
call rdx
add rsp, 0x58
pop rbp
ret
mov rax, rdx
call fcn.004729e0
mov eax, 1
xor ecx, ecx
call fcn.004729e0
call fcn.004729a0
xor eax, eax
mov rcx, rax
call fcn.00472920
mov r11, r10
and r10, r9
shl r10, 4
mov r12, qword [r10 + r8 + 8]
cmp r12, rdx
je 0x5188c9
lea r10, [r11 + 1]
test r12, r12
jne 0x518874
lea rax, [0x008eded0]
mov rbx, rdx
nop dword [rax + rax]
call fcn.0040b580
mov rcx, qword [rsp + 0x78]
mov rdx, qword [rsp + 0x68]
mov rbx, qword [rsp + 0x70]
mov rsi, qword [rsp + 0x88]
mov rdi, qword [rsp + 0x80]
jmp 0x5185f0
mov r8, qword [r10 + r8 + 0x10]
mov rdx, rax
mov rax, r8
jmp 0x5185f0
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
call fcn.00470640
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]
jmp fcn.005185a0