Function at 0x140018b50
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x10], rdx
push rbx
push rdi
push r12
sub rsp, 0x50
movsxd rdi, dword [rcx + 8]
mov rbx, rdx
mov r12, rcx
test edi, edi
jne 0x140018b76
xor eax, eax
add rsp, 0x50
pop r12
pop rdi
pop rbx
ret
mov r8, qword [rcx]
xor eax, eax
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], r13
xor r13d, r13d
mov qword [rsp + 0x30], r14
xor r14d, r14d
mov qword [rsp + 0x28], r15
cmp dword [r8 + 0x30], eax
je 0x140018bc7
mov rcx, qword [r8 + 0x20]
neg rcx
sbb rcx, rcx
neg rcx
dec rcx
and rcx, r8
or rcx, qword [r8 + 0x20]
je 0x140018bc7
mov rax, qword [rcx]
lea rdx, [rsp + 0x70]
call qword [rax + 0x40]
mov rax, qword [rax]
cmp rax, qword [rbx]
mov r15, rdi
setne al
xor esi, esi
mov byte [rsp + 0x70], al
nop word [rax + rax]
movsxd rbp, r14d
inc rsi
inc r14d
cmp rsi, r15
jge 0x140018c5e
mov rdx, qword [rsp + 0x78]
mov rbx, rsi
shl rbx, 6
movzx edi, al
nop dword [rax]
mov r8, qword [r12]
xor eax, eax
add r8, rbx
cmp dword [r8 + 0x30], eax
je 0x140018c3e
mov rcx, qword [r8 + 0x20]
neg rcx
sbb rcx, rcx
neg rcx
dec rcx
and rcx, r8
or rcx, qword [r8 + 0x20]
je 0x140018c39
mov rax, qword [rcx]
lea rdx, [rsp + 0x88]
call qword [rax + 0x40]
mov rax, qword [rax]
mov rdx, qword [rsp + 0x78]
xor ecx, ecx
cmp rax, qword [rdx]
setne cl
cmp edi, ecx
jne 0x140018c59
inc r14d
inc rsi
add rbx, 0x40
cmp rsi, r15
jl 0x140018c00
movzx eax, byte [rsp + 0x70]
mov edi, r14d
sub edi, ebp
test al, al
je 0x140018c9e
cmp r13d, ebp
je 0x140018c96
mov rax, qword [r12]
mov rdx, rbp
shl rdx, 6
movsxd rcx, r13d
add rdx, rax
shl rcx, 6
movsxd r8, edi
add rcx, rax
shl r8, 6
call qword [sym.imp.VCRUNTIME140.dll_memmove]
movzx eax, byte [rsp + 0x70]
add r13d, edi
jmp 0x140018d89
mov rbx, rbp
shl rbx, 6
add rbx, qword [r12]
test edi, edi
je 0x140018d89
cmp dword [rbx + 0x30], 0
je 0x140018d69
mov rax, qword [rbx + 0x20]
neg rax
sbb rcx, rcx
neg rcx
dec rcx
and rcx, rbx
or rcx, qword [rbx + 0x20]
je 0x140018d0f
mov rax, qword [rcx]
xor edx, edx
call qword [rax + 0x48]
mov rdx, qword [rbx + 0x20]
test rdx, rdx
je 0x140018d08
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_memmove]
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x140018d08
xor r8d, r8d
xor edx, edx
call fcn.140043740
mov qword [rbx + 0x20], rax
mov dword [rbx + 0x30], 0
cmp dword [rbx + 0x30], 0
je 0x140018d69
mov rax, qword [rbx + 0x20]
neg rax
sbb rcx, rcx
neg rcx
dec rcx
and rcx, rbx
or rcx, qword [rbx + 0x20]
je 0x140018d69
mov rax, qword [rcx]
xor edx, edx
call qword [rax + 0x48]
mov rdx, qword [rbx + 0x20]
test rdx, rdx
je 0x140018d62
xor r8d, r8d
mov rcx, rbx
call qword [sym.imp.VCRUNTIME140.dll_memmove]
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x140018d62
xor r8d, r8d
xor edx, edx
call fcn.140043740
mov qword [rbx + 0x20], rax
mov dword [rbx + 0x30], 0
mov rcx, qword [rbx + 0x20]
test rcx, rcx
je 0x140018d77
call fcn.14003e1e0
add rbx, 0x40
sub edi, 1
jne 0x140018cb1
movzx eax, byte [rsp + 0x70]
xor al, 1
mov byte [rsp + 0x70], al
cmp rsi, r15
jl 0x140018be0
mov r14, qword [rsp + 0x30]
mov eax, r15d
mov r15, qword [rsp + 0x28]
sub eax, r13d
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x48]
mov dword [r12 + 8], r13d
mov r13, qword [rsp + 0x38]
add rsp, 0x50
pop r12
pop rdi
pop rbx
ret