Function at 0x18018f4c0
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x10], 0xfffffffffffffffe
mov rsi, rcx
mov dword [rdx + 0x14], 6
mov qword [rbp - 0x30], rdx
mov r14, qword [rdx]
mov r15, qword [0x180277178]
movzx eax, byte [r15]
test al, al
jne 0x18018f5f5
mov edi, dword [0x18028e9b8]
test dil, 1
jne 0x18018f5f5
cmp edi, 0x100
jae 0x18018f53c
mov ecx, edi
or ecx, 0x20000000
mov eax, edi
lock cmpxchg dword [0x18028e9b8], ecx
jne 0x18018f53c
lea rbx, [0x18028e9b8]
jmp 0x18018f56e
lea rdx, [0x18028e9b8]
lea r9, [0x18028e9b0]
lea rcx, [rbp - 0x10]
lea r8, [rbp + 0xf]
call fcn.1801844d0
mov eax, dword [rbp - 0x10]
test eax, eax
je 0x18018f5bf
cmp eax, 2
je 0x18018f5f5
mov rbx, qword [rbp - 8]
mov edi, dword [rbp]
xor ecx, ecx
call sub.kernel32.dll_GetModuleHandleW
mov qword [0x18028e9b0], rax
mov eax, edi
or eax, 0x20000000
mov ecx, 1
lock cmpxchg dword [rbx], ecx
je 0x18018f5f5
and edi, 0xdfffffff
xor edi, 0x20000001
mov eax, dword [rbx]
nop dword [rax]
mov ecx, eax
xor ecx, edi
lock cmpxchg dword [rbx], ecx
jne 0x18018f5a0
cmp eax, 0x40000000
jb 0x18018f5f5
xor eax, edi
mov rcx, rbx
mov edx, eax
call fcn.18018eaa0
jmp 0x18018f5f5
mov rcx, qword [rbp - 8]
mov edx, 0xffffff00
lock xadd dword [rcx], edx
mov eax, edx
and eax, 0x3fffff00
cmp eax, 0x100
setne al
cmp edx, 0x40000000
setb r8b
or r8b, al
jne 0x18018f5f5
add edx, 0xffffff00
call fcn.18018eaa0
movzx eax, byte [r15]
test al, al
jne 0x18018f715
mov ecx, dword [0x18028e9e0]
test cl, 1
jne 0x18018f715
cmp ecx, 0x100
jae 0x18018f63e
mov edx, ecx
or edx, 0x20000000
mov eax, ecx
lock cmpxchg dword [0x18028e9e0], edx
jne 0x18018f63e
lea rax, [0x18028e9e0]
movd xmm0, ecx
pshufd xmm0, xmm0, 0x50
jmp 0x18018f672
lea rdx, [0x18028e9e0]
lea r9, [0x18028e9c8]
lea rcx, [rbp - 0x10]
lea r8, [rbp + 0xf]
call fcn.1801844d0
mov eax, dword [rbp - 0x10]
test eax, eax
je 0x18018f6df
cmp eax, 2
je 0x18018f715
mov rax, qword [rbp - 8]
movq xmm0, qword [rbp]
lea rcx, [0x18028e9c8]
mov qword [rbp - 0x58], rcx
mov qword [rbp - 0x50], rax
movq qword [rbp - 0x48], xmm0
lea rcx, [rbp - 0x10]
lea rdx, [rbp - 0x58]
call fcn.18018f8d0
mov r8d, dword [rbp]
mov rcx, qword [rbp - 8]
mov eax, r8d
or eax, 0x20000000
mov edx, dword [rbp + 4]
lock cmpxchg dword [rcx], edx
je 0x18018f715
xor edx, r8d
or edx, 0x20000000
mov eax, dword [rcx]
nop word [rax + rax]
mov r8d, eax
xor r8d, edx
lock cmpxchg dword [rcx], r8d
jne 0x18018f6c0
cmp eax, 0x40000000
jb 0x18018f715
xor eax, edx
mov edx, eax
call fcn.18018eaa0
jmp 0x18018f715
mov rcx, qword [rbp - 8]
mov edx, 0xffffff00
lock xadd dword [rcx], edx
mov eax, edx
and eax, 0x3fffff00
cmp eax, 0x100
setne al
cmp edx, 0x40000000
setb r8b
or r8b, al
jne 0x18018f715
add edx, 0xffffff00
call fcn.18018eaa0
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x28], rsi
mov rdx, qword [0x18028e9c8]
test rdx, rdx
je 0x18018f87a
mov rax, qword [0x18028e9d0]
mov qword [rbp - 0x18], rax
lea rdi, [0x1801a34a0]
mov r13d, 0xff
lea rax, [rdx + 0x168]
movzx ecx, word [rdx + 0x272]
mov qword [rbp - 0x40], rcx
lea ecx, [rcx*8]
lea r15, [rcx + rcx*2]
mov qword [rbp - 0x38], rdx
lea rsi, [rdx - 8]
mov r14, 0xffffffffffffffff
nop word cs:[rax + rax]
test r15, r15
je 0x18018f7e0
lea rbx, [rax + 0x18]
mov rdx, qword [rax + 8]
mov r8, qword [rax + 0x10]
mov r12, r8
sub r12, 7
mov eax, 7
cmovae r8, rax
neg r12
mov rcx, rdi
call sub.VCRUNTIME140.dll_memcmp
cdqe
test eax, eax
cmovne r12, rax
xor ecx, ecx
test r12, r12
setne cl
cmovs ecx, r13d
add r15, 0xffffffffffffffe8
add rsi, 0x20
inc r14
mov rax, rbx
cmp cl, 1
je 0x18018f780
movzx eax, cl
test eax, eax
je 0x18018f807
jmp 0x18018f7e4
mov r14, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x18]
sub rax, 1
jb 0x18018f87a
mov qword [rbp - 0x18], rax
mov rdx, qword [rdx + r14*8 + 0x278]
jmp 0x18018f745
cmp qword [rsi - 8], 4
jne 0x18018f840
mov rax, qword [rsi - 0x10]
mov rcx, qword [rsi]
mov eax, dword [rax]
mov edx, dword [str.selfviewscreen.child]
bswap eax
bswap edx
xor r8d, r8d
cmp eax, edx
seta r8b
sbb r8d, 0
add rcx, qword [0x18028e9b0]
xor eax, eax
test r8d, r8d
cmove rax, rcx
jmp 0x18018f842
xor eax, eax
mov rcx, qword [rbp - 0x28]
mov rdx, qword [rbp - 0x20]
mov qword [rdx], rax
mov rax, qword [rbp - 0x30]
mov dword [rax + 0x14], 1
movups xmm0, xmmword [rax]
movups xmmword [rcx], xmm0
mov rax, qword [rax + 0x10]
mov qword [rcx + 0x10], rax
add rsp, 0x98
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [0x1801a34b8]
call fcn.18019e0f0
ud2