Function at 0x180191ba0
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 0x180191cd5
mov edi, dword [0x18028e9b8]
test dil, 1
jne 0x180191cd5
cmp edi, 0x100
jae 0x180191c1c
mov ecx, edi
or ecx, 0x20000000
mov eax, edi
lock cmpxchg dword [0x18028e9b8], ecx
jne 0x180191c1c
lea rbx, [0x18028e9b8]
jmp 0x180191c4e
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 0x180191c9f
cmp eax, 2
je 0x180191cd5
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 0x180191cd5
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 0x180191c80
cmp eax, 0x40000000
jb 0x180191cd5
xor eax, edi
mov rcx, rbx
mov edx, eax
call fcn.18018f9c0
jmp 0x180191cd5
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 0x180191cd5
add edx, 0xffffff00
call fcn.18018f9c0
movzx eax, byte [r15]
test al, al
jne 0x180191df5
mov ecx, dword [0x18028e9e0]
test cl, 1
jne 0x180191df5
cmp ecx, 0x100
jae 0x180191d1e
mov edx, ecx
or edx, 0x20000000
mov eax, ecx
lock cmpxchg dword [0x18028e9e0], edx
jne 0x180191d1e
lea rax, [0x18028e9e0]
movd xmm0, ecx
pshufd xmm0, xmm0, 0x50
jmp 0x180191d52
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 0x180191dbf
cmp eax, 2
je 0x180191df5
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 0x180191df5
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 0x180191da0
cmp eax, 0x40000000
jb 0x180191df5
xor eax, edx
mov edx, eax
call fcn.18018f9c0
jmp 0x180191df5
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 0x180191df5
add edx, 0xffffff00
call fcn.18018f9c0
mov qword [rbp - 0x20], r14
mov qword [rbp - 0x28], rsi
mov rdx, qword [0x18028e9c8]
test rdx, rdx
je 0x180191f56
mov rax, qword [0x18028e9d0]
mov qword [rbp - 0x18], rax
lea rdi, str.enabler
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 0x180191ec0
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 0x180191e60
movzx eax, cl
test eax, eax
je 0x180191ee7
jmp 0x180191ec4
mov r14, qword [rbp - 0x40]
mov rdx, qword [rbp - 0x38]
mov rax, qword [rbp - 0x18]
sub rax, 1
jb 0x180191f56
mov qword [rbp - 0x18], rax
mov rdx, qword [rdx + r14*8 + 0x278]
jmp 0x180191e25
cmp qword [rsi - 8], 4
jne 0x180191f1c
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 0x180191f1e
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, [0x1801a4120]
call fcn.18019e0f0
ud2