Function at 0x3a1226480
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
mov rsi, rdx
mov rdx, qword [rsp + 0x60]
mov rax, rcx
lea rdi, [rcx + rsi]
movzx ebp, byte [rdx + 2]
lea r10, [rdx + 4]
test r9, r9
je 0x3a1226770
movzx edx, byte [r8 + r9 - 1]
lea r12, [r8 + 8]
cmp r9, 7
jbe 0x3a1226590
mov rcx, 0xffffffffffffffff
test dl, dl
je 0x3a1226581
cmp r9, 0xffffffffffffff88
ja 0x3a1226785
movzx r11d, dl
sub r9, 8
mov edx, 8
lea rbx, [r8 + r9]
lzcnt r11d, r11d
xor r11d, 0x1f
mov rcx, qword [rbx]
sub edx, r11d
cmp rsi, 3
jg 0x3a122661b
cmp rbx, r12
jae 0x3a122674a
cmp r8, rbx
je 0x3a1226730
mov ecx, edx
mov r11, rbx
shr ecx, 3
mov r12d, ecx
sub r11, r12
cmp r11, r8
jae 0x3a1226532
mov ecx, r9d
mov r9d, r9d
sub rbx, r9
mov r11, rbx
shl ecx, 3
mov rbx, r11
sub edx, ecx
mov rcx, qword [r11]
nop dword [rax]
cmp rax, rdi
jae 0x3a1226571
neg ebp
and ebp, 0x3f
shlx r9, rcx, rdx
shrx r9, r9, rbp
lea r9, [r10 + r9*2]
add rax, 1
movzx r11d, byte [r9 + 1]
movzx r9d, byte [r9]
mov byte [rax - 1], r11b
add edx, r9d
cmp rdi, rax
jne 0x3a122654a
cmp r8, rbx
je 0x3a1226739
mov rcx, 0xffffffffffffffec
mov rax, rcx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
lea rbx, [0x3a1264420]
movzx ecx, byte [r8]
movsxd r11, dword [rbx + r9*4]
add r11, rbx
jmp r11
movzx r11d, byte [r8 + 6]
shl r11, 0x30
add rcx, r11
movzx r11d, byte [r8 + 5]
shl r11, 0x28
add rcx, r11
movzx r11d, byte [r8 + 4]
shl r11, 0x20
add rcx, r11
movzx r11d, byte [r8 + 3]
shl r11, 0x18
add rcx, r11
movzx r11d, byte [r8 + 2]
shl r11, 0x10
add rcx, r11
movzx r11d, byte [r8 + 1]
shl r11, 8
add rcx, r11
test dl, dl
je 0x3a122657a
xor r11d, r11d
mov rbx, r8
lzcnt r11d, edx
mov edx, 9
xor r11d, 0x1f
sub edx, r9d
shl edx, 3
sub edx, r11d
cmp rsi, 3
jle 0x3a1226730
mov r11d, ebp
lea r13, [rdi - 3]
neg r11d
and r11d, 0x3f
jmp 0x3a12266e7
cmp r8, rbx
je 0x3a1226730
mov ecx, edx
mov r9, rbx
shr ecx, 3
mov r14d, ecx
sub r9, r14
cmp r9, r8
jb 0x3a1226710
shl ecx, 3
mov rbx, r9
sub edx, ecx
mov rcx, qword [r9]
cmp rax, r13
jae 0x3a1226540
shlx r9, rcx, rdx
shrx r9, r9, r11
lea r9, [r10 + r9*2]
add rax, 4
movzx r14d, byte [r9 + 1]
movzx r9d, byte [r9]
add r9d, edx
mov byte [rax - 4], r14b
shlx rdx, rcx, r9
shrx rdx, rdx, r11
lea rdx, [r10 + rdx*2]
movzx r14d, byte [rdx + 1]
movzx edx, byte [rdx]
add edx, r9d
mov byte [rax - 3], r14b
shlx r9, rcx, rdx
shrx r9, r9, r11
lea r9, [r10 + r9*2]
movzx r14d, byte [r9 + 1]
movzx r9d, byte [r9]
add r9d, edx
mov byte [rax - 2], r14b
shlx rdx, rcx, r9
shrx rdx, rdx, r11
lea rdx, [r10 + rdx*2]
movzx r14d, byte [rdx + 1]
movzx edx, byte [rdx]
add edx, r9d
mov byte [rax - 1], r14b
cmp edx, 0x40
ja 0x3a1226540
cmp rbx, r12
jb 0x3a1226630
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov rcx, qword [rbx]
cmp rax, r13
jb 0x3a1226664
jmp 0x3a1226540
mov rcx, rbx
sub rcx, r8
mov r9d, ecx
shl ecx, 3
sub rbx, r9
sub edx, ecx
mov rcx, qword [rbx]
jmp 0x3a1226540
cmp rax, rdi
jb 0x3a1226545
mov rcx, rsi
cmp edx, 0x40
jne 0x3a122657a
jmp 0x3a1226581
mov ecx, edx
and edx, 7
shr ecx, 3
sub rbx, rcx
mov rcx, qword [rbx]
cmp rax, rdi
jb 0x3a1226545
jmp 0x3a122657a
mov rcx, 0xffffffffffffffb8
mov rax, rcx
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
ret
mov rcx, r9
jmp 0x3a1226581