Function at 0x14001c4f0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
sub rsp, 0x40
mov qword [rsp + 0x38], rsi
mov rbx, rdx
mov qword [rsp + 0x30], rdi
movzx esi, r8b
mov rdi, rcx
mov qword [rsp + 0x28], r14
mov rcx, qword [rdx + 0x448]
mov qword [rsp + 0x20], r15
test rcx, rcx
je 0x14001c528
xor r8d, r8d
call fcn.14001c7f0
mov r8d, dword [rdi + 0x28]
mov ecx, dword [rdi + 0x2c]
cmp r8d, ecx
jne 0x14001c55e
inc r8d
test ecx, ecx
je 0x14001c546
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x14001c54b
mov eax, 8
cmp eax, r8d
lea rcx, [rdi + 0x28]
cmovg r8d, eax
mov edx, r8d
call fcn.140023cf0
movsxd rcx, dword [rdi + 0x28]
mov r15d, 1
mov rax, qword [rdi + 0x30]
mov qword [rax + rcx*8], rbx
inc dword [rdi + 0x28]
or byte [rdi + 0xb5], 1
mov qword [rbx + 0x448], rdi
mov eax, dword [rdi]
mov dword [rbx + 0x458], eax
cmp dword [rdi + 0x28], 1
movzx eax, byte [rbx + 0x472]
setg cl
and al, 0xfe
or cl, al
and cl, 0xfb
mov byte [rbx + 0x472], cl
cmp qword [rdi + 0x78], 0
jne 0x14001c629
cmp dword [rdi + 0x28], 2
jne 0x14001c5d6
mov rax, qword [rdi + 0x30]
mov rcx, qword [rax]
cmp byte [rcx + 0xc0], 0
jne 0x14001c5d6
mov byte [rcx + 0xc6], r15b
mov rax, qword [rdi + 0x30]
mov rcx, qword [rax]
mov dword [rcx + 0xdc], r15d
cmp qword [rdi + 0x78], 0
jne 0x14001c629
cmp qword [rdi + 0x10], 0
jne 0x14001c629
test dword [rdi + 8], 0x400
jne 0x14001c629
mov eax, dword [rdi + 0xb0]
test al, 7
jne 0x14001c603
and eax, 0xfffffffa
or eax, 2
mov dword [rdi + 0xb0], eax
test al, 0x38
jne 0x14001c613
and eax, 0xffffffd7
or eax, 0x10
mov dword [rdi + 0xb0], eax
test eax, 0x1c0
jne 0x14001c629
and eax, 0xfffffebf
bts eax, 7
mov dword [rdi + 0xb0], eax
test sil, sil
je 0x14001c6a8
cmp qword [rdi + 0x38], 0
jne 0x14001c697
mov rcx, rdi
call fcn.14001ecb0
mov rcx, qword [rdi + 0x38]
xor esi, esi
mov eax, dword [rdi + 0xa8]
mov dword [rcx + 0x1c], eax
mov rcx, qword [rdi + 0x38]
mov eax, dword [rcx + 0x1c]
mov dword [rcx + 0x18], eax
mov eax, dword [rdi + 0x28]
dec eax
test eax, eax
jle 0x14001c697
mov qword [rsp + 0x60], rbp
mov ebp, esi
nop word [rax + rax]
mov r8, qword [rdi + 0x30]
xor edx, edx
mov rcx, qword [rdi + 0x38]
mov r8, qword [r8 + rbp]
call fcn.140042d30
mov eax, dword [rdi + 0x28]
lea rbp, [rbp + 8]
dec eax
inc esi
cmp esi, eax
jl 0x14001c670
mov rbp, qword [rsp + 0x60]
mov rcx, qword [rdi + 0x38]
mov r8, rbx
mov edx, 0x400000
call fcn.140042d30
mov ecx, dword [rdi + 8]
mov eax, ecx
mov r14, qword [rsp + 0x28]
mov rsi, qword [rsp + 0x38]
shr eax, 0xb
shr ecx, 0xa
cmp qword [rdi + 0x10], 0
movzx eax, al
movzx r8d, cl
cmovne r8d, eax
mov rax, qword [rdi + 0x18]
test rax, rax
je 0x14001c6e5
test byte [rax + 0xb4], r15b
je 0x14001c6e5
movzx eax, r15b
jmp 0x14001c6e7
xor al, al
cmp dword [rdi + 0x28], 0
movzx edx, al
mov rax, qword [rdi + 0x20]
cmovg edx, r15d
mov r15, qword [rsp + 0x20]
or dl, r8b
test rax, rax
je 0x14001c710
test byte [rax + 0xb4], 1
je 0x14001c710
mov cl, 1
jmp 0x14001c712
xor cl, cl
movzx eax, byte [rdi + 0xb4]
or cl, dl
and cl, 1
and al, 0xfe
xor cl, al
mov byte [rdi + 0xb4], cl
mov rcx, qword [rdi + 0x78]
mov rdi, qword [rsp + 0x30]
test rcx, rcx
je 0x14001c7e6
mov r8d, dword [rbx + 0xc]
mov edx, r8d
bts edx, 0x18
mov qword [rbx + 0x3e0], rcx
mov eax, edx
mov qword [rbx + 0x400], rbx
and eax, 0x3000000
mov qword [rbx + 0x3f8], rbx
mov qword [rbx + 0x3f0], rbx
mov qword [rbx + 0x3e8], rbx
cmp eax, 0x1000000
jne 0x14001c7a4
test byte [rbx + 0x472], 1
mov rax, qword [rcx + 0x3e8]
mov qword [rbx + 0x3e8], rax
jne 0x14001c7a4
test dword [rcx + 0xc], 0x20000000
jne 0x14001c7a4
mov rax, qword [rcx + 0x3f0]
mov qword [rbx + 0x3f0], rax
bt edx, 0x1b
jb 0x14001c7b8
mov rax, qword [rcx + 0x3f8]
mov qword [rbx + 0x3f8], rax
bt r8d, 0x17
jae 0x14001c7e6
lea rcx, [rbx + 0x400]
nop word [rax + rax]
mov rax, qword [rbx + 0x3e0]
mov qword [rcx], rax
mov rbx, rax
test dword [rax + 0xc], 0x800000
jne 0x14001c7d0
add rsp, 0x40
pop rbx
ret