Function at 0x77b040
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.00413280
cmp byte [rbp + 0x68], 0
jne 0x77b0b2
mov rcx, qword [rbp + 0x60]
call fcn.004119f0
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 0x77b0db
cmp al, 2
jae 0x77b0eb
jmp 0x77b0e4
mov dword [rbp + 0x34], 2
jmp 0x77b0eb
mov dword [rbp + 0x34], 1
mov rcx, qword [rbp + 0x60]
call fcn.004119f0
movsxd rcx, dword [rbp + 0x34]
mov byte [rax + rcx - 1], 0
mov eax, dword [rbp + 0x38]
cmp eax, dword [rbp + 0x78]
jge 0x77b24f
cmp dword [rbp + 0x3c], 0
jle 0x77b179
mov rcx, qword [rbp + 0x60]
call fcn.004119f0
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.004119f0
movsxd rcx, dword [rbp + 0x34]
mov byte [rax + rcx - 1], 0
jmp 0x77b243
cmp dword [rbp + 0x3c], 0
jge 0x77b1ec
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.004119f0
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 0x77b243
mov rcx, qword [rbp + 0x60]
call fcn.004119f0
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.004119f0
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 0x77b109
nop
movzx rax, byte [rbp + 0x68]
sub al, 1
cmp al, 0xff
je 0x77b268
cmp al, 2
jae 0x77b352
jmp 0x77b2ce
cmp dword [rbp + 0x3c], 2
jne 0x77b272
sub dword [rbp + 0x34], 1
mov eax, 2
mov ebx, dword [rbp + 0x34]
mov dword [rbp + 0x30], eax
cmp dword [rbp + 0x30], ebx
jg 0x77b2c8
sub ebx, eax
add ebx, 1
mov rcx, qword [rbp + 0x60]
call fcn.004119f0
movsxd rcx, dword [rbp + 0x30]
mov rdx, qword [0x008008b8]
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 0x77b287
nop
jmp 0x77b352
cmp dword [rbp + 0x3c], 2
jne 0x77b2d8
sub dword [rbp + 0x34], 1
mov eax, 1
mov ebx, dword [rbp + 0x34]
mov dword [rbp + 0x30], eax
cmp dword [rbp + 0x30], ebx
jg 0x77b32e
sub ebx, eax
add ebx, 1
mov rcx, qword [rbp + 0x60]
call fcn.004119f0
movsxd rcx, dword [rbp + 0x30]
mov rdx, qword [0x008008c0]
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 0x77b2ed
nop
jmp 0x77b347
add dword [rbp + 0x34], 1
mov rcx, qword [rbp + 0x60]
call fcn.004119f0
movsxd rcx, dword [rbp + 0x34]
mov byte [rax + rcx - 1], 0x3d
mov eax, dword [rbp + 0x34]
test eax, 3
jne 0x77b331
mov rcx, qword [rbp + 0x60]
mov edx, dword [rbp + 0x34]
xor r8, r8
call fcn.00412420
mov rax, qword [rbp + 0x60]
lea rsp, [rbp + 0x48]
pop rbx
pop rbp
ret