Function at 0x180020bb1
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0xb0
mov rbx, rdx
mov rsi, rcx
lea rdi, [rsp + 0x30]
mov rcx, rdi
call fcn.180020b51
cmp dword [rdi], 2
jne 0x180020bea
mov dl, byte [rsp + 0x34]
lea rcx, [rsp + 0x70]
call fcn.180020ea4
jmp 0x180020c1b
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0xa0], rax
movups xmm0, xmmword [rsp + 0x30]
movups xmm1, xmmword [rsp + 0x40]
movups xmm2, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0x90], xmm2
movaps xmmword [rsp + 0x80], xmm1
movaps xmmword [rsp + 0x70], xmm0
mov eax, dword [rsp + 0x70]
cmp eax, 2
jne 0x180020c86
mov al, byte [rsp + 0x76]
movzx ecx, word [rsp + 0x74]
mov word [rsp + 0x28], cx
mov byte [rsp + 0x2a], al
lea rdi, [rsp + 0x30]
mov rcx, rdi
mov rdx, rbx
call fcn.180020b51
mov ecx, dword [rdi]
cmp ecx, 2
jne 0x180020d2e
movzx r15d, byte [rsp + 0x34]
test r15b, r15b
js 0x180020cda
mov edi, r15d
and edi, 0xffffff00
or edi, r15d
mov al, byte [rsp + 0x2a]
mov byte [rsi + 0xa], al
movzx eax, word [rsp + 0x28]
mov word [rsi + 8], ax
mov dword [rsi + 4], edi
mov dword [rsi], 2
jmp 0x180020e38
mov cl, byte [rsp + 0x76]
mov byte [rsp + 0x26], cl
movzx ecx, word [rsp + 0x74]
mov word [rsp + 0x24], cx
mov cl, byte [rsp + 0xa7]
mov byte [rsi + 0x37], cl
movups xmm0, xmmword [rsp + 0x97]
movups xmmword [rsi + 0x27], xmm0
movups xmm0, xmmword [rsp + 0x87]
movups xmmword [rsi + 0x17], xmm0
movups xmm0, xmmword [rsp + 0x77]
movups xmmword [rsi + 7], xmm0
mov cl, byte [rsp + 0x26]
mov byte [rsi + 6], cl
movzx ecx, word [rsp + 0x24]
mov word [rsi + 4], cx
mov dword [rsi], eax
jmp 0x180020e38
xor ecx, ecx
cmp r15b, 0x80
jne 0x180020cea
mov bpl, 5
jmp 0x180020da6
mov bpl, 0xd
cmp r15b, 0x84
ja 0x180020da6
mov r12, r15
xor r12, 0x80
xor edi, edi
lea r14, [rsp + 0x30]
sub r12, 1
jb 0x180020d7f
mov rcx, r14
mov rdx, rbx
call fcn.180020b51
mov ecx, dword [rsp + 0x30]
cmp ecx, 2
jne 0x180020d2e
shl edi, 8
movzx eax, byte [rsp + 0x34]
or edi, eax
jmp 0x180020d08
mov dil, byte [rsp + 0x34]
mov bpl, byte [rsp + 0x38]
movzx edx, byte [rsp + 0x37]
shl edx, 0x10
movzx eax, word [rsp + 0x35]
or eax, edx
movzx edx, word [rsp + 0x39]
mov word [rsp + 0x2c], dx
mov dl, byte [rsp + 0x3b]
mov byte [rsp + 0x2e], dl
movups xmm0, xmmword [rsp + 0x3c]
movaps xmmword [rsp + 0x70], xmm0
movups xmm0, xmmword [rsp + 0x4c]
movaps xmmword [rsp + 0x80], xmm0
movups xmm0, xmmword [rsp + 0x58]
movups xmmword [rsp + 0x8c], xmm0
jmp 0x180020da6
cmp edi, 0x10000000
jae 0x180020e4a
mov ecx, edi
call fcn.180020e59
xor ecx, ecx
test al, al
je 0x180020da6
cmp dl, r15b
jne 0x180020da6
movzx r15d, dil
jmp 0x180020c5f
shl eax, 8
movzx edx, dil
or edx, eax
cmp bpl, 0xd
jne 0x180020dce
mov al, byte [rsp + 0x2a]
mov byte [rsp + 0x26], al
movzx eax, word [rsp + 0x28]
mov word [rsp + 0x24], ax
xor ecx, ecx
mov bpl, 6
jmp 0x180020e04
mov al, byte [rsp + 0x2e]
mov byte [rsp + 0x26], al
movzx eax, word [rsp + 0x2c]
mov word [rsp + 0x24], ax
movaps xmm0, xmmword [rsp + 0x70]
movaps xmm1, xmmword [rsp + 0x80]
movaps xmmword [rsp + 0x30], xmm0
movaps xmmword [rsp + 0x40], xmm1
movups xmm0, xmmword [rsp + 0x8c]
movups xmmword [rsp + 0x4c], xmm0
mov al, byte [rsp + 0x26]
mov byte [rsi + 0xb], al
movzx eax, word [rsp + 0x24]
mov word [rsi + 9], ax
movaps xmm0, xmmword [rsp + 0x30]
movaps xmm1, xmmword [rsp + 0x40]
movups xmmword [rsi + 0xc], xmm0
movups xmmword [rsi + 0x1c], xmm1
movups xmm0, xmmword [rsp + 0x4c]
movups xmmword [rsi + 0x28], xmm0
mov dword [rsi], ecx
mov dword [rsi + 4], edx
mov byte [rsi + 8], bpl
add rsp, 0xb0
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov eax, edi
shr eax, 8
xor ecx, ecx
mov bpl, 0xc
jmp 0x180020da6