Function at 0x18007ae60
Capabilities:
Encrypt data using rc4 prga

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push r12
push r14
sub rsp, 0x20
mov ebp, dword [rsp + 0x60]
mov r14, r8
mov qword [rcx + 0x18], rdx
mov r12, rdx
mov rbx, rcx
test rdx, rdx
je 0x1800ccbc2
test r8, r8
je 0x1800ccbc2
mov eax, ebp
sar eax, 1
add eax, 4
add eax, ebp
cmp r9d, eax
jl 0x1800ccbc2
cmp dword [rcx + 8], 0
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x50], r15
je 0x18007b07f
movzx eax, byte [rcx + 0x20]
mov byte [rdx], al
mov r8d, dword [rcx + 0x24]
mov r15d, 1
sub ebp, r15d
js 0x18007af09
mov qword [rsp + 0x40], rsi
movzx esi, byte [r14]
lea r14, [r14 + 1]
mov eax, esi
mov edi, esi
shl eax, 4
xor eax, r8d
shl edi, 0xc
movsxd rdx, eax
add edi, r8d
mov ecx, dword [rbx + rdx*4 + 0x4e54]
cmp ecx, edi
jne 0x18007af53
movsxd rcx, eax
mov r8d, dword [rbx + rcx*4 + 0x28]
sub ebp, r15d
jns 0x18007aed1
mov rsi, qword [rsp + 0x40]
mov edi, dword [rsp + 0x68]
test edi, edi
jne 0x18007b0ce
mov dword [rbx + 0x24], r8d
cmp dword [rbx + 0xc], 0
mov r15, qword [rsp + 0x50]
je 0x18007b06d
mov rcx, qword [rbx + 0x18]
movzx eax, byte [rcx]
sub ecx, r12d
mov dword [rbx + 0x20], eax
test edi, edi
jne 0x18007b0f7
mov rdi, qword [rsp + 0x48]
mov eax, ecx
mov rbx, qword [rsp + 0x58]
add rsp, 0x20
pop r14
pop r12
pop rbp
ret
cmp ecx, 0xffffffff
je 0x18007afa0
mov ecx, 0x138b
mov r9d, r15d
sub ecx, eax
test eax, eax
cmovne r9d, ecx
movsxd r10, r9d
sub eax, r9d
sub rdx, r10
mov ecx, eax
mov rax, rdx
add rdx, 0x138b
test ecx, ecx
cmovns rdx, rax
lea eax, [rcx + 0x138b]
cmovns eax, ecx
mov ecx, dword [rbx + rdx*4 + 0x4e54]
cmp ecx, edi
je 0x18007aef7
cmp ecx, 0xffffffff
jne 0x18007af6b
mov r9d, dword [rbx + 0xc]
mov edx, r8d
mov r10, qword [rbx + 0x18]
test r9d, r9d
je 0x18007afbb
mov ecx, r9d
shl edx, cl
movzx ecx, byte [r10]
or edx, ecx
add r9d, dword [rbx + 8]
mov byte [r10], dl
cmp r9d, 7
jle 0x18007afdf
inc qword [rbx + 0x18]
sub r9d, 8
mov rcx, qword [rbx + 0x18]
shr edx, 8
mov byte [rcx], dl
cmp r9d, 7
jg 0x18007b017
mov ecx, eax
mov eax, dword [rbx + 0x10]
mov dword [rbx + 0xc], r9d
mov dword [rbx + rcx*4 + 0x28], eax
mov eax, r15d
mov dword [rbx + rcx*4 + 0x4e54], edi
inc dword [rbx + 0x10]
mov ecx, dword [rbx + 8]
mov edx, dword [rbx + 0x10]
shl eax, cl
inc eax
cmp edx, eax
je 0x18007b033
cmp edx, 0xfff
je 0x18007b03b
mov r8d, esi
jmp 0x18007aeff
inc qword [rbx + 0x18]
mov ecx, 0x10
sub ecx, dword [rbx + 0xc]
sub r9d, 8
mov rdx, qword [rbx + 0x18]
shr r8d, cl
mov byte [rdx], r8b
jmp 0x18007afdf
lea eax, [rcx + 1]
mov dword [rbx + 8], eax
jmp 0x18007b007
mov edx, dword [rbx + 4]
mov rcx, rbx
call fcn.18007b10c
mov eax, dword [rbx]
lea rdi, [rbx + 0x4e54]
inc eax
mov ecx, 0x138b
mov dword [rbx + 8], eax
mov eax, dword [rbx + 4]
add eax, 2
mov dword [rbx + 0x10], eax
mov rax, 0xffffffffffffffff
rep stosd dword [rdi], eax
jmp 0x18007b00f
mov ecx, dword [rbx + 0x18]
sub ecx, r12d
mov dword [rbx + 0x20], 0
jmp 0x18007af3d
mov dword [rcx + 0x20], 0
lea rdi, [rcx + 0x4e54]
mov byte [rdx], 0
mov eax, dword [rcx]
inc eax
mov dword [rcx + 0xc], 0
mov dword [rcx + 8], eax
mov eax, dword [rcx + 4]
add eax, 2
mov dword [rcx + 0x10], eax
mov rax, 0xffffffffffffffff
mov ecx, 0x138b
rep stosd dword [rdi], eax
mov edx, dword [rbx + 4]
mov rcx, rbx
call fcn.18007b10c
movzx r8d, byte [r14]
inc r14
dec ebp
jmp 0x18007aec1
mov edx, r8d
mov rcx, rbx
call fcn.18007b10c
mov ecx, dword [rbx + 8]
shl r15d, cl
cmp dword [rbx + 0x10], r15d
je 0x18007b0fe
mov edx, dword [rbx + 4]
mov rcx, rbx
inc edx
call fcn.18007b10c
jmp 0x18007af19
inc ecx
jmp 0x18007af3d
lea eax, [rcx + 1]
mov dword [rbx + 8], eax
jmp 0x18007b0e5
mov eax, 0xffffffff
jmp 0x18007af44