Function at 0x140022ee0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x48
lea rbp, [rsp + 0x40]
mov r13, rdx
mov rax, qword [0x1403486d0]
xor rax, rbp
mov qword [rbp], rax
mov rdi, qword [rcx]
mov qword [rdx], rdi
mov r15, qword [rcx + 8]
mov qword [rdx + 8], r15
mov rsi, qword [rdi + 0x10]
mov qword [rdx + 0x10], r8
lea rbx, [r15 + rsi*2]
add rbx, 0xffffffffffffffff
mov rax, rbx
xor edx, edx
div rsi
sub rbx, rdx
add rbx, r8
mov qword [r13 + 0x18], rbx
add rbx, rsi
mov qword [r13 + 0x30], rbx
add rbx, rsi
mov qword [r13 + 0x20], rbx
add rbx, qword [rdi]
mov qword [r13 + 0x28], rbx
mov eax, dword [rcx + 0x10]
mov dword [r13 + 0x48], eax
mov eax, dword [rcx + 0x14]
mov dword [r13 + 0x4c], eax
mov rbx, qword [rdi + 0x10]
cmp r15, 0x20
ja 0x140023149
cmp rbx, 0x10
jne 0x140023149
mov r14, r9
mov rsi, qword [rbp + 0x90]
mov rdi, qword [rbp + 0x70]
test eax, eax
je 0x140022fa6
lea rax, [rdi - 0x10]
mov ebx, reloc.OLEAUT32.dll_SafeArrayGetDim
cmp rax, 0xfff0
ja 0x140023149
cmp rsi, 0x10001
jb 0x140022fc1
jmp 0x140023149
lea rax, [r15 + 0x10]
mov ebx, reloc.OLEAUT32.dll_SafeArrayGetDim
cmp rax, rsi
jb 0x140023149
cmp rax, rdi
jne 0x140023149
mov rdx, rsp
mov r8, qword [rbp + 0x88]
lea rax, [r15 + 0xf]
and rax, 0xfffffffffffffff0
call fcn.1400e6f00
sub rsp, rax
mov qword [rbp - 0x40], rsp
mov rax, qword [r13]
mov rcx, qword [r13 + 8]
mov rax, qword [rax + 0x10]
lea rbx, [rax + rcx]
add rax, rcx
add rax, 0xf
and rax, 0xfffffffffffffff0
call fcn.1400e6f00
sub rsp, rax
mov r12, rsp
cmp dword [r13 + 0x4c], 0
mov qword [rbp - 0x38], rdx
je 0x1400231e4
sub rsp, 0x20
mov rcx, r13
mov rsi, r8
call fcn.140023540
add rsp, 0x20
mov qword [rbp - 0x30], r14
mov dword [rbp - 0xc], edi
mov rcx, qword [rbp + 0x78]
mov qword [rbp - 0x28], rcx
mov rcx, qword [rbp + 0x80]
mov dword [rbp - 8], ecx
mov r9d, 2
test rsi, rsi
je 0x140023064
mov rcx, qword [rbp + 0x90]
test rcx, rcx
je 0x140023064
mov qword [rbp - 0x20], rsi
mov dword [rbp - 4], ecx
mov r9d, 3
sub rsp, 0x30
mov qword [rsp + 0x28], rbx
mov qword [rsp + 0x20], r12
lea rdx, [rbp - 0x30]
lea r8, [rbp - 0xc]
mov rcx, r13
call fcn.140023ac0
add rsp, 0x30
mov rcx, rbx
test eax, eax
je 0x140023339
mov ebx, eax
sub rsp, 0x20
mov rdx, r12
call fcn.140016010
add rsp, 0x20
mov rax, qword [r13]
mov rcx, qword [r13 + 8]
mov rdi, qword [rax + 0x10]
mov r8, qword [r13 + 0x10]
lea rcx, [rcx + rdi*2]
add rcx, 0xffffffffffffffff
mov rax, rcx
xor edx, edx
div rdi
sub rcx, rdx
sub rsp, 0x20
mov rdx, r8
call fcn.140016010
add rsp, 0x20
mov rdx, qword [r13 + 0x18]
sub rsp, 0x20
mov rcx, rdi
call fcn.140016010
add rsp, 0x20
mov rdx, qword [r13 + 0x30]
sub rsp, 0x20
mov rcx, rdi
call fcn.140016010
add rsp, 0x20
mov rax, qword [r13]
mov rdx, qword [r13 + 0x20]
mov rcx, qword [rax]
sub rsp, 0x20
call fcn.140016010
add rsp, 0x20
mov rax, qword [r13]
mov rdx, qword [r13 + 0x28]
mov rcx, qword [rax]
sub rsp, 0x20
call fcn.140016010
mov ecx, 0x50
mov rdx, r13
call fcn.140016010
add rsp, 0x20
mov eax, 0xffffffff
mov qword [r13 + 0x40], rax
jmp 0x140023512
add r15, 0xffffffffffffffff
lea rcx, [r15 + rbx*2]
mov rax, rcx
xor edx, edx
div rbx
sub rcx, rdx
sub rsp, 0x20
mov rdx, r8
call fcn.140016010
add rsp, 0x20
mov rdx, qword [r13 + 0x18]
sub rsp, 0x20
mov rcx, rbx
call fcn.140016010
add rsp, 0x20
mov rdx, qword [r13 + 0x30]
sub rsp, 0x20
mov rcx, rbx
call fcn.140016010
add rsp, 0x20
mov rax, qword [r13]
mov rdx, qword [r13 + 0x20]
mov rcx, qword [rax]
sub rsp, 0x20
call fcn.140016010
add rsp, 0x20
mov rax, qword [r13]
mov rdx, qword [r13 + 0x28]
mov rcx, qword [rax]
sub rsp, 0x20
call fcn.140016010
mov ecx, 0x50
mov rdx, r13
call fcn.140016010
add rsp, 0x20
mov eax, 0xffffffff
mov qword [r13 + 0x40], rax
mov ebx, 0xffffffc1
jmp 0x140023519
sub rsp, 0x20
mov rcx, rbx
mov rdx, r12
mov rdi, r8
call fcn.140016010
add rsp, 0x20
test rdi, rdi
je 0x14002321a
mov r8, rsi
test rsi, rsi
je 0x14002321a
mov rdx, rdi
sub rsp, 0x20
mov rcx, r12
call sub.VCRUNTIME140.dll_memcpy
add rsp, 0x20
mov rax, qword [r13]
mov rcx, qword [r13 + 8]
mov rdx, qword [rax + 0x10]
mov rax, rdx
add rax, rcx
je 0x1400233d1
cmp rax, 0x10
jb 0x1400233c0
mov rsi, rbx
mov r8, rax
and r8, 0xfffffffffffffff0
lea rbx, [r8 - 0x10]
mov r10, rbx
shr r10, 4
add r10, 1
mov r9d, r10d
and r9d, 1
test rbx, rbx
je 0x140023341
add rdx, rcx
lea rcx, [r14 + rdx]
add rcx, 0xfffffffffffffff8
lea rbx, [r12 + rdx]
add rbx, 0xfffffffffffffff8
mov rdi, r9
sub rdi, r10
mov rdx, 0xfffffffffffffff8
movdqa xmm0, xmmword [0x1402ed530]
nop dword [rax]
movq xmm1, qword [rbx + rdx + 8]
punpcklbw xmm1, xmm0
movq xmm2, qword [rbx + rdx]
punpcklbw xmm2, xmm0
movq xmm3, qword [rcx + rdx + 8]
punpcklbw xmm3, xmm0
pxor xmm3, xmm1
movq xmm1, qword [rcx + rdx]
punpcklbw xmm1, xmm0
pxor xmm1, xmm2
pand xmm3, xmm0
packuswb xmm3, xmm3
movq qword [rbx + rdx + 8], xmm3
pand xmm1, xmm0
packuswb xmm1, xmm1
movq qword [rbx + rdx], xmm1
movq xmm1, qword [rbx + rdx - 8]
punpcklbw xmm1, xmm0
movq xmm2, qword [rbx + rdx - 0x10]
punpcklbw xmm2, xmm0
movq xmm3, qword [rcx + rdx - 8]
punpcklbw xmm3, xmm0
pxor xmm3, xmm1
movq xmm1, qword [rcx + rdx - 0x10]
punpcklbw xmm1, xmm0
pxor xmm1, xmm2
pand xmm3, xmm0
packuswb xmm3, xmm3
movq qword [rbx + rdx - 8], xmm3
pand xmm1, xmm0
packuswb xmm1, xmm1
movq qword [rbx + rdx - 0x10], xmm1
add rdx, 0xffffffffffffffe0
add rdi, 2
jne 0x140023290
add rdx, 7
jmp 0x140023348
mov rbx, rcx
jmp 0x1400233d1
mov rdx, 0xffffffffffffffff
test r9, r9
mov rbx, rsi
je 0x1400233ad
add rdx, rax
movq xmm0, qword [r12 + rdx - 7]
punpcklbw xmm0, xmm0
movq xmm1, qword [r12 + rdx - 0xf]
punpcklbw xmm1, xmm0
movq xmm2, qword [r14 + rdx - 7]
punpcklbw xmm2, xmm0
pxor xmm2, xmm0
movq xmm0, qword [r14 + rdx - 0xf]
punpcklbw xmm0, xmm0
pxor xmm0, xmm1
movdqa xmm1, xmmword [0x1402ed530]
pand xmm2, xmm1
packuswb xmm2, xmm2
movq qword [r12 + rdx - 7], xmm2
pand xmm0, xmm1
packuswb xmm0, xmm0
movq qword [r12 + rdx - 0xf], xmm0
cmp rax, r8
je 0x1400233d1
sub rax, r8
nop word cs:[rax + rax]
nop
movzx ecx, byte [r14 + rax - 1]
xor byte [r12 + rax - 1], cl
add rax, 0xffffffffffffffff
jne 0x1400233c0
sub rsp, 0x20
mov rcx, r15
mov rsi, qword [rbp - 0x40]
mov rdx, rsi
call fcn.140016010
add rsp, 0x20
mov rax, qword [r13]
mov rdx, qword [r13 + 0x18]
mov rcx, qword [rax + 0x10]
sub rsp, 0x20
call fcn.140016010
add rsp, 0x20
mov rax, qword [r13]
mov rcx, qword [r13 + 0x18]
mov rax, qword [rax + 0x10]
mov byte [rax + rcx - 1], 1
mov rcx, qword [r13]
mov rax, qword [r13 + 0x18]
mov rdx, qword [r13 + 0x20]
sub rsp, 0x30
mov qword [rsp + 0x20], rax
mov r8, r15
mov r9, rsi
call qword [rcx + 0x18]
add rsp, 0x10
mov rcx, r13
mov rdx, r12
call fcn.140024160
add rsp, 0x20
mov edi, eax
sub rsp, 0x20
mov rcx, rbx
mov rdx, r12
call fcn.140016010
add rsp, 0x20
test edi, edi
je 0x140023508
mov rax, qword [r13]
mov rcx, qword [r13 + 8]
mov rdi, qword [rax + 0x10]
mov rbx, qword [r13 + 0x10]
lea rcx, [rcx + rdi*2]
add rcx, 0xffffffffffffffff
mov rax, rcx
xor edx, edx
div rdi
sub rcx, rdx
sub rsp, 0x20
mov rdx, rbx
call fcn.140016010
add rsp, 0x20
mov rdx, qword [r13 + 0x18]
sub rsp, 0x20
mov rcx, rdi
call fcn.140016010
add rsp, 0x20
mov rdx, qword [r13 + 0x30]
sub rsp, 0x20
mov rcx, rdi
call fcn.140016010
add rsp, 0x20
mov rax, qword [r13]
mov rdx, qword [r13 + 0x20]
mov rcx, qword [rax]
sub rsp, 0x20
call fcn.140016010
add rsp, 0x20
mov rax, qword [r13]
mov rdx, qword [r13 + 0x28]
mov rcx, qword [rax]
sub rsp, 0x20
call fcn.140016010
mov ecx, 0x50
mov rdx, r13
call fcn.140016010
add rsp, 0x20
mov eax, 0xffffffff
mov qword [r13 + 0x40], rax
mov ebx, 0xffffffc1
jmp 0x140023512
mov qword [r13 + 0x40], 1
xor ebx, ebx
mov rax, qword [rbp - 0x38]
mov rsp, rax
mov rcx, qword [rbp]
xor rcx, rbp
sub rsp, 0x20
call fcn.1400e6b50
add rsp, 0x20
mov eax, ebx
lea rsp, [rbp + 8]
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret