Function at 0x14001b550
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rdi
sub rsp, 0x30
mov qword [rsp + 0x50], rbx
mov rdi, rdx
mov qword [rsp + 0x58], rsi
mov rbx, rcx
mov rcx, qword [rdx + 0x448]
movzx esi, r8b
mov qword [rsp + 0x20], r15
test rcx, rcx
je 0x14001b583
xor r8d, r8d
call fcn.14001b850
cmp qword [rbx + 0x80], 0
jne 0x14001b5bc
cmp dword [rbx + 0x28], 1
jne 0x14001b5bc
mov rax, qword [rbx + 0x30]
mov rcx, qword [rax]
cmp byte [rcx + 0xd0], 0
jne 0x14001b5bc
cmp byte [rcx + 0xcf], 0
mov byte [rcx + 0xd6], 1
sete al
inc al
mov byte [rcx + 0xf0], al
mov r8d, dword [rbx + 0x28]
mov ecx, dword [rbx + 0x2c]
cmp r8d, ecx
jne 0x14001b5f2
inc r8d
test ecx, ecx
je 0x14001b5da
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
add eax, ecx
jmp 0x14001b5df
mov eax, 8
cmp eax, r8d
lea rcx, [rbx + 0x28]
cmovg r8d, eax
mov edx, r8d
call fcn.140023150
movsxd rcx, dword [rbx + 0x28]
mov rax, qword [rbx + 0x30]
mov qword [rax + rcx*8], rdi
inc dword [rbx + 0x28]
or byte [rbx + 0xbc], 0x80
mov qword [rdi + 0x448], rbx
mov eax, dword [rbx]
mov dword [rdi + 0x458], eax
cmp dword [rbx + 0x28], 1
movzx eax, byte [rdi + 0x429]
setg cl
and al, 0xfe
or cl, al
and cl, 0xfb
mov byte [rdi + 0x429], cl
cmp qword [rbx + 0x80], 0
jne 0x14001b688
cmp qword [rbx + 0x10], 0
jne 0x14001b688
test dword [rbx + 8], 0x400
jne 0x14001b688
mov eax, dword [rbx + 0xb8]
test al, 7
jne 0x14001b662
and eax, 0xfffffffa
or eax, 2
mov dword [rbx + 0xb8], eax
test al, 0x38
jne 0x14001b672
and eax, 0xffffffd7
or eax, 0x10
mov dword [rbx + 0xb8], eax
test eax, 0x1c0
jne 0x14001b688
and eax, 0xfffffebf
bts eax, 7
mov dword [rbx + 0xb8], eax
test sil, sil
je 0x14001b708
cmp qword [rbx + 0x38], 0
jne 0x14001b6f7
mov rcx, rbx
call fcn.14001e0d0
mov rcx, qword [rbx + 0x38]
xor esi, esi
mov eax, dword [rbx + 0xb0]
mov dword [rcx + 0x1c], eax
mov rcx, qword [rbx + 0x38]
mov eax, dword [rcx + 0x1c]
mov dword [rcx + 0x18], eax
mov eax, dword [rbx + 0x28]
dec eax
test eax, eax
jle 0x14001b6f7
mov qword [rsp + 0x28], r14
mov r14d, esi
nop word [rax + rax]
mov r8, qword [rbx + 0x30]
xor edx, edx
mov rcx, qword [rbx + 0x38]
mov r8, qword [r14 + r8]
call fcn.140044bb0
mov eax, dword [rbx + 0x28]
lea r14, [r14 + 8]
dec eax
inc esi
cmp esi, eax
jl 0x14001b6d0
mov r14, qword [rsp + 0x28]
mov rcx, qword [rbx + 0x38]
mov r8, rdi
mov edx, 0x400000
call fcn.140044bb0
mov ecx, dword [rbx + 8]
mov eax, ecx
mov r15, qword [rsp + 0x20]
mov rsi, qword [rsp + 0x58]
shr eax, 0xb
shr ecx, 0xa
cmp qword [rbx + 0x10], 0
movzx eax, al
movzx r8d, cl
cmovne r8d, eax
mov rax, qword [rbx + 0x18]
test rax, rax
je 0x14001b743
test byte [rax + 0xbc], 1
je 0x14001b743
mov al, 1
jmp 0x14001b745
xor al, al
cmp dword [rbx + 0x28], 0
movzx edx, al
mov eax, 1
cmovg edx, eax
mov rax, qword [rbx + 0x20]
or dl, r8b
test rax, rax
je 0x14001b76d
test byte [rax + 0xbc], 1
je 0x14001b76d
mov cl, 1
jmp 0x14001b76f
xor cl, cl
movzx eax, byte [rbx + 0xbc]
or cl, dl
and cl, 1
and al, 0xfe
xor cl, al
mov byte [rbx + 0xbc], cl
mov rcx, qword [rbx + 0x80]
mov rbx, qword [rsp + 0x50]
test rcx, rcx
je 0x14001b846
mov r8d, dword [rdi + 0xc]
mov edx, r8d
bts edx, 0x18
mov qword [rdi + 0x3c8], rcx
mov eax, edx
mov qword [rdi + 0x3e8], rdi
and eax, 0x3000000
mov qword [rdi + 0x3e0], rdi
mov qword [rdi + 0x3d8], rdi
mov qword [rdi + 0x3d0], rdi
cmp eax, 0x1000000
jne 0x14001b804
test byte [rdi + 0x429], 1
mov rax, qword [rcx + 0x3d8]
mov qword [rdi + 0x3d8], rax
jne 0x14001b804
test dword [rcx + 0xc], 0x20000000
jne 0x14001b804
mov rax, qword [rcx + 0x3d0]
mov qword [rdi + 0x3d0], rax
bt edx, 0x1b
jb 0x14001b818
mov rax, qword [rcx + 0x3e0]
mov qword [rdi + 0x3e0], rax
bt r8d, 0x17
jae 0x14001b846
lea rcx, [rdi + 0x3e8]
nop word [rax + rax]
mov rax, qword [rdi + 0x3c8]
mov qword [rcx], rax
mov rdi, rax
test dword [rax + 0xc], 0x800000
jne 0x14001b830
add rsp, 0x30
pop rdi
ret