Function at 0x140021744
Capabilities:
Encode data using xor

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rsi
push rdi
push r14
sub rsp, 0xa0
mov qword [rsp + 0x20], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov r14, rdx
mov rsi, rcx
mov ebx, dword [0x1401a8d80]
lea r8d, [rbx + 2]
lea eax, [rbx + 1]
imul r8d, eax
imul r8d, ebx
mov eax, 0x2e8ba2e9
imul r8d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x16
sub r8d, edx
cmp r8d, 0x11
jne 0x1400217ae
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetFileType]
mov ebx, dword [0x1401a8d80]
mov edi, 0x70
mov r8d, edi
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.1400c2400
mov dword [rsp + 0x30], edi
lea rax, str.open
mov qword [rsp + 0x40], rax
lea ecx, [rbx + 1]
imul ecx, ebx
mov edi, 0x2aaaaaab
mov eax, edi
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
shl eax, 2
sub ecx, eax
cmp ecx, 1
jne 0x140021812
mov edx, 0xe2
lea r8d, [rdx + 1]
lea rcx, str._d__d_n
call fcn.1400bd8cc
mov ebx, dword [0x1401a8d80]
mov rax, qword [rsi]
mov ecx, 1
sub ecx, dword [rax - 8]
mov eax, dword [rax - 0xc]
or eax, ecx
jge 0x140021834
xor edx, edx
mov rcx, rsi
call fcn.1400021d0
mov ebx, dword [0x1401a8d80]
mov rax, qword [rsi]
mov qword [rsp + 0x48], rax
mov ecx, ebx
imul ecx, ebx
imul ecx, ebx
mov eax, edi
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
shl eax, 2
sub ecx, eax
cmp ecx, 6
jne 0x140021898
xor edx, edx
mov r8d, edx
mov r9d, 8
mov ecx, r8d
and ecx, 1
dec ecx
not ecx
and ecx, ebx
mov eax, r8d
sar eax, 1
mov r8d, ecx
xor r8d, eax
dec r9
jne 0x140021869
add ebx, r8d
inc edx
cmp edx, 0x100
jl 0x140021860
mov dword [0x1401a8d80], ebx
mov dword [rsp + 0x60], 5
mov dword [rsp + 0x34], 0x440
mov ecx, ebx
imul ecx, ebx
mov eax, 0x66666667
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
add eax, eax
sub ecx, eax
cmp ecx, 2
jne 0x140021912
movsd xmm3, qword [0x14013dd10]
xorps xmm2, xmm2
movd xmm4, ebx
cvtdq2pd xmm4, xmm4
addsd xmm2, xmm3
movaps xmm0, xmm2
mulsd xmm0, xmm2
comisd xmm0, xmm4
jbe 0x1400218fa
subsd xmm2, xmm3
divsd xmm3, qword [0x14013dd38]
movaps xmm1, xmm2
mulsd xmm1, xmm2
movaps xmm0, xmm4
subsd xmm0, xmm1
comisd xmm0, xmmword [0x14013dd08]
ja 0x1400218dd
mov rax, qword [r14]
mov ecx, 1
sub ecx, dword [rax - 8]
mov eax, dword [rax - 0xc]
or eax, ecx
jge 0x140021934
xor edx, edx
mov rcx, r14
call fcn.1400021d0
mov ebx, dword [0x1401a8d80]
mov rcx, qword [r14]
mov qword [rsp + 0x50], rcx
mov ecx, ebx
imul ecx, ebx
imul ecx, ebx
mov eax, edi
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*2]
shl eax, 2
sub ecx, eax
cmp ecx, 6
jne 0x140021995
mov ecx, 0x28
call fcn.1400bc638
mov rdi, rax
xor ebx, ebx
call fcn.1400bd978
add eax, dword [0x1401a8d80]
mov dword [rdi + rbx*4], eax
inc rbx
cmp rbx, 0xa
jl 0x14002196d
mov ecx, dword [rdi + 0x24]
mov dword [0x1401a8d80], ecx
mov rcx, rdi
call fcn.1400be0fc
cmp qword [0x1401aae38], 0
jne 0x140021a62
lea rcx, str.Shell32.dll
call qword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov rbx, rax
mov r9d, dword [0x1401a8d80]
lea r8d, [r9 + 1]
imul r8d, r9d
mov eax, 0x38e38e39
imul r8d
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add edx, ecx
lea eax, [rdx + rdx*8]
add eax, eax
sub r8d, eax
cmp r8d, 0xa
jne 0x1400219f0
call fcn.1400bd978
mov r9d, eax
mov dword [0x1401a8d80], eax
test rbx, rbx
je 0x140021a13
lea rdx, str.ShellExecuteExW
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov qword [0x1401aae38], rax
mov r9d, dword [0x1401a8d80]
lea ecx, [r9 + 2]
lea eax, [r9 + 1]
imul ecx, eax
imul ecx, r9d
mov eax, 0x30c30c31
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x15
sub ecx, edx
cmp ecx, 0xe
jne 0x140021a54
call fcn.1400bd978
mov ecx, dword [0x1401a8d80]
cmp ecx, eax
jne 0x140021a54
dec ecx
mov dword [0x1401a8d80], ecx
cmp qword [0x1401aae38], 0
jne 0x140021a62
xor bl, bl
jmp 0x140021a73
lea rcx, [rsp + 0x30]
call qword [0x1401aae38]
cmp eax, 1
sete bl
mov rdx, qword [rsi]
sub rdx, 0x18
or edi, 0xffffffff
mov eax, edi
lock xadd dword [rdx + 0x10], eax
add eax, edi
test eax, eax
jg 0x140021a94
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r14]
sub rdx, 0x18
mov ecx, edi
lock xadd dword [rdx + 0x10], ecx
add ecx, edi
test ecx, ecx
jg 0x140021ab2
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov al, bl
mov rbx, qword [rsp + 0xd0]
add rsp, 0xa0
pop r14
pop rdi
pop rsi
ret