Function at 0x18008e8c0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov r8, rdx
mov rsi, rcx
mov rcx, qword [rcx + 0x30]
mov rdx, qword [rsi + 0x38]
mov qword [rsp + 0x20], r8
call fcn.18008a1a0
mov rcx, qword [rsi + 0x10]
mov qword [rsp + 0x28], rsi
mov rdx, qword [rsi + 0x18]
mov r8, rax
shr r8, 0x39
movd xmm0, r8d
punpcklbw xmm0, xmm0
pshuflw xmm0, xmm0, 0
pshufd xmm0, xmm0, 0
lea r8, [rcx - 0x30]
mov qword [rsp + 0x80], r8
xor r8d, r8d
mov qword [rsp + 0x38], r8
pcmpeqd xmm1, xmm1
mov qword [rsp + 0x30], rcx
and rax, rdx
movdqu xmm2, xmmword [rcx + rax]
movdqa xmm3, xmm0
pcmpeqb xmm3, xmm2
pmovmskb r8d, xmm3
test r8d, r8d
je 0x18008eb10
mov rcx, qword [rsp + 0x20]
movzx r9d, byte [rcx]
mov qword [rsp + 0x78], r9
jmp 0x18008e985
test r10b, r10b
je 0x18008ec88
lea r8d, [rbx - 1]
and r8d, ebx
test r8w, r8w
mov rdx, rax
mov rax, r11
mov r9, qword [rsp + 0x78]
je 0x18008eb10
mov ebx, r8d
tzcnt r14d, ebx
mov r11, rax
add r14, rax
mov rax, rdx
and r14, rdx
mov r8, r14
neg r8
lea r8, [r8 + r8*2]
shl r8, 4
mov rcx, qword [rsp + 0x80]
lea r15, [rcx + r8]
cmp r9d, 1
je 0x18008ea50
cmp r9d, 2
jne 0x18008ec88
movzx r10d, byte [r15]
cmp r10b, 2
jne 0x18008e960
mov rcx, qword [rsp + 0x20]
mov rdi, qword [rcx + 8]
mov r10, qword [rdi + 0x10]
mov r12, qword [r15 + 8]
cmp r10, qword [r12 + 0x10]
jne 0x18008e969
mov r13, qword [rdi + 8]
mov rbp, qword [r12 + 8]
mov r12, r10
neg r12
mov rdi, 0xffffffffffffffff
nop
lea rcx, [r12 + rdi]
cmp rcx, 0xffffffffffffffff
je 0x18008ea90
movzx ecx, byte [r13 + rdi + 1]
movzx esi, byte [rbp + rdi + 1]
lea r9d, [rcx - 0x41]
cmp r9b, 0x1a
setb r9b
shl r9b, 5
lea edx, [rsi - 0x41]
cmp dl, 0x1a
setb dl
shl dl, 5
or r9b, cl
or dl, sil
inc rdi
cmp r9b, dl
je 0x18008ea00
cmp rdi, r10
jb 0x18008e969
jmp 0x18008ea90
movzx r10d, byte [r15]
cmp r10b, 1
jne 0x18008e960
mov rcx, qword [rsp + 0x20]
cmp byte [rcx + 1], 0
movzx r10d, byte [r15 + 1]
je 0x18008ea78
test r10b, r10b
jne 0x18008ea90
jmp 0x18008e969
test r10b, r10b
jne 0x18008e969
nop word cs:[rax + rax]
mov rcx, qword [rsp + 0x20]
mov r12, qword [rcx + 0x20]
cmp r12, qword [r15 + 0x20]
jne 0x18008e969
mov rcx, qword [rsp + 0x20]
mov r13, qword [rcx + 0x18]
mov r15, qword [r15 + 0x18]
mov r10, r12
neg r10
mov rdi, 0xffffffffffffffff
nop dword [rax]
lea rcx, [r10 + rdi]
cmp rcx, 0xffffffffffffffff
je 0x18008eb41
movzx ecx, byte [r13 + rdi + 1]
movzx edx, byte [r15 + rdi + 1]
lea r9d, [rcx - 0x41]
cmp r9b, 0x1a
setb r9b
shl r9b, 5
lea esi, [rdx - 0x41]
cmp sil, 0x1a
setb sil
shl sil, 5
or r9b, cl
or sil, dl
inc rdi
cmp r9b, sil
je 0x18008eac0
cmp rdi, r12
jb 0x18008e969
jmp 0x18008eb41
pcmpeqb xmm2, xmm1
pmovmskb r8d, xmm2
test r8d, r8d
jne 0x18008ec49
mov rcx, qword [rsp + 0x38]
add rax, rcx
add rax, 0x10
add rcx, 0x10
mov qword [rsp + 0x38], rcx
mov rcx, qword [rsp + 0x30]
jmp 0x18008e92f
shl r14, 4
lea rcx, [r14 + r14*2]
sar rcx, 4
movabs rsi, 0xaaaaaaaaaaaaaaab
imul rsi, rcx
lea r9, [rsi - 0x10]
and r9, rax
mov r11, qword [rsp + 0x30]
movdqu xmm0, xmmword [r11 + r9]
pcmpeqd xmm1, xmm1
pcmpeqb xmm0, xmm1
psllw xmm0, 7
pmovmskb r10d, xmm0
movdqu xmm0, xmmword [r11 + rsi]
pcmpeqb xmm0, xmm1
pmovmskb edx, xmm0
test r10d, r10d
je 0x18008eb9d
bsr r10w, r10w
xor r10d, 0xf
jmp 0x18008eba2
mov r10w, 0x10
add r8, r11
or edx, 0x10000
tzcnt ecx, edx
add r10d, ecx
mov dl, 0x80
cmp r10w, 0xf
ja 0x18008ebc6
mov rcx, qword [rsp + 0x28]
inc qword [rcx + 0x20]
mov dl, 0xff
mov byte [r11 + rsi], dl
mov byte [r9 + r11 + 0x10], dl
mov rax, qword [rsp + 0x28]
dec qword [rax + 0x28]
movdqu xmm0, xmmword [r8 - 0x30]
movdqu xmm1, xmmword [r8 - 0x20]
movdqu xmm2, xmmword [r8 - 0x10]
movdqa xmmword [rsp + 0x40], xmm0
movdqa xmmword [rsp + 0x60], xmm2
movdqa xmmword [rsp + 0x50], xmm1
movzx eax, byte [rsp + 0x40]
cmp al, 3
je 0x18008ec49
cmp al, 2
jb 0x18008ec32
mov rbx, qword [rsp + 0x48]
lea rcx, [rbx + 0x18]
mov rax, qword [rbx]
mov rdx, qword [rbx + 8]
mov r8, qword [rbx + 0x10]
call qword [rax + 0x10]
mov rcx, qword [0x1801fb9b8]
xor edx, edx
mov r8, rbx
call qword [sym.imp.kernel32.dll_HeapFree]
lea rcx, [rsp + 0x68]
mov rax, qword [rsp + 0x50]
mov rdx, qword [rsp + 0x58]
mov r8, qword [rsp + 0x60]
call qword [rax + 0x10]
mov rdx, qword [rsp + 0x28]
add rdx, 0x70
lea rcx, [rsp + 0x40]
mov r8, qword [rsp + 0x20]
call fcn.180089db0
cmp qword [rsp + 0x40], 0
je 0x18008ec73
lea rcx, [rsp + 0x40]
call fcn.1800829e0
nop
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2