Function at 0x180191380
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 0x1801914b5
mov edi, dword [0x18028e9b8]
test dil, 1
jne 0x1801914b5
cmp edi, 0x100
jae 0x1801913fc
mov ecx, edi
or ecx, 0x20000000
mov eax, edi
lock cmpxchg dword [0x18028e9b8], ecx
jne 0x1801913fc
lea rbx, [0x18028e9b8]
jmp 0x18019142e
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 0x18019147f
cmp eax, 2
je 0x1801914b5
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 0x1801914b5
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 0x180191460
cmp eax, 0x40000000
jb 0x1801914b5
xor eax, edi
mov rcx, rbx
mov edx, eax
call fcn.18018f9c0
jmp 0x1801914b5
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 0x1801914b5
add edx, 0xffffff00
call fcn.18018f9c0
movzx eax, byte [r15]
test al, al
jne 0x1801915d5
mov ecx, dword [0x18028e9e0]
test cl, 1
jne 0x1801915d5
cmp ecx, 0x100
jae 0x1801914fe
mov edx, ecx
or edx, 0x20000000
mov eax, ecx
lock cmpxchg dword [0x18028e9e0], edx
jne 0x1801914fe
lea rax, [0x18028e9e0]
movd xmm0, ecx
pshufd xmm0, xmm0, 0x50
jmp 0x180191532
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 0x18019159f
cmp eax, 2
je 0x1801915d5
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.180191fb0
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 0x1801915d5
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 0x180191580
cmp eax, 0x40000000
jb 0x1801915d5
xor eax, edx
mov edx, eax
call fcn.18018f9c0
jmp 0x1801915d5
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 0x1801915d5
add edx, 0xffffff00
call fcn.18018f9c0
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x28], rsi
mov rdx, qword [0x18028e9c8]
test rdx, rdx
je 0x180191736
mov rax, qword [0x18028e9d0]
mov qword [rbp - 0x18], rax
lea rdi, str.gview
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 0x1801916a0
lea rbx, [rax + 0x18]
mov rdx, qword [rax + 8]
mov r8, qword [rax + 0x10]
mov r12, r8
sub r12, 5
mov eax, 5
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 0x180191640
movzx eax, cl
test eax, eax
je 0x1801916c7
jmp 0x1801916a4
mov r14, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x18]
sub rax, 1
jb 0x180191736
mov qword [rbp - 0x18], rax
mov rdx, qword [rdx + r14*8 + 0x278]
jmp 0x180191605
cmp qword [rsi - 8], 4
jne 0x1801916fc
mov rax, qword [rsi - 0x10]
mov rcx, qword [rsi]
mov eax, dword [rax]
bswap eax
xor edx, edx
cmp eax, 0x73656c67
setae dl
cmp eax, 0x73656c66
sbb edx, 0
add rcx, qword [0x18028e9b0]
xor eax, eax
test edx, edx
cmove rax, rcx
jmp 0x1801916fe
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, [0x1801a4180]
call fcn.18019e0f0
ud2