Function at 0x18006e9a0
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, 0xa0
movsxd rax, dword [rsp + 0xc0]
imul rax, rax, 0x898
mov rcx, qword [rsp + 0xb0]
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
cmp qword [rsp + 0x28], 0
je 0x18006ea0c
mov rax, qword [rsp + 0x20]
mov eax, dword [rax + 0x10]
imul rax, rax, 0x48
mov rcx, qword [rsp + 0x28]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x78], rax
jmp 0x18006ea15
mov qword [rsp + 0x78], 0
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x30], rax
movsxd rax, dword [rsp + 0xc0]
imul rax, rax, 0x1dfc
mov rcx, qword [rsp + 0xb8]
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 + 0xb8]
mov eax, dword [rax + 0x38]
mov ecx, 0x28
div ecx
mov edx, dword [rsp + 0x40]
mov ecx, eax
call fcn.18004eac0
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0x20
jle 0x18006ea7d
mov dword [rsp + 0x44], 0x20
jmp 0x18006ea8d
mov rax, qword [rsp + 0x28]
add rax, 0x48
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x30]
cmp qword [rsp + 0x28], rax
jae 0x18006ecba
mov qword [rsp + 0x50], 0
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x48], 0
jmp 0x18006eac2
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 0x18006ec9f
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 0x18006eb02
jmp 0x18006eab8
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x18]
and eax, 2
test eax, eax
je 0x18006eb1b
mov byte [rsp + 0x80], 1
jmp 0x18006eb23
mov byte [rsp + 0x80], 0
movzx eax, byte [rsp + 0x80]
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 0x18006eb4f
mov dword [rsp + 0x84], 1
jmp 0x18006eb5a
mov dword [rsp + 0x84], 0
cmp dword [rsp + 0x84], 0
je 0x18006eb6e
mov byte [rsp + 0x88], 1
jmp 0x18006eb76
mov byte [rsp + 0x88], 0
movzx eax, byte [rsp + 0x88]
mov byte [rsp + 0x69], al
movzx eax, byte [rsp + 0x68]
movzx ecx, byte [rsp + 0x69]
xor eax, ecx
test eax, eax
je 0x18006ec9a
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx]
test eax, eax
jge 0x18006ebc3
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx]
neg eax
mov dword [rsp + 0x8c], eax
jmp 0x18006ebd9
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx]
mov dword [rsp + 0x8c], eax
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx + 0xc]
test eax, eax
jge 0x18006ec08
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx + 0xc]
neg eax
mov dword [rsp + 0x90], eax
jmp 0x18006ec1f
mov rax, qword [rsp + 0x28]
movsx eax, word [rax]
mov rcx, qword [rsp + 0x60]
sub eax, dword [rcx + 0xc]
mov dword [rsp + 0x90], eax
mov eax, dword [rsp + 0x90]
cmp dword [rsp + 0x8c], eax
jle 0x18006ec3f
mov rax, qword [rsp + 0x60]
add rax, 0xc
mov qword [rsp + 0x70], rax
jmp 0x18006ec49
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 0x18006ec6d
mov eax, dword [rsp + 0x6c]
neg eax
mov dword [rsp + 0x6c], eax
mov edx, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x6c]
call fcn.18004eac0
mov dword [rsp + 0x6c], eax
mov eax, dword [rsp + 0x58]
cmp dword [rsp + 0x6c], eax
jge 0x18006ec9a
mov eax, dword [rsp + 0x6c]
mov dword [rsp + 0x58], eax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0x50], rax
jmp 0x18006eab8
cmp qword [rsp + 0x50], 0
je 0x18006ecb5
mov rax, qword [rsp + 0x28]
mov rcx, qword [rsp + 0x50]
mov qword [rax + 0x18], rcx
jmp 0x18006ea7f
add rsp, 0xa0
pop rdi
ret