Function at 0x180031550
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0xb0
mov rax, qword [0x180280040]
xor rax, rsp
mov qword [rbp + 0x17], rax
mov rsi, qword [rcx + 8]
mov rbx, rdx
mov r14, qword [rcx]
mov qword [rbp + 7], rdx
mov rax, r14
cmp rsi, 4
jb 0x1800315c1
lea rdi, [rsi - 3]
add rdi, rax
cmp rax, rdi
jae 0x1800315c1
nop dword [rax]
nop dword [rax + rax]
mov r8, rax
lea rcx, [rbp + 7]
mov rdx, rax
call fcn.1800416f0
test rax, rax
je 0x180031829
cmp rax, rdi
jb 0x1800315a0
mov rbx, qword [rbp + 7]
sub rsi, rax
add rsi, r14
je 0x180031829
xor ecx, ecx
mov qword [rsp + 0xf0], r12
mov dword [rbp + 0xf], ecx
mov r8, rsi
mov word [rbp + 0x13], cx
mov rdx, rax
mov byte [rbp + 0x15], cl
lea rcx, [rbp + 0xf]
mov qword [rsp + 0xa8], r13
mov qword [rsp + 0xa0], r15
call sub.VCRUNTIME140.dll_memcpy
lea r11, [rbp + 0xf]
xor r14d, r14d
mov r15d, 0x80
lea r12, [0x18020b3c8]
mov r13d, 0x100
nop word [rax + rax]
movzx ecx, byte [r11]
movzx edx, byte [r11 + 3]
mov eax, ecx
movdqa xmm0, xmmword [0x18020d2c0]
movzx r8d, byte [r11 + 1]
movzx edi, byte [r11 + 2]
movdqa xmm1, xmmword [0x18020d2a0]
shr rax, 3
movdqu xmmword [rbp - 0x41], xmm0
mov dword [rbp - 0x31], 7
movdqa xmm0, xmmword [0x18020d2b0]
movsx r9, byte [rax + r12]
movdqu xmmword [rbp - 0x29], xmm0
mov dword [rbp - 0x19], r14d
mov qword [rbp - 0x59], 0x400000
mov eax, dword [rbp + r9*4 - 0x41]
and eax, ecx
mov dword [rbp - 0x51], r15d
shl eax, 6
mov ecx, r8d
and ecx, 0x3f
mov dword [rbp - 0x4d], 0x800
or eax, ecx
mov dword [rbp - 0x49], 0x10000
mov ecx, edi
shl eax, 6
and edi, 0xc0
mov dword [rbp - 1], r14d
and ecx, 0x3f
and r8d, 0xc0
or eax, ecx
mov ecx, edx
shr edx, 2
and ecx, 0x3f
or edi, edx
shl eax, 6
shr edi, 2
or eax, ecx
mov ecx, dword [rbp + r9*4 - 0x29]
or edi, r8d
shr eax, cl
mov r8d, r14d
shr edi, 2
mov edx, eax
cmp eax, dword [rbp + r9*4 - 0x59]
movdqu xmmword [rbp - 0x11], xmm1
sbb ecx, ecx
and edx, 0xfffff800
and ecx, 0x40
or edi, ecx
mov ecx, dword [rbp + r9*4 - 0x11]
cmp edx, 0xd800
mov edx, r14d
cmove r8d, r15d
or edi, r8d
cmp eax, 0x10ffff
cmova edx, r13d
or edi, edx
mov rdx, r14
xor edi, 0x2a
sar edi, cl
mov ecx, 0xffffffff
test r9b, r9b
sete dl
add rdx, r9
test edi, edi
cmovne eax, ecx
cmp eax, 0x1100
jb 0x1800317e6
lea ecx, [rax - 0x1160]
cmp ecx, 0x11c8
jbe 0x18003174c
cmp eax, 0x232b
jb 0x1800317df
lea ecx, [rax - 0x2e80]
cmp ecx, 0x764f
ja 0x180031761
cmp eax, 0x303f
jne 0x1800317df
lea ecx, [rax - 0xac00]
cmp ecx, 0x2ba3
jbe 0x1800317df
lea ecx, [rax - 0xf900]
cmp ecx, 0x1ff
jbe 0x1800317df
lea ecx, [rax - 0xfe10]
cmp ecx, 9
jbe 0x1800317df
lea ecx, [rax - 0xfe30]
cmp ecx, 0x3f
jbe 0x1800317df
lea ecx, [rax - 0xff00]
cmp ecx, 0x60
jbe 0x1800317df
lea ecx, [rax - 0xffe0]
cmp ecx, 6
jbe 0x1800317df
lea ecx, [rax - 0x20000]
cmp ecx, 0xfffd
jbe 0x1800317df
lea ecx, [rax - 0x30000]
cmp ecx, 0xfffd
jbe 0x1800317df
lea ecx, [rax - 0x1f300]
cmp ecx, 0x34f
jbe 0x1800317df
add eax, 0xfffe0700
cmp eax, 0xff
ja 0x1800317e6
mov eax, 2
jmp 0x1800317eb
mov eax, 1
add qword [rbx], rax
mov eax, 1
test edi, edi
cmove rax, rdx
add rax, r11
mov r11, rax
je 0x180031811
lea rcx, [rbp + 0xf]
sub rax, rcx
cmp rax, rsi
jl 0x180031620
mov r13, qword [rsp + 0xa8]
mov r12, qword [rsp + 0xf0]
mov r15, qword [rsp + 0xa0]
mov rcx, qword [rbp + 0x17]
xor rcx, rsp
call fcn.1801e4790
add rsp, 0xb0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret