Function at 0x14001cf70
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 rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x30
mov r10, qword [rdx]
mov rsi, rcx
mov rcx, qword [rsp + 0x90]
mov eax, r9d
cdq
mov r13d, eax
mov eax, dword [r8 + 4]
movsxd r11, dword [r10 + 4]
xor r13d, edx
mov rcx, qword [rcx]
sub r13d, edx
mov r14, qword [r10 + 0x10]
mov ebx, r13d
add r14, r10
mov edx, dword [rcx + 4]
cmp r13d, edx
mov rcx, qword [rsp + 0x98]
cmovl ebx, edx
lea r12, [r14 + r11*2]
sub eax, dword [r8 + 8]
imul ebx, eax
mov eax, r13d
mov rcx, qword [rcx]
cmp r13d, dword [rcx + 4]
cmovl eax, dword [rcx + 4]
xor ebp, ebp
imul eax, dword [r8 + 8]
mov r9d, ebp
mov dword [rsp + 0x78], ebp
lea edx, [rbp + 8]
lea ecx, [rbp + 2]
add ebx, eax
sub ebx, dword [r8 + 0xc]
add ebx, r11d
movsxd r8, ebx
inc r8
call fcn.140014350
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], bp
mov rcx, qword [rsi]
mov rax, qword [rcx + 0x10]
lea rdi, [rcx + rax]
cmp r14, r12
je 0x14001d23c
movzx ebx, word [rsp + 0xa0]
mov qword [rsp + 0x28], r15
nop dword [rax]
cmp word [r14], 0x25
mov r11, r14
je 0x14001d06b
nop word [rax + rax]
add r14, 2
cmp word [r14], 0x25
jne 0x14001d060
movzx eax, word [r14 + 2]
mov rcx, r14
mov rsi, r14
xor r15b, r15b
add r14, 2
cmp ax, 0x4c
jne 0x14001d08e
movzx eax, word [rcx + 4]
lea r14, [rcx + 4]
mov r15b, 1
movzx ecx, ax
call fcn.14001b310
movsx r10d, word [rax + 2]
sar r10d, 0xb
cmp r10d, 0xffffffff
je 0x14001d0d2
lea rbp, [r14 + 2]
cmp rbp, r12
je 0x14001d0ce
movzx ecx, word [rbp]
call fcn.14001b310
movsx ecx, word [rax + 2]
sar ecx, 0xb
cmp ecx, 0xffffffff
je 0x14001d0ce
lea eax, [r10 + r10*4]
mov r14, rbp
lea r10d, [rcx + rax*2]
mov ebp, dword [rsp + 0x78]
mov rax, qword [rsp + 0x80]
mov rdx, r11
mov rcx, rdi
cmp r10d, dword [rax]
je 0x14001d101
mov rsi, r14
sub rsi, r11
sar rsi, 1
add rsi, rsi
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
add rdi, rsi
jmp 0x14001d203
sub rsi, r11
add r14, 2
sar rsi, 1
add rsi, rsi
mov r8, rsi
call sub.VCRUNTIME140.dll_memcpy
mov r8, qword [rsp + 0x98]
add rdi, rsi
mov rdx, qword [rsp + 0x90]
mov esi, r13d
test r15b, r15b
je 0x14001d136
mov rax, qword [r8]
jmp 0x14001d139
mov rax, qword [rdx]
mov ecx, dword [rax + 4]
cmp r13d, ecx
cmovl esi, ecx
sub esi, ecx
cmp dword [rsp + 0x88], 0
jle 0x14001d170
test esi, esi
je 0x14001d170
mov ecx, esi
nop dword [rax]
nop dword [rax + rax]
mov rax, rdi
add rdi, 2
mov word [rax], bx
sub rcx, 1
jne 0x14001d160
test r15b, r15b
je 0x14001d198
mov rcx, qword [r8]
mov rdx, qword [rcx + 0x10]
movsxd r8, dword [rcx + 4]
add rdx, rcx
mov rcx, rdi
add r8, r8
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rsp + 0x98]
jmp 0x14001d1b9
mov rcx, qword [rdx]
mov rdx, qword [rcx + 0x10]
movsxd r8, dword [rcx + 4]
add rdx, rcx
mov rcx, rdi
add r8, r8
call sub.VCRUNTIME140.dll_memcpy
mov rcx, qword [rsp + 0x90]
cmp dword [rsp + 0x88], 0
mov rax, qword [rcx]
mov ecx, dword [rax + 4]
movsxd rax, ecx
lea rdi, [rdi + rax*2]
jge 0x14001d1f0
test esi, esi
je 0x14001d1f0
mov ecx, esi
nop word [rax + rax]
mov rax, rdi
add rdi, 2
mov word [rax], bx
sub rcx, 1
jne 0x14001d1e0
mov rax, qword [rsp + 0x80]
inc ebp
mov dword [rsp + 0x78], ebp
cmp ebp, dword [rax + 4]
je 0x14001d225
cmp r14, r12
jne 0x14001d050
mov rax, qword [rsp + 0x70]
mov r15, qword [rsp + 0x28]
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
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 0x14001d20c
mov rax, rsi
add rsp, 0x30
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret