Function at 0x18017b6a0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
sub rsp, 0x90
movsxd rax, dword [rsp + 0xb0]
imul rax, rax, 0x898
mov rcx, qword [rsp + 0xa0]
lea rax, [rcx + rax + 0x38]
mov qword [rsp + 0x20], rax
mov rax, qword [rsp + 0x20]
mov rax, qword [rax + 0x18]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x20]
movsxd rax, dword [rax + 0x10]
imul rax, rax, 0x48
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x30], rax
movsxd rax, dword [rsp + 0xb0]
imul rax, rax, 0x1c58
mov rcx, qword [rsp + 0xa8]
lea rax, [rcx + rax + 0x3c]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax]
mov dword [rsp + 0x40], eax
xor edx, edx
mov rax, qword [rsp + 0xa8]
mov eax, dword [rax + 0x38]
mov ecx, 0x28
div ecx
mov edx, dword [rsp + 0x40]
mov ecx, eax
call fcn.180160af0
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0x20
jle 0x18017b761
mov dword [rsp + 0x44], 0x20
jmp 0x18017b771
mov rax, qword [rsp + 0x28]
add rax, 0x48
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x28], rax
jae 0x18017b98c
mov qword [rsp + 0x50], 0
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x48], 0
jmp 0x18017b7a6
mov eax, dword [rsp + 0x48]
inc eax
mov dword [rsp + 0x48], eax
mov rax, qword [rsp + 0x38]
mov eax, dword [rax + 0xd8]
cmp dword [rsp + 0x48], eax
jae 0x18017b971
mov eax, dword [rsp + 0x48]
imul rax, rax, 0x1c
mov rcx, qword [rsp + 0x38]
lea rax, [rcx + rax + 0xdc]
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x18]
and eax, 1
test eax, eax
jne 0x18017b7e6
jmp 0x18017b79c
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x18]
and eax, 2
test eax, eax
je 0x18017b7fc
mov byte [rsp + 0x78], 1
jmp 0x18017b801
mov byte [rsp + 0x78], 0
movzx eax, byte [rsp + 0x78]
mov byte [rsp + 0x68], al
mov rax, qword [rsp + 0x28]
movsx eax, byte [rax + 0xd]
mov rcx, qword [rsp + 0x20]
cmp eax, dword [rcx + 0x20]
jne 0x18017b827
mov dword [rsp + 0x7c], 1
jmp 0x18017b82f
mov dword [rsp + 0x7c], 0
cmp dword [rsp + 0x7c], 0
je 0x18017b840
mov byte [rsp + 0x80], 1
jmp 0x18017b848
mov byte [rsp + 0x80], 0
movzx eax, byte [rsp + 0x80]
mov byte [rsp + 0x69], al
movzx eax, byte [rsp + 0x68]
movzx ecx, byte [rsp + 0x69]
xor eax, ecx
test eax, eax
je 0x18017b96c
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx]
test eax, eax
jge 0x18017b895
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx]
neg eax
mov dword [rsp + 0x84], eax
jmp 0x18017b8ab
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx]
mov dword [rsp + 0x84], eax
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx + 0xc]
test eax, eax
jge 0x18017b8da
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx + 0xc]
neg eax
mov dword [rsp + 0x88], eax
jmp 0x18017b8f1
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx + 0xc]
mov dword [rsp + 0x88], eax
mov eax, dword [rsp + 0x88]
cmp dword [rsp + 0x84], eax
jle 0x18017b911
mov rax, qword [rsp + 0x60]
add rax, 0xc
mov qword [rsp + 0x70], rax
jmp 0x18017b91b
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x70]
sub eax, dword [rcx]
mov dword [rsp + 0x6c], eax
cmp dword [rsp + 0x6c], 0
jge 0x18017b93f
mov eax, dword [rsp + 0x6c]
neg eax
mov dword [rsp + 0x6c], eax
mov edx, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x6c]
call fcn.180160af0
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x58]
cmp dword [rsp + 0x6c], eax
jge 0x18017b96c
mov eax, dword [rsp + 0x6c]
mov dword [rsp + 0x58], eax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x50], rax
jmp 0x18017b79c
cmp qword [rsp + 0x50], 0
je 0x18017b987
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x50]
mov qword [rax + 0x18], rcx
jmp 0x18017b763
add rsp, 0x90
pop rdi
ret