Function at 0x180081f80
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
mov qword [rsp + 0x18], rdi
mov qword [rsp + 0x20], r14
push r15
mov r10d, r8d
mov r9d, edx
mov r14, rcx
cmp edx, 0x80
jae 0x180081fe4
test r8d, r8d
je 0x180081fc7
lea eax, [rdx - 0x41]
cmp eax, 0x19
lea r9d, [rdx + 0x20]
mov eax, 1
cmova r9d, edx
mov dword [rcx], r9d
jmp 0x18008226e
lea eax, [rdx - 0x61]
cmp eax, 0x19
ja 0x180082222
add r9d, 0xffffffe0
mov eax, 1
mov dword [r14], r9d
jmp 0x18008226e
xor edi, edi
lea r15, [0x180000000]
test r10d, r10d
mov esi, edi
mov edx, edi
mov r11d, 0x171
setne sil
nop
lea eax, [r11 + rdx]
shr eax, 1
mov ecx, eax
mov ebx, dword [r15 + rax*4 + 0x1604c0]
mov r8d, ebx
shr r8d, 0xf
cmp r9d, r8d
jae 0x180082022
lea r11d, [rax - 1]
jmp 0x180082035
mov eax, ebx
shr eax, 8
and eax, 0x7f
add eax, r8d
cmp r9d, eax
jb 0x180082047
lea edx, [rcx + 1]
cmp edx, r11d
jle 0x180082000
mov dword [r14], r9d
mov eax, 1
jmp 0x18008226e
movzx r11d, byte [rcx + r15 + 0x160a90]
mov edx, ebx
and ebx, 0xf
shr edx, 4
shl ebx, 8
and edx, 0xf
or r11d, ebx
cmp edx, 0xd
ja case.0x180082075.13
mov ecx, dword [r15 + rdx*4 + 0x82288]
add rcx, r15
jmp rcx
mov eax, edx
and eax, 1
cmp r10d, eax
je 0x180082094
cmp edx, 2
jb 0x180082222
cmp r10d, 2
jne 0x180082222
mov ecx, dword [r15 + r11*4 + 0x1604c0]
mov eax, 1
shr ecx, 0xf
sub ecx, r8d
add r9d, ecx
mov dword [r14], r9d
jmp 0x18008226e
mov edx, r9d
mov eax, 1
sub edx, r8d
sub eax, esi
mov ecx, edx
and ecx, 1
cmp ecx, eax
jne 0x180082222
mov r9d, edx
mov eax, 1
xor r9d, 1
add r9d, r8d
mov dword [r14], r9d
jmp 0x18008226e
mov ecx, r9d
lea edx, [rsi + rsi]
sub ecx, r8d
cmp ecx, 1
jne 0x180082101
dec r9d
mov eax, ecx
add r9d, edx
mov dword [r14], r9d
jmp 0x18008226e
mov eax, 2
sub eax, edx
cmp ecx, eax
jne 0x180082222
lea r9d, [r9 + rdx*2]
mov eax, 1
add r9d, 0xfffffffe
mov dword [r14], r9d
jmp 0x18008226e
mov eax, r11d
test r10d, r10d
jne 0x180082155
shr rax, 6
mov dword [r14 + 4], 0x399
movzx eax, word [r15 + rax*2 + 0x160c10]
sub eax, r8d
add eax, r9d
mov dword [r14], eax
mov eax, 2
jmp 0x18008226e
and eax, 0x3f
movzx eax, word [r15 + rax*2 + 0x160c10]
sub eax, r8d
add r9d, eax
mov eax, 1
mov dword [r14], r9d
jmp 0x18008226e
cmp r10d, 1
je 0x180082222
cmp r10d, 2
mov eax, 0x20
mov r9d, edi
cmove r9d, eax
mov eax, 1
add r9d, r11d
mov dword [r14], r9d
jmp 0x18008226e
cmp r10d, 1
je 0x180082222
movzx r9d, word [r15 + r11*2 + 0x160c10]
cmp r10d, 2
mov eax, 1
sete dil
add r9d, edi
mov dword [r14], r9d
jmp 0x18008226e
lea eax, [rdx - 9]
cmp esi, eax
jne 0x180082222
movzx r9d, word [r15 + r11*2 + 0x160c10]
mov eax, 1
mov dword [r14], r9d
jmp 0x18008226e
lea eax, [rdx - 0xb]
cmp r10d, eax
jne 0x180082222
mov edx, r11d
mov eax, r11d
shr rax, 6
movzx ecx, word [r15 + rax*2 + 0x160c10]
sub ecx, r8d
add ecx, r9d
and edx, 0x3f
mov dword [r14], ecx
movzx eax, word [r15 + rdx*2 + 0x160c10]
mov dword [r14 + 4], eax
mov eax, 2
jmp 0x18008226e
test r10d, r10d
je 0x18008222c
mov dword [r14], r9d
mov eax, 1
jmp 0x18008226e
mov ecx, r11d
mov eax, r11d
shr rax, 8
movzx eax, word [r15 + rax*2 + 0x160c10]
mov dword [r14], eax
mov eax, r11d
shr rax, 4
and eax, 0xf
and ecx, 0xf
movzx eax, word [r15 + rax*2 + 0x160c10]
mov dword [r14 + 4], eax
movzx eax, word [r15 + rcx*2 + 0x160c10]
mov dword [r14 + 8], eax
mov eax, 3
mov rbx, qword [rsp + 0x10]
mov rsi, qword [rsp + 0x18]
mov rdi, qword [rsp + 0x20]
mov r14, qword [rsp + 0x28]
pop r15
ret