Function at 0x180086dd0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
mov rbx, rdx
lea rax, [rdx + 0x10]
mov rsi, r8
mov rdi, rcx
movsxd r8, dword [rdx + 0x88]
mov rdx, qword [rax]
movzx r9d, byte [rbx + 2]
sub rdx, rax
shl r8, 2
call fcn.180089a40
mov rdx, qword [rbx + 0x18]
lea rax, [rbx + 0x18]
movsxd r8, dword [rbx + 0x94]
sub rdx, rax
movzx r9d, byte [rbx + 2]
mov rcx, rdi
shl r8, 3
call fcn.180089a40
mov rdx, qword [rbx + 8]
lea rax, [rbx + 8]
movsxd r8, dword [rbx + 0x8c]
sub rdx, rax
movzx r9d, byte [rbx + 2]
mov rcx, rdi
shl r8, 4
call fcn.180089a40
lea rdx, [rbx + 0x38]
add rdx, qword [rbx + 0x38]
je 0x18008632b
movsxd r8, dword [rbx + 0xa8]
mov rcx, rdi
movzx r9d, byte [rbx + 2]
call fcn.180089a40
movsxd rax, dword [rbx + 0x90]
mov rcx, rdi
mov rdx, qword [rbx + 0x58]
movzx r9d, byte [rbx + 2]
add rdx, 0x58
add rdx, rbx
lea r8, [rax + rax*2]
shl r8, 3
call fcn.180089a40
mov rdx, qword [rbx + 0x50]
mov rcx, rdi
movsxd r8, dword [rbx + 0x98]
add rdx, 0x50
movzx r9d, byte [rbx + 2]
add rdx, rbx
shl r8, 3
call fcn.180089a40
lea rdx, [rbx + 0x68]
xor rdx, qword [rdx]
je 0x180086392
movsxd r8, dword [rbx + 0x88]
mov rcx, rdi
movzx r9d, byte [rbx + 2]
call fcn.180089a40
cmp qword [rbx + 0x28], 0
je 0x1800863ac
lea rax, [rdi + 0x28]
mov rdx, rbx
sub rax, qword [rax]
mov rcx, rdi
call qword [rax + 0xd40]
lea rdx, [rbx + 0x70]
sub rdx, qword [rdx]
je 0x1800863c9
movsxd r8, dword [rbx + 0xac]
mov rcx, rdi
movzx r9d, byte [rbx + 2]
call fcn.180089a40
movzx r9d, byte [rbx + 2]
mov r8d, 0xb0
mov rdx, rbx
mov qword [rsp + 0x20], rsi
mov rcx, rdi
call fcn.180089b50
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x30
movzx eax, byte [rdx + 1]
mov rsi, r8
add eax, 0xfffffffb
mov rbx, rdx
mov rdi, rcx
cmp eax, 7
ja case.default.0x180086e0b
lea rcx, [0x180000000]
cdqe
mov edx, dword [rcx + rax*4 + 0x87014]
add rdx, rcx
jmp rdx
mov rdx, rbx
mov rcx, rdi
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
jmp 0x180086290
cmp byte [rbx + 3], 0
mov eax, 0x20
mov r8d, 0x30
cmove r8d, eax
movzx eax, byte [rbx + 4]
shl rax, 4
add r8, rax
jmp 0x180086fed
mov r8d, 0x28
jmp 0x180086fed
mov rdx, qword [rbx + 0x20]
lea rax, [rbx + 0x20]
sub rdx, rax
cmp rdx, qword [0x1802a8930]
je 0x180086e88
movzx ecx, byte [rbx + 6]
mov eax, 1
movzx r9d, byte [rbx + 2]
shl eax, cl
mov rcx, rdi
movsxd r8, eax
shl r8, 5
call fcn.180089a40
mov rdx, qword [rbx + 0x18]
lea rax, [rbx + 0x18]
sub rdx, rax
je 0x180086eaa
movsxd r8, dword [rbx + 8]
mov rcx, rdi
movzx r9d, byte [rbx + 2]
shl r8, 4
call fcn.180089a40
mov r8d, 0x30
jmp 0x180086fed
lea rax, [rdi + 0x28]
sub rax, qword [rax]
mov r8, qword [rax + 0xcf8]
test r8, r8
je 0x180086ed0
mov rdx, rbx
xor ecx, ecx
call r8
movsxd rax, dword [rbx + 0x4c]
mov rcx, rdi
movzx r9d, byte [rbx + 2]
mov rdx, qword [rbx + 0x40]
lea r8, [rax + rax*4]
shl r8, 3
call fcn.180089a40
movzx r9d, byte [rbx + 2]
lea rax, [rbx + 0x48]
sub eax, dword [rax]
mov rcx, rdi
mov rdx, qword [rbx + 0x10]
movsxd r8, eax
shl r8, 4
call fcn.180089a40
mov r8d, 0x80
jmp 0x180086fed
mov ecx, dword [rbx + 0x10]
lea rax, [rbx + 0x10]
add ecx, eax
lea r8, [rdi + 0x28]
sub r8, qword [r8]
movsxd rdx, ecx
mov eax, dword [r8 + 0x10]
dec eax
cdqe
and rdx, rax
mov rax, qword [r8 + 8]
lea rcx, [rax + rdx*8]
mov rax, qword [rax + rdx*8]
test rax, rax
je 0x180086f79
cmp rax, rbx
je 0x180086f69
lea rcx, [rax + 8]
mov rax, qword [rax + 8]
test rax, rax
jne 0x180086f45
lea rax, [rbx + 0x14]
sub eax, dword [rax]
mov r8d, eax
add r8, 0x19
jmp 0x180086fed
mov rax, qword [rax + 8]
mov qword [rcx], rax
lea rax, [rdi + 0x28]
sub rax, qword [rax]
dec dword [rax]
lea rax, [rbx + 0x14]
sub eax, dword [rax]
mov r8d, eax
add r8, 0x19
jmp 0x180086fed
movzx eax, byte [rbx + 3]
cmp al, 0x80
jae 0x180086fba
lea rax, [rax*8 + 0xd68]
sub rax, qword [rdi + 0x28]
mov r8, qword [rax + rdi + 0x28]
test r8, r8
je 0x180086fd0
lea rdx, [rbx + 0x10]
mov rcx, rdi
call r8
movsxd r8, dword [rbx + 4]
add r8, 0x10
jmp 0x180086fed
jne 0x180086fd0
movsxd rax, dword [rbx + 4]
mov rdx, qword [rax + rbx + 8]
test rdx, rdx
je 0x180086fd0
lea rcx, [rbx + 0x10]
call rdx
movsxd r8, dword [rbx + 4]
add r8, 0x10
jmp 0x180086fed
mov eax, dword [rbx + 4]
mov ecx, 8
cmp eax, ecx
cmovb eax, ecx
mov r8d, eax
add r8, rcx
movzx r9d, byte [rbx + 2]
mov rdx, rbx
mov rcx, rdi
mov qword [rsp + 0x20], rsi
call fcn.180089b50
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x48]
add rsp, 0x30
pop rdi
ret