Function at 0x1400130c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push r15
sub rsp, 0x20
mov rax, qword [rcx + 0x18]
mov rbx, rcx
mov rbp, qword [0x14025dfb0]
test rax, rax
je 0x1400130e6
mov eax, dword [rax + 4]
mov dword [rcx + 4], eax
and byte [rcx + 0xc8], 0xdf
mov rcx, qword [rcx + 0x20]
test rcx, rcx
je 0x1400130fb
call fcn.1400130c0
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x140013109
call fcn.1400130c0
mov r8d, dword [rbx + 0x30]
xor esi, esi
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], r14
mov dword [rbx + 0xc], esi
test r8d, r8d
jle 0x1400131ee
mov r14d, esi
nop dword [rax + rax]
mov rax, qword [rbx + 0x38]
mov r8d, dword [rbx + 0xb0]
mov ecx, dword [rbp + 0x3f60]
inc r8d
mov rdi, qword [r14 + rax]
cmp r8d, ecx
jne 0x14001315d
mov eax, dword [rdi + 0x298]
inc eax
cmp eax, ecx
jge 0x14001315d
mov dl, 1
jmp 0x140013164
xor dl, dl
cmp r8d, ecx
jne 0x14001318f
test byte [rbx + 0xc8], 0x40
jne 0x14001317b
mov eax, dword [rdi + 0xb0]
cmp dword [rbx + 0xc0], eax
jne 0x14001318f
cmp byte [rdi + 0xf5], 0
je 0x14001318f
test dword [rdi + 0x14], 0x100000
jne 0x14001318f
mov dl, 1
movzx ecx, byte [rdi + 0x42d]
movzx eax, cl
shr al, 3
and al, 1
or al, dl
je 0x1400131d5
and cl, 0xf7
mov byte [rdi + 0x42d], cl
cmp dword [rbx + 0x30], 1
jne 0x1400131bf
mov eax, dword [rbx + 0x10]
shr eax, 0xb
test al, 1
je 0x140013272
mov r8d, dword [rbx]
mov rdx, rdi
mov rcx, rbx
call fcn.140010c40
dec esi
sub r14, 8
jmp 0x1400131db
mov eax, dword [rdi + 0x30]
or dword [rbx + 0xc], eax
mov r8d, dword [rbx + 0x30]
inc esi
add r14, 8
cmp esi, r8d
jl 0x140013130
movzx r10d, byte [rbx + 0xc9]
mov edi, dword [rbx + 4]
movzx edx, r10b
mov r9d, dword [rbx + 8]
mov ecx, edi
mov r11d, dword [rbx + 0xc]
or ecx, r9d
or ecx, r11d
mov dword [rbx + 0x10], ecx
test r10b, 2
je 0x14001322b
cmp r8d, 1
jne 0x14001322b
mov eax, ecx
and eax, 0x2040
cmp eax, 0x40
jne 0x14001322b
or dl, 4
and dl, 0xfd
mov byte [rbx + 0xc9], dl
movzx eax, dl
test dl, 4
je 0x140013254
mov r10, qword [rbx + 0x90]
test r10, r10
je 0x140013254
test dword [r10 + 0x30], 0x2000
je 0x140013254
and al, 0xfb
cmp r8d, 1
jle 0x140013291
btr r9d, 0xd
mov dword [rbx + 8], r9d
or r9d, edi
or r9d, r11d
mov dword [rbx + 0x10], r9d
mov ecx, r9d
jmp 0x1400132a7
mov rcx, rbx
call fcn.14000f780
mov r8d, dword [rbx]
mov rdx, rdi
mov rcx, rbx
mov dword [rbx + 0x14], 1
call fcn.140010c40
jmp 0x14001330f
test al, 4
je 0x1400132a7
mov ecx, r9d
btc ecx, 0xd
mov dword [rbx + 8], ecx
or ecx, edi
or ecx, r11d
mov dword [rbx + 0x10], ecx
and al, 0xfb
mov byte [rbx + 0xc9], al
mov eax, ecx
shr eax, 0xb
shr ecx, 0xa
cmp qword [rbx + 0x18], 0
movzx eax, al
movzx edx, cl
cmovne edx, eax
test r8d, r8d
setg al
or dl, al
mov rax, qword [rbx + 0x20]
test rax, rax
je 0x1400132e1
test byte [rax + 0xc8], 1
je 0x1400132e1
mov dl, 1
mov rax, qword [rbx + 0x28]
test rax, rax
je 0x1400132f7
test byte [rax + 0xc8], 1
je 0x1400132f7
mov cl, 1
jmp 0x1400132f9
xor cl, cl
movzx eax, byte [rbx + 0xc8]
or cl, dl
and cl, 1
and al, 0xfe
xor cl, al
mov byte [rbx + 0xc8], cl
mov r14, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r15
pop rsi
pop rbp
ret