Function at 0x14018739d
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x28
mov r12, r9
mov r14, r8
mov r15, rdx
mov esi, ecx
mov qword [r9], 0
cmp ecx, 0xd7ff
ja 0x1401874a6
mov eax, esi
shr eax, 5
mov eax, eax
lea rcx, [0x140274b70]
movzx eax, word [rcx + rax*2]
mov ecx, esi
and ecx, 0x1f
lea rax, [rcx + rax*4]
lea rcx, [0x140274b70]
movzx ebp, word [rcx + rax*2]
test bpl, 8
je 0x1401874cb
mov r13b, byte [rsp + 0x98]
mov rax, rbp
shr rax, 4
lea rcx, [0x140273b70]
lea rbx, [rcx + rax*2]
add rbx, 2
movzx edi, word [rbx - 2]
bt edi, 0xe
jb 0x1401874e1
test dil, 0x80
jne 0x14018754c
test dil, 0x10
je 0x140187443
and ebp, 3
cmp ebp, 1
je 0x1401875d2
test r13b, r13b
jne 0x140187453
mov eax, edi
and eax, 8
jne 0x1401875ee
mov ecx, 2
test dil, 4
je 0x1401874a0
mov eax, 0xffffffff
shl eax, cl
not eax
mov ecx, edi
and ecx, eax
bt edi, 8
lea rax, [0x140273730]
movzx eax, byte [rcx + rax]
jb 0x1401875bf
movzx ecx, word [rbx + rax*2]
xor eax, eax
cmp ecx, esi
sete al
neg eax
xor eax, ecx
add rsp, 0x28
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
not esi
mov eax, esi
jmp 0x14018748f
cmp esi, 0xffff
ja 0x140187665
mov ecx, esi
shr ecx, 5
lea eax, [rcx + 0x140]
cmp esi, 0xdc00
cmovae eax, ecx
jmp 0x1401873d0
mov eax, ebp
and eax, 3
mov ecx, esi
cmp eax, 1
jne 0x140187484
movsx ecx, bp
sar ecx, 7
add ecx, esi
jmp 0x140187484
cmp esi, 0x69
jne 0x1401874f5
mov eax, 0x130
cmp dword [rsp + 0x90], 2
je 0x14018748f
cmp esi, 0x307
jne 0x1401875f8
cmp dword [rsp + 0x90], 3
jne 0x1401875f8
test r15, r15
je 0x140187431
mov dl, 0xff
mov rcx, r14
mov rax, r15
call qword [0x1402ce008]
test eax, eax
js 0x1401875f8
mov ecx, eax
call fcn.140209cbb
xor edx, edx
cmp eax, 0x60
je 0x14018751a
cmp eax, 0x20
jne 0x1401875f8
xor eax, eax
jmp 0x14018748f
mov eax, edi
and eax, 0x7f
bt edi, 8
lea rcx, [0x140273730]
movzx eax, byte [rax + rcx]
lea rcx, [rbx + rax*2]
lea r8, [rbx + rax*4 + 2]
cmovae r8, rcx
movzx eax, word [r8]
movzx edx, ax
mov r9, rdx
shr r9, 8
shr eax, 0xc
test r13b, r13b
cmovne eax, r9d
and eax, 0xf
je 0x140187431
mov ecx, edx
and ecx, 0xf
lea rcx, [r8 + rcx*2]
shr rdx, 3
and edx, 0x1e
add rdx, rcx
and r9d, 0xf
xor ecx, ecx
test r13b, r13b
cmove rcx, r9
lea rcx, [rdx + rcx*2]
add rcx, 2
mov qword [r12], rcx
jmp 0x14018748f
movzx edx, word [rbx + rax*4]
shl edx, 0x10
movzx ecx, word [rbx + rax*4 + 2]
or ecx, edx
jmp 0x140187484
mov eax, edi
and eax, 0xf
bt edi, 8
lea rcx, [0x140273730]
movzx eax, byte [rax + rcx]
jb 0x140187645
movzx ecx, word [rbx + rax*2]
jmp 0x140187653
mov ecx, 3
jmp 0x14018745e
cmp esi, 0x587
jne 0x140187431
test r13b, r13b
lea rax, [0x14027b05a]
lea rcx, [0x14027b054]
cmove rcx, rax
lea rax, [0x14027b04e]
lea rdx, [0x14027b048]
cmove rdx, rax
cmp dword [rsp + 0x90], 6
cmovne rdx, rcx
mov qword [r12], rdx
mov eax, 2
jmp 0x14018748f
movzx edx, word [rbx + rax*4]
shl edx, 0x10
movzx ecx, word [rbx + rax*4 + 2]
or ecx, edx
mov eax, ecx
neg eax
bt edi, 0xa
cmovae eax, ecx
add eax, esi
jmp 0x14018748f
mov eax, 0xdd0
cmp esi, 0x10ffff
ja 0x1401873e6
mov eax, 0x3268
cmp esi, 0xe07ff
ja 0x1401873e6
mov eax, esi
shr eax, 0xb
lea rcx, [0x140274b70]
movzx ecx, word [rcx + rax*2 + 0x1040]
mov eax, esi
shr eax, 5
and eax, 0x3f
add eax, ecx
jmp 0x1401873d0