Function at 0x140008970
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
test r8d, r8d
js 0x140008ecf
mov r15, rcx
movzx r10d, word [rdx + 2]
xor eax, eax
test r10w, r10w
sete al
mov ebp, 0x8a
mov ecx, 7
cmove ecx, ebp
mov ebx, 4
sub ebx, eax
add r8d, 1
xor r11d, r11d
mov esi, 0xffffffff
xor r12d, r12d
nop word [rax + rax]
mov r14d, r10d
movzx r10d, word [rdx + r11*4 + 6]
add r11, 1
lea ebp, [r12 + 1]
cmp ebp, ecx
jge 0x1400089f0
cmp r14d, r10d
jne 0x1400089f0
mov r14d, esi
jmp 0x140008ec0
cmp ebp, ebx
jge 0x140008ab0
mov r9d, r14d
mov ecx, dword [r15 + 0x1714]
movzx ebx, word [r15 + 0x1710]
not r12d
nop dword [rax]
movzx esi, word [r15 + r9*4 + 0xaa6]
mov edi, 0x10
movzx eax, word [r15 + r9*4 + 0xaa4]
mov ebp, eax
shl ebp, cl
sub edi, esi
or ebx, ebp
mov word [r15 + 0x1710], bx
cmp ecx, edi
jle 0x140008a90
mov rcx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea ebp, [rdi + 1]
mov dword [r15 + 0x28], ebp
mov byte [rcx + rdi], bl
movzx ecx, byte [r15 + 0x1711]
mov rdi, qword [r15 + 0x10]
mov ebx, dword [r15 + 0x28]
lea ebp, [rbx + 1]
mov dword [r15 + 0x28], ebp
mov byte [rdi + rbx], cl
mov edi, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, dil
shr eax, cl
mov word [r15 + 0x1710], ax
lea ecx, [rsi + rdi]
add ecx, 0xfffffff0
mov ebx, eax
jmp 0x140008a92
add ecx, esi
mov dword [r15 + 0x1714], ecx
inc r12d
jne 0x140008a10
jmp 0x140008e97
test r14d, r14d
je 0x140008ad5
cmp r14d, esi
jne 0x140008b6b
mov r9d, dword [r15 + 0x1714]
movzx ebx, word [r15 + 0x1710]
mov r12d, ebp
jmp 0x140008c94
cmp ebp, 0xa
jg 0x140008bfd
movzx ebp, word [r15 + 0xaea]
mov r9d, dword [r15 + 0x1714]
mov esi, 0x10
sub esi, ebp
movzx eax, word [r15 + 0xae8]
mov ebx, eax
mov ecx, r9d
shl ebx, cl
or bx, word [r15 + 0x1710]
mov word [r15 + 0x1710], bx
cmp r9d, esi
jle 0x140008d8d
mov rcx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rcx + rdi], bl
mov cl, byte [r15 + 0x1711]
mov rbx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rbx + rdi], cl
mov ebx, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, bl
shr eax, cl
mov word [r15 + 0x1710], ax
lea r9d, [rbx + rbp]
add r9d, 0xfffffff0
mov ebx, eax
jmp 0x140008d90
mov eax, r14d
movzx ebp, word [r15 + rax*4 + 0xaa6]
mov r9d, dword [r15 + 0x1714]
mov esi, 0x10
sub esi, ebp
movzx eax, word [r15 + rax*4 + 0xaa4]
mov ebx, eax
mov ecx, r9d
shl ebx, cl
or bx, word [r15 + 0x1710]
mov word [r15 + 0x1710], bx
cmp r9d, esi
jle 0x140008c8a
mov rcx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rcx + rdi], bl
mov cl, byte [r15 + 0x1711]
mov rbx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rbx + rdi], cl
mov ebx, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, bl
shr eax, cl
mov word [r15 + 0x1710], ax
lea r9d, [rbx + rbp]
add r9d, 0xfffffff0
mov ebx, eax
jmp 0x140008c8d
movzx ebp, word [r15 + 0xaee]
mov r9d, dword [r15 + 0x1714]
mov esi, 0x10
sub esi, ebp
movzx eax, word [r15 + 0xaec]
mov ebx, eax
mov ecx, r9d
shl ebx, cl
or bx, word [r15 + 0x1710]
mov word [r15 + 0x1710], bx
cmp r9d, esi
jle 0x140008e08
mov rcx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rcx + rdi], bl
mov cl, byte [r15 + 0x1711]
mov rbx, qword [r15 + 0x10]
mov edi, dword [r15 + 0x28]
lea esi, [rdi + 1]
mov dword [r15 + 0x28], esi
mov byte [rbx + rdi], cl
mov ebx, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, bl
shr eax, cl
mov word [r15 + 0x1710], ax
lea r9d, [rbx + rbp]
add r9d, 0xfffffff0
mov ebx, eax
jmp 0x140008e0b
add r9d, ebp
mov dword [r15 + 0x1714], r9d
movzx ebp, word [r15 + 0xae6]
mov eax, 0x10
movzx esi, word [r15 + 0xae4]
mov edi, esi
mov ecx, r9d
shl edi, cl
sub eax, ebp
or ebx, edi
mov word [r15 + 0x1710], bx
cmp r9d, eax
jle 0x140008d0d
mov rax, qword [r15 + 0x10]
mov ecx, dword [r15 + 0x28]
lea edi, [rcx + 1]
mov dword [r15 + 0x28], edi
mov byte [rax + rcx], bl
mov al, byte [r15 + 0x1711]
mov rcx, qword [r15 + 0x10]
mov ebx, dword [r15 + 0x28]
lea edi, [rbx + 1]
mov dword [r15 + 0x28], edi
mov byte [rcx + rbx], al
mov eax, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, al
shr esi, cl
mov word [r15 + 0x1710], si
lea r9d, [rax + rbp]
add r9d, 0xfffffff0
mov ebx, esi
jmp 0x140008d10
add r9d, ebp
add r12d, 0xfffd
movzx eax, r12w
mov esi, eax
mov ecx, r9d
shl esi, cl
mov dword [r15 + 0x1714], r9d
or ebx, esi
mov word [r15 + 0x1710], bx
cmp r9d, 0xf
jl 0x140008d84
mov rcx, qword [r15 + 0x10]
mov ebp, dword [r15 + 0x28]
lea edi, [rbp + 1]
mov dword [r15 + 0x28], edi
mov byte [rcx + rbp], bl
mov cl, byte [r15 + 0x1711]
mov rbp, qword [r15 + 0x10]
mov ebx, dword [r15 + 0x28]
lea edi, [rbx + 1]
mov dword [r15 + 0x28], edi
mov byte [rbp + rbx], cl
mov r9d, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, r9b
shr eax, cl
mov word [r15 + 0x1710], ax
add r9d, 0xfffffff2
jmp 0x140008e90
add r9d, 2
jmp 0x140008e90
add r9d, ebp
add r12d, 0xfffe
movzx eax, r12w
mov esi, eax
mov ecx, r9d
shl esi, cl
mov dword [r15 + 0x1714], r9d
or ebx, esi
mov word [r15 + 0x1710], bx
cmp r9d, 0xe
jl 0x140008e7c
mov rcx, qword [r15 + 0x10]
mov ebp, dword [r15 + 0x28]
lea edi, [rbp + 1]
mov dword [r15 + 0x28], edi
mov byte [rcx + rbp], bl
mov cl, byte [r15 + 0x1711]
mov rbp, qword [r15 + 0x10]
mov ebx, dword [r15 + 0x28]
lea edi, [rbx + 1]
mov dword [r15 + 0x28], edi
mov byte [rbp + rbx], cl
mov r9d, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, r9b
shr eax, cl
mov word [r15 + 0x1710], ax
add r9d, 0xfffffff3
jmp 0x140008e90
add r9d, ebp
add r12d, 0xfff6
movzx eax, r12w
mov esi, eax
mov ecx, r9d
shl esi, cl
mov dword [r15 + 0x1714], r9d
or ebx, esi
mov word [r15 + 0x1710], bx
cmp r9d, 0xa
jl 0x140008e82
mov rcx, qword [r15 + 0x10]
mov ebp, dword [r15 + 0x28]
lea edi, [rbp + 1]
mov dword [r15 + 0x28], edi
mov byte [rcx + rbp], bl
mov cl, byte [r15 + 0x1711]
mov rbp, qword [r15 + 0x10]
mov ebx, dword [r15 + 0x28]
lea edi, [rbx + 1]
mov dword [r15 + 0x28], edi
mov byte [rbp + rbx], cl
mov r9d, dword [r15 + 0x1714]
mov cl, 0x10
sub cl, r9b
shr eax, cl
mov word [r15 + 0x1710], ax
add r9d, 0xfffffff7
jmp 0x140008e90
add r9d, 3
jmp 0x140008e90
add r9d, 7
nop word cs:[rax + rax]
mov dword [r15 + 0x1714], r9d
xor ebp, ebp
test r10w, r10w
je 0x140008eb3
xor ecx, ecx
cmp r14d, r10d
sete cl
mov ebx, 4
sub ebx, ecx
xor ecx, 7
jmp 0x140008ec0
mov ecx, 0x8a
mov ebx, 3
nop dword [rax]
mov esi, r14d
mov r12d, ebp
cmp r11, r8
jne 0x1400089c0
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret