Function at 0x789630
Capabilities:
Encode data using base64
Encrypt data using rc4 prga

Disassembly:
push rbp
push rbx
sub rsp, 0x48
mov rbp, rsp
mov qword [rbp + 0x60], rcx
mov byte [rbp + 0x68], dl
mov qword [rbp + 0x70], r8
mov dword [rbp + 0x78], r9d
mov rcx, qword [rbp + 0x60]
xor r8, r8
mov eax, dword [rbp + 0x78]
add eax, eax
add eax, eax
mov r9d, 3
cdq
idiv r9d
add eax, 4
mov edx, r8d
mov r8d, eax
call fcn.00412780
cmp byte [rbp + 0x68], 0
jne 0x7896a2
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movzx rcx, byte [rbp + 0x78]
sub cl, 1
and cl, 0x3f
add cl, 0x21
mov byte [rax], cl
mov eax, dword [rbp + 0x78]
add eax, 2
mov ecx, 3
cdq
idiv ecx
lea rax, [rax + rax*2]
mov dword [rbp + 0x78], eax
mov dword [rbp + 0x3c], 2
mov dword [rbp + 0x38], 0
mov dword [rbp + 0x34], 0
movzx rax, byte [rbp + 0x68]
sub al, 1
cmp al, 0xff
je 0x7896cb
cmp al, 2
jae 0x7896db
jmp 0x7896d4
mov dword [rbp + 0x34], 2
jmp 0x7896db
mov dword [rbp + 0x34], 1
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movsxd rcx, dword [rbp + 0x34]
mov byte [rax + rcx - 1], 0
mov eax, dword [rbp + 0x38]
cmp eax, dword [rbp + 0x78]
jge 0x78983f
cmp dword [rbp + 0x3c], 0
jle 0x789769
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movsxd rdx, dword [rbp + 0x34]
mov rcx, qword [rbp + 0x60]
mov r8, qword [rcx]
movsxd r9, dword [rbp + 0x34]
mov rcx, qword [rbp + 0x70]
movsxd r10, dword [rbp + 0x38]
movzx r10, byte [rcx + r10]
mov r11d, 0x3f
movzx rcx, byte [rbp + 0x3c]
shl r11d, cl
and r10d, r11d
movzx rcx, byte [rbp + 0x3c]
shr r10d, cl
movzx rcx, byte [r8 + r9 - 1]
or cl, r10b
mov byte [rax + rdx - 1], cl
sub dword [rbp + 0x3c], 6
add dword [rbp + 0x34], 1
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movsxd rcx, dword [rbp + 0x34]
mov byte [rax + rcx - 1], 0
jmp 0x789833
cmp dword [rbp + 0x3c], 0
jge 0x7897dc
mov eax, dword [rbp + 0x3c]
movsxd rcx, eax
shr rcx, 0x20
xor eax, ecx
sub eax, ecx
mov dword [rbp + 0x3c], eax
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movsxd rdx, dword [rbp + 0x34]
mov rcx, qword [rbp + 0x60]
mov r8, qword [rcx]
movsxd r9, dword [rbp + 0x34]
mov rcx, qword [rbp + 0x70]
movsxd r10, dword [rbp + 0x38]
movzx r10, byte [rcx + r10]
mov r11d, 0x3f
movzx rcx, byte [rbp + 0x3c]
shr r11d, cl
and r10d, r11d
movzx rcx, byte [rbp + 0x3c]
shl r10d, cl
movzx rcx, byte [r8 + r9 - 1]
or cl, r10b
mov byte [rax + rdx - 1], cl
mov eax, 8
sub eax, dword [rbp + 0x3c]
mov dword [rbp + 0x3c], eax
add dword [rbp + 0x38], 1
jmp 0x789833
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movsxd rcx, dword [rbp + 0x34]
mov rdx, qword [rbp + 0x60]
mov rdx, qword [rdx]
movsxd r8, dword [rbp + 0x34]
mov r9, qword [rbp + 0x70]
movsxd r10, dword [rbp + 0x38]
movzx r9, byte [r9 + r10]
and r9b, 0x3f
movzx rdx, byte [rdx + r8 - 1]
or dl, r9b
mov byte [rax + rcx - 1], dl
add dword [rbp + 0x34], 1
add dword [rbp + 0x38], 1
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movsxd rcx, dword [rbp + 0x34]
mov byte [rax + rcx - 1], 0
mov dword [rbp + 0x3c], 2
mov eax, dword [rbp + 0x38]
cmp eax, dword [rbp + 0x78]
jl 0x7896f9
nop
movzx rax, byte [rbp + 0x68]
sub al, 1
cmp al, 0xff
je 0x789858
cmp al, 2
jae 0x789942
jmp 0x7898be
cmp dword [rbp + 0x3c], 2
jne 0x789862
sub dword [rbp + 0x34], 1
mov eax, 2
mov ebx, dword [rbp + 0x34]
mov dword [rbp + 0x30], eax
cmp dword [rbp + 0x30], ebx
jg 0x7898b8
sub ebx, eax
add ebx, 1
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movsxd rcx, dword [rbp + 0x30]
mov rdx, qword [0x008145b8]
mov r8, qword [rbp + 0x60]
mov r8, qword [r8]
movsxd r9, dword [rbp + 0x30]
movzx r8, byte [r8 + r9 - 1]
add r8d, 1
mov r8d, r8d
movzx rdx, byte [rdx + r8 - 1]
mov byte [rax + rcx - 1], dl
add dword [rbp + 0x30], 1
sub ebx, 1
test ebx, ebx
jne 0x789877
nop
jmp 0x789942
cmp dword [rbp + 0x3c], 2
jne 0x7898c8
sub dword [rbp + 0x34], 1
mov eax, 1
mov ebx, dword [rbp + 0x34]
mov dword [rbp + 0x30], eax
cmp dword [rbp + 0x30], ebx
jg 0x78991e
sub ebx, eax
add ebx, 1
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movsxd rcx, dword [rbp + 0x30]
mov rdx, qword [0x008145c0]
mov r8, qword [rbp + 0x60]
mov r8, qword [r8]
movsxd r9, dword [rbp + 0x30]
movzx r8, byte [r8 + r9 - 1]
add r8d, 1
mov r8d, r8d
movzx rdx, byte [rdx + r8 - 1]
mov byte [rax + rcx - 1], dl
add dword [rbp + 0x30], 1
sub ebx, 1
test ebx, ebx
jne 0x7898dd
nop
jmp 0x789937
add dword [rbp + 0x34], 1
mov rcx, qword [rbp + 0x60]
call fcn.00410ef0
movsxd rcx, dword [rbp + 0x34]
mov byte [rax + rcx - 1], 0x3d
mov eax, dword [rbp + 0x34]
test eax, 3
jne 0x789921
mov rcx, qword [rbp + 0x60]
mov edx, dword [rbp + 0x34]
xor r8, r8
call fcn.00411920
mov rax, qword [rbp + 0x60]
lea rsp, [rbp + 0x48]
pop rbx
pop rbp
ret