Function at 0x140124f70
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x28
mov rsi, qword [rsp + 0x90]
mov edi, r8d
mov r10, rcx
mov rbx, rdx
mov ecx, r9d
lea rax, [rdi + 1]
mov ebp, r9d
mov edx, eax
mov qword [rsp + 8], rax
mov eax, 1
shl rax, cl
lea rax, [rax + rdx*2 + 8]
cmp qword [rsp + 0x98], rax
mov rax, 0xffffffffffffffd2
setb r12b
cmp r8d, 0xff
seta dl
or r12b, dl
jne 0x140125162
mov rax, 0xffffffffffffffd4
cmp r9d, 0xc
ja 0x140125162
mov r14d, 1
lea rax, [r10 + 4]
xor r11d, r11d
xor r15d, r15d
mov edx, r14d
mov qword [rsp], rax
add r8d, 1
mov r13d, 1
shl edx, cl
movzx ecx, bp
or ecx, 0x10000
lea r9d, [rdx - 1]
mov dword [rsp + 0x18], edx
mov dword [rsp + 0x1c], ecx
mov dword [rsp + 0x10], ecx
lea ecx, [rbp - 1]
shl r14d, cl
mov ecx, r9d
jmp 0x14012504c
cmp ax, r14w
mov word [rsi + r11*2], ax
mov r12d, 1
cmovge r13d, r15d
add r11, 1
cmp r11d, r8d
jae 0x140125078
movzx eax, word [rbx + r11*2]
cmp ax, 0xffff
jne 0x140125030
mov rdx, qword [rsp]
mov eax, ecx
sub ecx, 1
mov byte [rdx + rax*4 + 2], r11b
mov eax, 1
mov word [rsi + r11*2], ax
add r11, 1
cmp r11d, r8d
jb 0x14012504c
mov edx, dword [rsp + 0x18]
test r12b, r12b
je 0x140125093
movzx r11d, word [rsp + 0x1c]
shl r13d, 0x10
or r11d, r13d
mov dword [rsp + 0x10], r11d
mov eax, dword [rsp + 0x10]
mov r12d, edx
mov r11d, edx
xor r13d, r13d
shr r11d, 3
shr r12d, 1
lea r12d, [r12 + r11 + 3]
mov dword [r10], eax
xor r11d, r11d
cmp ecx, r9d
je 0x140125173
mov dword [rsp + 8], edx
mov r15, qword [rsp]
nop dword [rax + rax]
movsx r14d, word [rbx + r13*2]
mov edi, r13d
xor eax, eax
test r14w, r14w
jle 0x140125103
nop dword [rax + rax]
mov edx, r11d
mov byte [r15 + rdx*4 + 2], dil
nop dword [rax + rax]
add r11d, r12d
and r11d, r9d
cmp ecx, r11d
jb 0x1401250f0
add eax, 1
cmp eax, r14d
jne 0x1401250e0
add r13, 1
cmp r13d, r8d
jb 0x1401250c8
mov edx, dword [rsp + 8]
mov rax, 0xffffffffffffffff
test r11d, r11d
jne 0x140125162
mov r9d, edx
xor r8d, r8d
nop word [rax + rax]
movzx eax, byte [r10 + r8*4 + 6]
lea rcx, [rsi + rax*2]
movzx eax, word [rcx]
lea r11d, [rax + 1]
mov word [rcx], r11w
bsr ecx, eax
xor ecx, 0x1f
lea ecx, [rbp + rcx - 0x1f]
shl eax, cl
mov byte [r10 + r8*4 + 7], cl
sub eax, r9d
mov word [r10 + r8*4 + 4], ax
add r8, 1
cmp r8d, edx
jb 0x140125128
xor eax, eax
add rsp, 0x28
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [rsp + 8]
mov r14d, ecx
mov dword [rsp + 8], edx
mov r15d, r12d
mov qword [rsp + 0x10], r14
xor r9d, r9d
xor ecx, ecx
lea r11, [rsi + rax*2]
lea rax, [rdi + rdi + 0xa]
mov qword [rsp + 0x70], r10
mov r10, rax
movsx rdx, word [rbx + r13*2]
mov qword [r11 + rcx], r9
cmp dx, 8
jle 0x140125222
movsx eax, dx
sub eax, 9
mov edi, eax
shr edi, 3
add edi, 1
cmp eax, 7
jbe 0x140125292
mov r12d, edi
lea rax, [r10 + rcx]
movq xmm0, r9
shr r12d, 1
add rax, rsi
punpcklqdq xmm0, xmm0
shl r12, 4
lea r14, [r12 + rax]
and r12d, 0x10
je 0x1401251f8
movups xmmword [rax], xmm0
add rax, 0x10
cmp rax, r14
je 0x140125208
nop dword [rax + rax]
movups xmmword [rax], xmm0
add rax, 0x20
movups xmmword [rax - 0x10], xmm0
cmp rax, r14
jne 0x1401251f8
test dil, 1
je 0x140125222
and edi, 0xfffffffe
lea eax, [rdi*8 + 8]
cdqe
lea rdi, [r11 + rcx]
mov qword [rdi + rax], r9
movabs rax, 0x101010101010101
add r13, 1
add rcx, rdx
add r9, rax
cmp r13d, r8d
jb 0x14012519d
movsxd rdi, dword [rsp + 8]
mov r14, qword [rsp + 0x10]
xor r8d, r8d
xor ecx, ecx
mov r10, qword [rsp + 0x70]
mov rax, qword [rsp]
mov rdx, rdi
movzx ebx, byte [r11 + r8]
mov r9, r14
and r9, rcx
add rcx, r15
mov byte [rax + r9*4 + 2], bl
mov r9, r14
movzx ebx, byte [r11 + r8 + 1]
add r8, 2
and r9, rcx
add rcx, r15
mov byte [rax + r9*4 + 2], bl
and rcx, r14
cmp r8, rdi
jb 0x14012525a
jmp 0x14012511c
mov eax, 8
jmp 0x140125218