Function at 0x140020b90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x20
mov rax, qword [rcx + 0x18]
mov r15, r8
xor r8d, r8d
mov r14, rdx
mov rbp, rcx
movzx r12d, byte [rax + 0x54]
mov r13d, r12d
and r12d, 3
xor r13d, 3
cmp qword [rdx], r8
je 0x140020e56
mov qword [rsp + 0x58], rbx
lea rdx, [0x140000000]
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], rdi
nop dword [rax]
mov rax, r15
dec r15
test rax, rax
je 0x140020e47
mov rbx, qword [r14]
movzx ecx, byte [rbx + 9]
mov eax, ecx
xor eax, 3
test r13d, eax
jne 0x140020e31
mov rax, qword [rbx]
mov qword [r14], rax
movzx eax, byte [rbx + 8]
add eax, 0xfffffffc
cmp eax, 0x22
ja case.0x140020c2e.12
cdqe
movzx eax, byte [rdx + rax + 0x20e94]
mov ecx, dword [rdx + rax*4 + 0x20e70]
add rcx, rdx
jmp rcx
movsxd r8, dword [rbx + 0x18]
xor r9d, r9d
mov rdx, qword [rbx + 0x38]
mov rcx, rbp
shl r8, 2
call fcn.140025740
movsxd r8, dword [rbx + 0x20]
xor r9d, r9d
mov rdx, qword [rbx + 0x40]
mov rcx, rbp
shl r8, 3
call fcn.140025740
movsxd r8, dword [rbx + 0x14]
xor r9d, r9d
mov rdx, qword [rbx + 0x30]
mov rcx, rbp
shl r8, 4
call fcn.140025740
movsxd r8, dword [rbx + 0x1c]
xor r9d, r9d
mov rdx, qword [rbx + 0x48]
mov rcx, rbp
shl r8, 2
call fcn.140025740
movsxd r8, dword [rbx + 0x24]
xor r9d, r9d
mov rdx, qword [rbx + 0x50]
mov rcx, rbp
shl r8, 4
call fcn.140025740
movsxd r8, dword [rbx + 0x10]
xor r9d, r9d
mov rdx, qword [rbx + 0x58]
mov rcx, rbp
shl r8, 4
call fcn.140025740
mov r8d, 0x78
jmp 0x140020e17
movzx eax, byte [rbx + 0xa]
mov esi, r8d
test al, al
je 0x140020d0b
lea rdi, [rbx + 0x20]
mov rdx, qword [rdi]
test rdx, rdx
je 0x140020cfd
sub qword [rdx + 8], 1
jne 0x140020cfd
lea rax, [rdx + 0x10]
cmp qword [rdx], rax
jne 0x140020cfd
xor r9d, r9d
mov r8d, 0x20
mov rcx, rbp
call fcn.140025740
movzx eax, byte [rbx + 0xa]
inc esi
add rdi, 8
cmp esi, eax
jl 0x140020cd4
movzx r8d, al
lea r8, [r8*8 + 0x20]
jmp 0x140020e17
movzx r8d, byte [rbx + 0xa]
add r8, 2
shl r8, 4
jmp 0x140020e17
cmp qword [rbx + 0x20], 0
je 0x140020d56
movzx ecx, byte [rbx + 0xb]
mov eax, 1
mov rdx, qword [rbx + 0x18]
xor r9d, r9d
shl eax, cl
mov rcx, rbp
movsxd r8, eax
shl r8, 5
call fcn.140025740
mov r8d, dword [rbx + 0xc]
xor r9d, r9d
mov rdx, qword [rbx + 0x10]
mov rcx, rbp
shl r8, 4
call fcn.140025740
mov r8d, 0x38
jmp 0x140020e17
mov rdx, qword [rbx + 0x38]
mov rcx, rbx
call fcn.140024000
cmp qword [rbx + 0x38], 0
je 0x140020db5
lea rax, [rbx + 0x60]
mov rcx, rbx
mov qword [rbx + 0x20], rax
call fcn.140019710
movsxd r8, dword [rbx + 0xb8]
xor r9d, r9d
mov rdx, qword [rbx + 0x38]
mov rcx, rbx
shl r8, 4
call fcn.140025740
mov r8d, 0xd8
lea rdx, [rbx - 8]
jmp 0x140020e1a
mov r8, qword [rbx + 0x18]
add r8, 0x28
jmp 0x140020e17
mov r8, qword [rbp + 0x18]
mov eax, dword [r8 + 0x3c]
dec eax
movsxd rcx, eax
movsxd rax, dword [rbx + 0xc]
and rcx, rax
mov rax, qword [r8 + 0x30]
lea rdx, [rax + rcx*8]
mov rax, qword [rax + rcx*8]
cmp rax, rbx
je 0x140020dfd
lea rdx, [rax + 0x10]
mov rax, qword [rax + 0x10]
cmp rax, rbx
jne 0x140020df0
mov rax, qword [rax + 0x10]
mov qword [rdx], rax
dec dword [r8 + 0x38]
movzx r8d, byte [rbx + 0xb]
jmp 0x140020e13
mov r8, qword [rbx + 0x10]
add r8, 0x19
mov rdx, rbx
xor r9d, r9d
mov rcx, rbp
call fcn.140025740
lea rdx, [0x140000000]
xor r8d, r8d
jmp case.0x140020c2e.12
and cl, 0xf8
mov r14, rbx
or cl, r12b
mov byte [rbx + 9], cl
cmp qword [r14], 0
jne 0x140020be0
mov rsi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x58]
mov rdi, qword [rsp + 0x68]
cmp qword [r14], 0
cmove r14, r8
mov rax, r14
add rsp, 0x20
pop r15
pop r14
pop r13
pop r12
pop rbp
ret