Function at 0x1400bea90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push rsi
push rdi
push rbx
sub rsp, 0x30
mov rax, qword [0x14021b038]
xor rax, rsp
mov qword [rsp + 0x28], rax
mov r14, qword [rcx + 0x10]
test r14, r14
je 0x1400beded
mov rdi, rcx
lea rax, [rcx + 0x28]
cmp r14, rax
je 0x1400beaee
movsxd rcx, dword [rdi + 0x18]
add rcx, r14
add rcx, 0xfffffffffffffff0
mov qword [rdi + 8], rcx
mov qword [rdi + 0x10], rax
cmp qword [rdi + 0x48], 1
jne 0x1400beded
mov qword [rdi + 0x48], 2
jmp 0x1400beded
mov rax, qword [rdi + 8]
movups xmm0, xmmword [rax]
movups xmmword [r14], xmm0
cmp dword [rdi + 0x54], 0
jle 0x1400bed98
test r8d, r8d
js case.default.0x1400bebd3
cmp edx, 0xf
jg case.default.0x1400bebd3
lea rax, [rdi + 0x38]
movsxd rcx, edx
lea rdx, [rdi + rcx]
add rdx, 0x28
lea r9, [0x1400bee0c]
movzx ebx, byte [rdx]
test bl, bl
js 0x1400beb3a
inc rdx
mov rsi, rdx
jmp 0x1400beba6
movzx ecx, byte [rdx + 1]
mov esi, ecx
shl esi, 7
add ebx, esi
add ebx, 0xffffff80
lea rsi, [rdx + 2]
test cl, cl
jns 0x1400beba6
movzx ecx, byte [rsi]
mov esi, ecx
shl esi, 0xe
add ebx, esi
add ebx, 0xffffc000
mov esi, 2
test cl, cl
jns 0x1400beba0
movzx ecx, byte [rdx + 3]
mov esi, ecx
shl esi, 0x15
add ebx, esi
add ebx, 0xffe00000
mov esi, 3
test cl, cl
jns 0x1400beba0
movzx esi, byte [rdx + 4]
test sil, sil
js case.default.0x1400bebd3
shl esi, 0x1c
add ebx, esi
add ebx, 0xf0000000
mov esi, 4
add rsi, rdx
inc rsi
test rsi, rsi
je case.default.0x1400bebd3
cmp rsi, rax
ja case.default.0x1400bebd3
test ebx, ebx
je 0x1400bed98
and ebx, 7
cmp ebx, 5
ja case.default.0x1400bebd3
movsxd rcx, dword [r9 + rbx*4]
add rcx, r9
jmp rcx
cmp byte [rsi], 0
js 0x1400bec93
inc rsi
mov rbx, rsi
jmp 0x1400becfb
add rsi, 8
jmp 0x1400bed03
movzx ebx, byte [rsi]
lea rdx, [rsi + 1]
test bl, bl
jns 0x1400bec51
movzx ecx, byte [rdx]
mov edx, ecx
shl edx, 7
add ebx, edx
add ebx, 0xffffff80
mov edx, 1
test cl, cl
jns 0x1400bec4b
movzx ecx, byte [rsi + 2]
mov edx, ecx
shl edx, 0xe
add ebx, edx
add ebx, 0xffffc000
mov edx, 2
test cl, cl
jns 0x1400bec4b
movzx ecx, byte [rsi + 3]
mov edx, ecx
shl edx, 0x15
add ebx, edx
add ebx, 0xffe00000
mov edx, 3
test cl, cl
js 0x1400bed11
add rdx, rsi
inc rdx
test rdx, rdx
je case.default.0x1400bebd3
movsxd rbx, ebx
mov rcx, rax
sub rcx, rdx
cmp rcx, rbx
jl case.default.0x1400bebd3
add rdx, rbx
mov rsi, rdx
jmp 0x1400bed03
inc r8d
jmp 0x1400bed03
test r8d, r8d
jle 0x1400bed98
dec r8d
jmp 0x1400bed03
add rsi, 4
jmp 0x1400bed03
lea rbx, [rsi + 2]
cmp byte [rsi + 1], 0
jns 0x1400becfb
mov edx, 2
cmp byte [rbx], 0
jns 0x1400becf4
mov edx, 3
cmp byte [rsi + 3], 0
jns 0x1400becf4
mov edx, 4
cmp byte [rsi + 4], 0
jns 0x1400becf4
mov edx, 5
cmp byte [rsi + 5], 0
jns 0x1400becf4
mov edx, 6
cmp byte [rsi + 6], 0
jns 0x1400becf4
mov edx, 7
cmp byte [rsi + 7], 0
jns 0x1400becf4
mov edx, 8
cmp byte [rsi + 8], 0
jns 0x1400becf4
mov edx, 9
cmp byte [rsi + 9], 0
js case.default.0x1400bebd3
lea rbx, [rsi + rdx]
inc rbx
mov rsi, rbx
test rbx, rbx
je case.default.0x1400bebd3
mov rdx, rsi
cmp rsi, rax
jb 0x1400beb2b
jmp case.default.0x1400bebd3
movzx edx, byte [rsi + 4]
cmp edx, 7
ja case.default.0x1400bebd3
shl edx, 0x1c
add ebx, edx
add ebx, 0xf0000000
cmp ebx, 0x7fffffef
ja case.default.0x1400bebd3
add rsi, 5
mov rdx, rsi
jmp 0x1400bec51
movabs rax, 0xaaaaaaaaaaaaaaaa
lea r15, [rsp + 0x20]
mov qword [r15], rax
lea rsi, [rdi + 0x18]
mov rcx, qword [rdi + 0x20]
mov rax, qword [rcx]
mov rdx, r15
mov r8, rsi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
test al, al
je 0x1400bed91
mov ebx, dword [rdi + 0x18]
sub dword [rdi + 0x54], ebx
cmp ebx, 0x11
jge 0x1400bedc3
test ebx, ebx
jle 0x1400bed4f
lea rcx, [rdi + 0x38]
mov rdx, qword [rsp + 0x20]
mov r8, rbx
call fcn.140113df0
mov qword [rdi + 0x10], r14
lea rax, [rdi + rbx]
add rax, 0x28
jmp 0x1400bedd7
mov dword [rdi + 0x54], 0
cmp qword [rdi + 0x48], 2
jne 0x1400bedaa
mov rax, qword [rdi + 8]
sub rax, r14
mov qword [rdi + 0x48], rax
mov qword [rdi + 0x10], 0
lea rax, [rdi + 0x38]
mov qword [rdi + 8], rax
mov dword [rdi + 0x18], 0
jmp 0x1400beded
lea rax, [rdi + 0x38]
mov rcx, qword [rsp + 0x20]
movups xmm0, xmmword [rcx]
movups xmmword [rdi + 0x38], xmm0
mov qword [rdi + 0x10], rcx
mov qword [rdi + 8], rax
cmp qword [rdi + 0x48], 1
jbe 0x1400beded
add rdi, 0x48
mov qword [rdi], 1
mov rcx, qword [rsp + 0x28]
xor rcx, rsp
call fcn.140111870
mov rax, r14
add rsp, 0x30
pop rbx
pop rdi
pop rsi
pop r14
pop r15
ret