Function at 0x140051b80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x60
mov qword [rbp - 0x38], rbx
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x28], rdi
mov qword [rbp - 0x20], r12
mov qword [rbp - 0x18], r13
mov rbx, rcx
mov rdx, qword [rbx + 8]
mov rax, qword [rbx]
mov qword [rbp - 0x10], rax
mov qword [rbp - 8], rdx
mov rsi, qword [rbp - 0x10]
test rsi, rsi
lea rsi, [rsi - 1]
je 0x140051c29
mov rcx, qword [rbp - 8]
movzx edi, byte [rsi + rcx]
cmp dil, 0x80
jb 0x140051beb
lea r8, [rsi + 1]
mov r9, qword [rbx]
cmp r9, r8
jb 0x140051d94
lea rax, [rsi + 1]
mov rdx, qword [rbx + 8]
mov qword [rbx], rax
mov qword [rbx + 8], rdx
jmp 0x140051c48
movzx ecx, dil
call fcn.140060380
xor al, 1
je 0x140051bb2
lea r8, [rsi + 1]
mov rdx, qword [rbx]
cmp rdx, r8
jb 0x140051daf
lea rax, [rsi + 1]
mov rdx, qword [rbx + 8]
mov rbx, qword [rbp - 0x38]
mov rsi, qword [rbp - 0x30]
mov rdi, qword [rbp - 0x28]
mov r12, qword [rbp - 0x20]
mov r13, qword [rbp - 0x18]
mov rsp, rbp
pop rbp
ret
mov rdx, qword [rbx + 8]
xor eax, eax
mov rbx, qword [rbp - 0x38]
mov rsi, qword [rbp - 0x30]
mov rdi, qword [rbp - 0x28]
mov r12, qword [rbp - 0x20]
mov r13, qword [rbp - 0x18]
mov rsp, rbp
pop rbp
ret
mov rsi, qword [rbx]
test rsi, rsi
lea rsi, [rsi - 1]
je 0x140051d63
mov r8, qword [rbx]
cmp rsi, r8
jae 0x140051dca
mov r10, qword [rbx + 8]
movzx edi, byte [r10 + rsi]
cmp dil, 0x7f
ja 0x140051c85
movzx ecx, dil
call fcn.140060420
test al, al
jne 0x140051c4b
jmp 0x140051d63
test rsi, rsi
je 0x140051d63
mov r9b, dil
and r9b, 0xc0
cmp r9b, 0x80
jne 0x140051d63
mov r12d, edi
and r12d, 0x3f
lea r8, [rsi - 1]
mov rdx, qword [rbx]
cmp r8, rdx
jae 0x140051de1
mov r8, qword [rbx + 8]
add r8, rsi
movzx edi, byte [r8 - 1]
mov r10b, dil
and r10b, 0xe0
cmp r10b, 0xc0
jne 0x140051cf5
mov cl, dil
and ecx, 0x1f
shl ecx, 6
add ecx, r12d
call fcn.140060420
test al, al
je 0x140051d63
dec rsi
jmp 0x140051c4b
cmp rsi, 1
je 0x140051d63
mov r9b, dil
and r9b, 0xc0
cmp r9b, 0x80
jne 0x140051d63
lea rdx, [rsi - 2]
mov rcx, qword [rbx]
cmp rdx, rcx
jae 0x140051df5
mov r10, qword [rbx + 8]
add r10, rsi
movzx r13d, byte [r10 - 2]
mov r9b, r13b
and r9b, 0xf0
cmp r9b, 0xe0
jne 0x140051d63
mov cl, r13b
and ecx, 0xf
shl ecx, 0xc
mov dl, dil
and edx, 0x3f
shl edx, 6
add edx, r12d
add ecx, edx
call fcn.140060420
test al, al
je 0x140051d63
add rsi, 0xfffffffffffffffe
jmp 0x140051c4b
lea r8, [rsi + 1]
mov r9, qword [rbx]
cmp r9, r8
jb 0x140051e0c
lea rax, [rsi + 1]
mov rdx, qword [rbx + 8]
mov rbx, qword [rbp - 0x38]
mov rsi, qword [rbp - 0x30]
mov rdi, qword [rbp - 0x28]
mov r12, qword [rbp - 0x20]
mov r13, qword [rbp - 0x18]
mov rsp, rbp
pop rbp
ret
mov qword [rbp - 0x40], r9
mov r9, r8
xor r8d, r8d
mov edx, 0xcdf
lea rcx, str.std_string.d
call fcn.140018770
mov qword [rbp - 0x40], rdx
mov r9, r8
xor r8d, r8d
mov edx, 0xce4
lea rcx, str.std_string.d
call fcn.140018770
mov r9, r8
mov r8, rsi
mov edx, 0xcfa
lea rcx, str.std_string.d
call fcn.140018720
mov r9, rdx
mov edx, 0xd06
lea rcx, str.std_string.d
call fcn.140018720
mov r9, rcx
mov r8, rdx
mov edx, 0xd12
lea rcx, str.std_string.d
call fcn.140018720
mov qword [rbp - 0x40], r9
mov r9, r8
xor r8d, r8d
mov edx, 0xd21
lea rcx, str.std_string.d
call fcn.140018770
int3