Function at 0x512a20
Capabilities:
Encode data using base64

Disassembly:
cmp rsp, qword [r14 + 0x10]
jbe 0x512d59
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 0x512a6d
mov rdx, qword [rax + 8]
mov r8, qword [0x008c3570]
mov r9, qword [r8]
mov r10d, dword [rax + 0x10]
jmp 0x512cf4
mov rdx, rax
test rax, rax
jne 0x512cb9
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 0x512cae
nop word [rax + rax]
test rbx, rbx
jbe 0x512cea
mov rdx, qword [rsp + 0x78]
cmp byte [rdx], 4
jne 0x512ca3
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, [0x006822a0]
call fcn.0040eaa0
mov rdx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x38]
nop dword [rax + rax]
cmp rdx, rcx
jb 0x512ce5
cmp rcx, 1
jb 0x512cd9
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.0050d240
mov rdx, qword [rsp + 0x48]
mov qword [rdx + 0x10], rbx
mov qword [rdx + 0x18], rcx
cmp dword [0x009552b0], 0
je 0x512b92
call fcn.0046bf00
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, [0x006822a0]
call fcn.0040eaa0
mov rcx, qword [rsp + 0x80]
mov rdx, qword [rsp + 0x38]
cmp rcx, rdx
jb 0x512cd1
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.0050d240
mov rdx, qword [rsp + 0x40]
mov qword [rdx + 0x10], rbx
mov qword [rdx + 0x18], rcx
cmp dword [0x009552b0], 0
je 0x512c30
nop dword [rax + rax]
call fcn.0046bf00
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.005025e0
test rax, rax
jge 0x512c5f
mov rax, qword [rsp + 0x40]
mov rbx, qword [rsp + 0x50]
call fcn.005025e0
test rax, rax
jl 0x512c6a
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 0x512c98
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.0046c360
mov eax, 1
xor ecx, ecx
call fcn.0046c360
call fcn.0046c320
xor eax, eax
mov rcx, rax
call fcn.0046c2a0
mov r11, r10
and r10, r9
shl r10, 4
mov r12, qword [r10 + r8 + 8]
cmp r12, rdx
je 0x512d49
lea r10, [r11 + 1]
test r12, r12
jne 0x512cf4
lea rax, [0x008c3570]
mov rbx, rdx
nop dword [rax + rax]
call fcn.0040bce0
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 0x512a70
mov r8, qword [r10 + r8 + 0x10]
mov rdx, rax
mov rax, r8
jmp 0x512a70
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.00469fc0
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.00512a20