Function at 0x1400ae260
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov qword [rbp], 0xfffffffffffffffe
mov rax, rdx
mov rsi, rcx
add rdx, r8
mov r9, r8
sub r9, rdx
xor edi, edi
jmp 0x1400ae2a1
lea rdi, [rcx + 1]
add rdi, r9
cmp r11d, 0x20
jne 0x1400ae330
cmp r8, rdi
je 0x1400ae32b
mov r10, rdi
lea rcx, [rax + rdi]
movzx edi, byte [rcx]
movzx r11d, dil
test r11b, r11b
jns 0x1400ae290
mov ebx, r11d
and ebx, 0x1f
movzx r14d, byte [rcx + 1]
and r14d, 0x3f
cmp r11b, 0xdf
jbe 0x1400ae30a
movzx r11d, byte [rcx + 2]
shl r14d, 6
and r11d, 0x3f
or r11d, r14d
cmp dil, 0xf0
jb 0x1400ae31c
lea rdi, [rcx + 4]
movzx r14d, byte [rcx + 3]
and ebx, 7
shl ebx, 0x12
shl r11d, 6
and r14d, 0x3f
or r14d, r11d
or r14d, ebx
mov r11d, r14d
jmp 0x1400ae294
lea rdi, [rcx + 2]
shl ebx, 6
or ebx, r14d
mov r11d, ebx
jmp 0x1400ae294
lea rdi, [rcx + 3]
shl ebx, 0xc
or r11d, ebx
jmp 0x1400ae294
xor r8d, r8d
jmp 0x1400ae33c
sub r8, r10
jne 0x1400ae434
mov rdx, rcx
mov qword [rbp - 0x18], 0
mov qword [rbp - 0x10], 8
mov qword [rbp - 8], 0
mov qword [rsp + 0x20], 0
lea rcx, [rbp - 0x28]
lea r9, [rbp - 0x18]
call fcn.1400af180
test byte [rbp - 0x28], 1
je 0x1400ae3f8
mov rax, qword [rbp - 0x24]
mov qword [rsi + 8], rax
movabs rax, 0x8000000000000000
mov qword [rsi], rax
mov rdi, qword [rbp - 0x10]
mov r14, qword [rbp - 8]
test r14, r14
je 0x1400ae410
lea r15, [rdi + 0x20]
jmp 0x1400ae3d7
movzx eax, byte [rcx]
and eax, 0x7f
bsr rdx, rax
xor edx, 0x3f
mov r8b, 0x46
sub r8b, dl
movzx edx, r8b
imul edx, edx, 0x93
shr edx, 0xa
add rdx, rax
mov r8d, 2
call fcn.1400227d0
add r15, 0x38
dec r14
je 0x1400ae410
mov rax, qword [r15]
cmp rax, 0xfffffffffffffffe
jg 0x1400ae3ce
lea rcx, [rax + rax]
cmp byte [rax + rax + 1], 0
jns 0x1400ae3a0
mov rbx, rcx
call fcn.1400f32e0
mov rcx, rbx
jmp 0x1400ae3a6
mov rax, qword [rbp - 0x20]
mov qword [rbp - 8], rax
mov qword [rsi + 0x10], rax
movups xmm0, xmmword [rbp - 0x18]
movups xmmword [rsi], xmm0
jmp 0x1400ae551
mov rax, qword [rbp - 0x18]
test rax, rax
je 0x1400ae551
imul rdx, rax, 0x38
mov r8d, 8
mov rcx, rdi
call fcn.1400227d0
jmp 0x1400ae551
movzx eax, byte [rcx]
cmp al, 0x2a
je 0x1400ae464
movzx eax, al
cmp eax, 0x58
je 0x1400ae458
cmp eax, 0x78
jne 0x1400ae339
movabs rax, 0x7800000009
jmp 0x1400ae46e
movabs rax, 0x5800000009
jmp 0x1400ae46e
movabs rax, 0x2a00000009
dec r8
inc rcx
mov r9, r8
sub r9, rdx
xor r10d, r10d
jmp 0x1400ae490
inc r10
add r10, r9
cmp r11d, 0x20
jne 0x1400ae517
cmp r10, r8
je 0x1400ae51c
mov rdx, r10
add r10, rcx
movzx ebx, byte [r10]
movzx r11d, bl
test r11b, r11b
jns 0x1400ae480
mov edi, r11d
and edi, 0x1f
movzx r14d, byte [r10 + 1]
and r14d, 0x3f
cmp r11b, 0xdf
jbe 0x1400ae4f6
movzx r11d, byte [r10 + 2]
shl r14d, 6
and r11d, 0x3f
or r11d, r14d
cmp bl, 0xf0
jb 0x1400ae508
movzx ebx, byte [r10 + 3]
add r10, 4
and edi, 7
shl edi, 0x12
shl r11d, 6
and ebx, 0x3f
or ebx, r11d
or ebx, edi
mov r11d, ebx
jmp 0x1400ae483
add r10, 2
shl edi, 6
or edi, r14d
mov r11d, edi
jmp 0x1400ae483
add r10, 3
shl edi, 0xc
or r11d, edi
jmp 0x1400ae483
cmp r8, rdx
jne 0x1400ae530
movups xmm0, xmmword [0x1401043e0]
movups xmmword [rsi], xmm0
mov qword [rsi + 0x10], 0
jmp 0x1400ae551
cmp byte [rcx + rdx], 0x2c
jne 0x1400ae53c
mov qword [rsi + 8], rax
jmp 0x1400ae544
mov qword [rsi + 8], 0xa
movabs rax, 0x8000000000000000
mov qword [rsi], rax
mov rax, rsi
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop r14
pop r15
pop rbp
ret