Function at 0x1800ae020
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
mov r9, qword [rcx + 8]
mov ecx, dword [rcx + 0x34]
lea r8, [r9 + rcx]
movzx esi, word [r9 + rcx]
rol si, 8
test si, si
je 0x1800ae092
cmp si, 6
je 0x1800ae0b5
mov ebx, dword [0x180343580]
mov eax, dword [0x18034357c]
lea ebp, [rbx - 1]
imul ebp, ebx
cmp si, 2
jne 0x1800ae0f1
test bpl, 1
sete cl
cmp eax, 0xa
setl dl
cmp eax, 9
setg bl
xor bl, cl
and dl, cl
xor eax, eax
cmp bl, dl
je 0x1800ae1fe
nop word cs:[rax + rax]
nop dword [rax]
jmp 0x1800ae090
movzx eax, word [r8 + 2]
shl eax, 0x10
bswap eax
add eax, 0xfffffffa
cmp eax, edx
jle 0x1800ae1fc
movsxd rax, edx
movzx eax, byte [r8 + rax + 6]
jmp 0x1800ae1fe
movzx ecx, word [r8 + 6]
shl ecx, 0x10
bswap ecx
xor eax, eax
cmp ecx, edx
ja 0x1800ae1fe
movzx ebp, word [r8 + 8]
shl ebp, 0x10
bswap ebp
add ebp, ecx
cmp ebp, edx
jbe 0x1800ae1fe
sub edx, ecx
add edx, edx
movzx eax, word [r8 + rdx + 0xa]
shl eax, 0x10
bswap eax
jmp 0x1800ae1fe
cmp eax, 9
setg bl
cmp si, 4
jne 0x1800ae185
xor eax, eax
cmp edx, 0xffff
jg 0x1800ae1fe
movzx r11d, word [r8 + 6]
shl r11, 0x30
bswap r11
movzx eax, byte [r8 + 0xc]
shl rax, 8
movzx esi, byte [r8 + 0xd]
and esi, 0xfffffffe
or rsi, rax
lea edi, [rcx + 0xe]
movzx ebx, byte [r8 + 0xa]
shl ebx, 8
movzx eax, byte [r8 + 0xb]
mov ebp, edi
add rbp, r9
movzx ebp, word [rsi + rbp]
shl ebp, 0x10
bswap ebp
xor r10d, r10d
cmp ebp, edx
movzx esi, si
cmovg esi, r10d
or bx, ax
lea r14d, [rdi + rsi - 2]
je 0x1800ae205
movzx esi, word [r8 + 8]
shl rsi, 0x30
bswap rsi
movzx eax, ax
test al, 1
jne 0x1800ae20a
mov edi, ebx
jmp 0x1800ae231
mov ecx, esi
and ecx, 0xfffe
cmp cx, 0xc
jne 0x1800ae1fc
and bl, bpl
cmp eax, 9
setg al
and al, bpl
nop
test bl, bl
jne 0x1800ae1a0
test al, al
jne 0x1800ae1a0
mov ebp, dword [r8 + 0xc]
bswap ebp
test ebp, ebp
jle 0x1800ae1fc
xor ecx, ecx
jmp 0x1800ae1c6
mov ebp, eax
cmp ebp, ecx
jle 0x1800ae1fc
mov eax, ebp
sub eax, ecx
sar eax, 1
add eax, ecx
movsxd rbx, eax
shl rbx, 2
lea rdi, [rbx + rbx*2]
mov ebx, dword [r8 + rdi + 0x10]
bswap ebx
cmp ebx, edx
ja 0x1800ae1c0
mov ecx, dword [r8 + rdi + 0x14]
bswap ecx
cmp ecx, edx
jae 0x1800ae309
add eax, 1
mov ecx, eax
cmp ebp, ecx
jg 0x1800ae1c6
xor eax, eax
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
ret
mov eax, r14d
jmp 0x1800ae237
shr rsi, 1
mov eax, r14d
add rax, r9
mov edi, esi
and edi, 0xfffffffe
movzx ebp, word [rdi + rax]
shl ebp, 0x10
bswap ebp
xor eax, eax
cmp ebp, edx
cmovl eax, edi
add eax, r14d
lea edi, [rbx - 1]
mov r14d, eax
cmp bx, 1
jne 0x1800ae2b3
sub eax, ecx
add eax, 0x1fff4
mov esi, r11d
and esi, 0xfffffffe
add rsi, r8
add rsi, 0xe
and eax, 0x1fffe
movzx esi, word [rax + rsi + 2]
shl esi, 0x10
bswap esi
cmp esi, edx
jg 0x1800ae339
shr r11d, 1
add r8, 0xe
mov ebx, r11d
lea rbp, [rbx + rbx]
lea rbp, [rbp + rbp*2]
lea rdi, [r8 + rbp]
movzx edi, word [rax + rdi + 2]
shl rdi, 0x30
bswap rdi
test di, di
je 0x1800ae325
add r9, rdi
sub edx, esi
add edx, edx
movsxd rdx, edx
add rdx, r9
add rdx, rcx
add rdx, rbp
movzx r10d, word [rax + rdx + 0x10]
shl r10d, 0x10
bswap r10d
jmp 0x1800ae339
mov eax, r14d
jmp 0x1800ae2cc
add eax, ebx
add di, 0xfffe
je 0x1800ae237
movzx esi, si
mov ebx, esi
shr ebx, 1
mov ebp, eax
add rbp, r9
and ebx, 0xfffffffe
movzx ebp, word [rbx + rbp]
shl ebp, 0x10
bswap ebp
cmp ebp, edx
jl 0x1800ae2ea
xor ebx, ebx
add ebx, eax
shr esi, 2
lea rbp, [r9 + rbx]
mov eax, esi
and eax, 0xfffffffe
movzx ebp, word [rax + rbp]
shl ebp, 0x10
bswap ebp
cmp ebp, edx
jl 0x1800ae2c0
xor eax, eax
jmp 0x1800ae2c0
mov eax, dword [r8 + rdi + 0x18]
bswap eax
cmp si, 0xc
jne 0x1800ae1fe
sub edx, ebx
add edx, eax
mov eax, edx
jmp 0x1800ae1fe
lea rcx, [r8 + rbx*4]
movzx r10d, word [rax + rcx + 2]
shl r10d, 0x10
bswap r10d
add r10d, edx
movzx eax, r10w
jmp 0x1800ae1fe