Function at 0x14002f244
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x38
mov r9d, dword [rcx + 0x24]
mov rbx, rcx
mov r10d, dword [rcx + 0x2c]
mov r12d, r9d
mov r8d, dword [rcx + 0x54]
and r12d, 0x7fff
mov r11d, dword [rcx + 0x50]
xor edi, edi
mov esi, dword [rcx + 0x28]
mov r13, qword [rcx + 0x30]
mov r15, qword [rcx + 0x38]
lea r14d, [rdi + 1]
mov dword [rsp + 0x88], r9d
mov dword [rsp + 0x90], r10d
mov dword [rsp + 0x80], r8d
mov dword [rsp + 0x98], r11d
mov dword [rsp + 0x20], r12d
mov dword [rsp + 0x24], 8
mov rcx, qword [rbx + 0xb8]
test rcx, rcx
jne 0x14002f2d0
cmp dword [rbx + 0xa8], edi
je 0x14002f7b8
test esi, esi
je 0x14002f7b8
mov ebp, 0x1000
lea r14d, [rsi + r9]
and r14d, 0x7fff
sub ebp, esi
cmp rcx, rbp
jae 0x14002f2ed
mov ebp, dword [rbx + 0xb8]
mov eax, ebp
add esi, ebp
sub rcx, rax
mov qword [rbx + 0xb8], rcx
test ebp, ebp
je 0x14002f3a2
mov rdx, qword [rbx + 0xb0]
mov eax, 0x8000
sub eax, r14d
mov ecx, r14d
cmp eax, ebp
mov r12d, ebp
cmovb r12d, eax
add rcx, 0xc8
add rcx, rbx
mov r8d, r12d
call sub.VCRUNTIME140.dll_memcpy
cmp r14d, 0x101
jae 0x14002f364
mov rdx, qword [rbx + 0xb0]
mov eax, 0x101
sub eax, r14d
mov ecx, r14d
cmp r12d, eax
cmovb eax, r12d
add rcx, 0x80c8
add rcx, rbx
mov r8d, eax
call sub.VCRUNTIME140.dll_memcpy
add r14d, r12d
mov eax, r12d
add qword [rbx + 0xb0], rax
and r14d, 0x7fff
sub ebp, r12d
jne 0x14002f303
mov r10d, dword [rsp + 0x90]
mov r11d, dword [rsp + 0x98]
mov r9d, dword [rsp + 0x88]
mov r8d, dword [rsp + 0x80]
mov r12d, dword [rsp + 0x20]
mov eax, 0x8000
sub eax, esi
cmp eax, r10d
cmovb r10d, eax
mov dword [rsp + 0x90], r10d
cmp dword [rbx + 0xa8], edi
jne 0x14002f3cc
cmp esi, 0x1000
jb 0x14002f7b2
lea rbp, [rbx + 0x192a2]
mov r14d, 1
cmp esi, 4
jb 0x14002f6ae
mov r8d, r14d
mov r14d, r12d
add r14, 0xc8
add r14, rbx
mov qword [rsp + 0x90], r14
mov ebp, dword [r14]
and ebp, 0xffffff
mov eax, ebp
mov ecx, ebp
shr rcx, 0x11
xor rcx, rax
movzx eax, r9w
and ecx, 0xfff
movzx edx, word [rbx + rcx*2 + 0x292aa]
sub ax, dx
mov word [rbx + rcx*2 + 0x292aa], r9w
movzx r12d, ax
cmp r12d, r10d
ja 0x14002f5a6
and edx, 0x7fff
lea r9, [rbx + 0xc8]
add r9, rdx
mov eax, dword [r9]
and eax, 0xffffff
cmp eax, ebp
jne 0x14002f59e
mov r8, r14
mov r14d, SafeArrayAllocDescriptor
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x14002f4b0
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x14002f4b0
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x14002f4b0
add r9, 2
add r8, 2
movzx eax, word [r9]
cmp word [r8], ax
jne 0x14002f4b0
add r14d, 0xffffffff
jne 0x14002f462
mov al, byte [r9]
mov ecx, edi
mov rdx, r8
sub rdx, qword [rsp + 0x90]
sar rdx, 1
cmp byte [r8], al
sete cl
lea eax, [rcx + rdx*2]
test r14d, r14d
jne 0x14002f4dd
mov eax, r12d
neg eax
sbb eax, eax
and eax, 0x102
mov r9d, 3
cmp eax, r9d
jb 0x14002f574
jne 0x14002f4f7
cmp r12d, 0x2000
jae 0x14002f574
cmp eax, esi
lea rbp, [0x140000000]
mov r14d, 1
mov r8d, esi
cmovb r8d, eax
dec r12d
mov dword [r13 + 1], r12d
mov al, r8b
sub al, r9b
mov edx, r12d
mov byte [r13], al
mov al, byte [r15]
shr al, 1
or al, 0x80
shr rdx, 8
mov byte [r15], al
mov eax, r12d
and eax, 0x1ff
cmp r12d, 0x200
movzx ecx, byte [rax + rbp + 0x4f3b0]
movzx eax, byte [rdx + rbp + 0x4f7b0]
cmovb eax, ecx
add word [rbx + rax*2 + 0x840a], r14w
lea eax, [r8 - 3]
movzx eax, word [rbp + rax*2 + 0x4f0b0]
add word [rbx + rax*2 + 0x81ca], r14w
mov rax, r9
jmp 0x14002f594
movzx eax, bpl
mov r14d, 1
mov byte [r13], al
mov r8d, r14d
shr byte [r15], 1
add word [rbx + rax*2 + 0x81ca], r14w
mov eax, r14d
mov r9d, dword [rsp + 0x88]
jmp 0x14002f5c3
mov r9d, dword [rsp + 0x88]
movzx eax, bpl
mov r14d, 1
mov byte [r13], al
shr byte [r15], 1
add word [rbx + rax*2 + 0x81ca], r14w
mov eax, r14d
mov r12d, dword [rsp + 0x20]
lea rdx, [rax + r13]
add r11d, 0xffffffff
lea r13, [rdx + 1]
mov ecx, r11d
lea rbp, [rbx + 0x192a2]
mov eax, 8
cmove r11d, eax
test ecx, ecx
mov ecx, dword [rsp + 0x80]
mov rax, rdx
cmovne rax, r15
mov dword [rsp + 0x98], r11d
cmovne r13, rdx
mov r15, rax
lea eax, [r8 + r10]
add ecx, r8d
add r9d, r8d
mov dword [rsp + 0x80], ecx
mov r10d, 0x8000
mov dword [rsp + 0x88], r9d
cmp eax, r10d
cmovb r10d, eax
add r12d, r8d
and r12d, 0x7fff
mov dword [rsp + 0x90], r10d
sub esi, r8d
mov dword [rsp + 0x20], r12d
cmp r13, rbp
jbe 0x14002f3d9
mov dword [rbx + 0x54], ecx
xor edx, edx
mov rcx, rbx
mov dword [rbx + 0x24], r9d
mov dword [rbx + 0x28], esi
mov dword [rbx + 0x2c], r10d
mov qword [rbx + 0x30], r13
mov qword [rbx + 0x38], r15
mov dword [rbx + 0x50], r11d
call fcn.140030450
test eax, eax
jne 0x14002f7d8
mov eax, dword [rbx + 0x54]
mov r11d, dword [rbx + 0x50]
mov r13, qword [rbx + 0x30]
mov r15, qword [rbx + 0x38]
mov r10d, dword [rsp + 0x90]
mov r9d, dword [rsp + 0x88]
mov dword [rsp + 0x80], eax
mov dword [rsp + 0x98], r11d
jmp 0x14002f3d9
mov r8d, dword [rsp + 0x80]
test esi, esi
je 0x14002f2b0
add r8d, r14d
mov eax, r12d
lea rcx, [r13 + 1]
mov dword [rsp + 0x80], r8d
movzx edx, byte [rax + rbx + 0xc8]
mov byte [r13], dl
shr byte [r15], 1
add r11d, 0xffffffff
mov eax, r11d
cmove r11d, dword [rsp + 0x24]
test eax, eax
mov dword [rsp + 0x98], r11d
cmovne rcx, r15
neg eax
mov r15, rcx
sbb rax, rax
add word [rbx + rdx*2 + 0x81ca], r14w
add rax, 2
add r9d, r14d
add r13, rax
mov dword [rsp + 0x88], r9d
lea eax, [r10 + 1]
mov r10d, 0x8000
cmp eax, r10d
inc r12d
cmovb r10d, eax
and r12d, 0x7fff
dec esi
mov dword [rsp + 0x90], r10d
mov dword [rsp + 0x20], r12d
cmp r13, rbp
jbe 0x14002f7a5
mov qword [rbx + 0x38], rcx
xor edx, edx
mov rcx, rbx
mov dword [rbx + 0x24], r9d
mov dword [rbx + 0x28], esi
mov dword [rbx + 0x2c], r10d
mov dword [rbx + 0x54], r8d
mov qword [rbx + 0x30], r13
mov dword [rbx + 0x50], r11d
call fcn.140030450
test eax, eax
jne 0x14002f7d8
mov r8d, dword [rbx + 0x54]
mov r11d, dword [rbx + 0x50]
mov r13, qword [rbx + 0x30]
mov r15, qword [rbx + 0x38]
mov r10d, dword [rsp + 0x90]
mov r9d, dword [rsp + 0x88]
mov dword [rsp + 0x80], r8d
mov dword [rsp + 0x98], r11d
test esi, esi
jne 0x14002f6be
jmp 0x14002f2b0
mov r14d, 1
mov dword [rbx + 0x24], r9d
mov eax, r14d
mov dword [rbx + 0x28], esi
mov dword [rbx + 0x2c], r10d
mov dword [rbx + 0x54], r8d
mov qword [rbx + 0x30], r13
mov qword [rbx + 0x38], r15
mov dword [rbx + 0x50], r11d
jmp 0x14002f7de
setns dil
mov eax, edi
add rsp, 0x38
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret