Function at 0x140020370
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x48
mov r10, qword [rdx]
mov eax, r9d
mov r14, qword [rdx + 8]
mov r9, r8
cdq
mov rsi, rcx
mov r11d, eax
mov rax, qword [rsp + 0xa0]
xor r11d, edx
mov ecx, dword [r9 + 8]
lea r12, [r14 + r10*2]
sub r11d, edx
mov edx, dword [rax]
mov ebx, r11d
mov rax, qword [rsp + 0xa8]
cmp r11d, edx
cmovl ebx, edx
mov dword [rsp + 0x20], ebx
mov r8d, dword [rax]
cmp r11d, r8d
mov eax, dword [r9 + 4]
cmovl r11d, r8d
mov dword [rsp + 0x88], r8d
sub eax, ecx
mov dword [rsp + 0x24], r11d
imul ebx, eax
xor r13d, r13d
imul ecx, r11d
lea edx, [r13 + 8]
add ebx, ecx
lea ecx, [rdx - 6]
sub ebx, dword [r9 + 0xc]
mov r9d, r13d
add ebx, r10d
movsxd r8, ebx
inc r8
call fcn.140015fd0
mov qword [rsi], rax
movsxd rcx, ebx
mov dword [rax + 4], ebx
mov r8, qword [rsi]
mov rax, qword [r8 + 0x10]
lea rdx, [rax + rcx*2]
mov word [rdx + r8], r13w
mov rcx, qword [rsi]
mov rdi, qword [rcx + 0x10]
add rdi, rcx
cmp r14, r12
je 0x140020621
movzx ebx, word [rsp + 0xb0]
mov qword [rsp + 0x40], rbp
mov qword [rsp + 0x38], r15
cmp word [r14], 0x25
mov rbp, r14
je 0x14002046b
nop word [rax + rax]
add r14, 2
cmp word [r14], 0x25
jne 0x140020460
movzx eax, word [r14 + 2]
mov rsi, r14
add r14, 2
xor r15b, r15b
cmp ax, 0x4c
jne 0x14002048c
movzx eax, word [r14 + 2]
add r14, 2
mov r15b, 1
movzx ecx, ax
call fcn.14001e5b0
movsx r10d, word [rax + 2]
sar r10d, 0xb
cmp r10d, 0xffffffff
je 0x1400204cc
lea r11, [r14 + 2]
cmp r11, r12
je 0x1400204cc
movzx ecx, word [r11]
call fcn.14001e5b0
movsx ecx, word [rax + 2]
sar ecx, 0xb
cmp ecx, 0xffffffff
je 0x1400204cc
lea eax, [r10 + r10*4]
mov r14, r11
lea r10d, [rcx + rax*2]
mov rax, qword [rsp + 0x90]
mov rdx, rbp
mov rcx, rdi
cmp r10d, dword [rax]
je 0x1400204fb
mov rsi, r14
sub rsi, rbp
sar rsi, 1
add rsi, rsi
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
add rdi, rsi
jmp 0x1400205e1
sub rsi, rbp
add r14, 2
sar rsi, 1
add rsi, rsi
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
mov rdx, qword [rsp + 0xa0]
add rdi, rsi
mov eax, dword [rsp + 0x20]
mov esi, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x88]
sub esi, ecx
movsxd rbp, dword [rdx]
sub eax, ebp
test r15b, r15b
cmove esi, eax
cmp dword [rsp + 0x98], 0
jle 0x140020567
test esi, esi
je 0x140020567
mov ecx, esi
nop word [rax + rax]
mov rax, rdi
add rdi, 2
mov word [rax], bx
sub rcx, 1
jne 0x140020550
mov ecx, dword [rsp + 0x88]
test r15b, r15b
je 0x14002058f
mov rax, qword [rsp + 0xa8]
movsxd r8, ecx
mov rcx, rdi
add r8, r8
mov rdx, qword [rax + 8]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x88]
jmp 0x1400205a3
mov rdx, qword [rdx + 8]
mov r8, rbp
add r8, r8
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcpy
mov eax, ebp
cmp dword [rsp + 0x98], 0
cdqe
lea rdi, [rdi + rax*2]
jge 0x1400205d0
test esi, esi
je 0x1400205d0
mov ecx, esi
nop dword [rax]
mov rax, rdi
add rdi, 2
mov word [rax], bx
sub rcx, 1
jne 0x1400205c0
mov rax, qword [rsp + 0x90]
inc r13d
cmp r13d, dword [rax + 4]
je 0x14002060a
cmp r14, r12
jne 0x140020450
mov rax, qword [rsp + 0x80]
mov rbp, qword [rsp + 0x40]
mov r15, qword [rsp + 0x38]
add rsp, 0x48
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
sub r12, r14
mov rdx, r14
sar r12, 1
mov rcx, rdi
lea r8, [r12 + r12]
call sub.VCRUNTIME140.dll_memcpy
jmp 0x1400205ea
mov rax, rsi
add rsp, 0x48
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret