Function at 0x18018dea0
Capabilities:
Encode data using xor

Disassembly:
push rsi
push rdi
sub rsp, 0x68
mov rsi, rcx
mov ecx, edx
and ecx, 0x3fffff00
mov dword [rsp + 0x28], ecx
jne 0x18018e152
mov eax, edx
mov ecx, eax
and ecx, 0xc0000000
mov dword [rsp + 0x28], ecx
je 0x18018e136
movzx ecx, word [rsi + 8]
test cl, 0x1f
je 0x18018e022
nop dword [rax]
test eax, 0x40000000
jne 0x18018df88
and eax, 0x80000000
mov dword [rsp + 0x28], eax
je 0x18018e191
mov eax, dword [rsi]
nop dword [rax]
mov ecx, eax
xor ecx, 0xa0000000
lock cmpxchg dword [rsi], ecx
jne 0x18018df00
mov ecx, eax
and ecx, 0x80000000
mov dword [rsp + 0x28], ecx
je 0x18018e1a3
and eax, 0x3fffff00
mov dword [rsp + 0x28], eax
jne 0x18018e1b5
mov rcx, rsi
call fcn.1801119e0
test al, al
jne 0x18018e14b
mov eax, dword [rsi]
nop word cs:[rax + rax]
mov ecx, eax
and ecx, 0xdfffffff
lock cmpxchg dword [rsi], ecx
jne 0x18018df50
mov ecx, eax
and ecx, 0x20000000
mov dword [rsp + 0x28], ecx
je 0x18018e1c7
cmp eax, 0x40000000
jb 0x18018e14b
pause
test eax, 0x40000000
je 0x18018deeb
mov dword [rsp + 0x2c], pe_nt_image_headers64
mov eax, dword [rsi]
nop word cs:[rax + rax]
mov ecx, eax
xor ecx, 0x50000100
lock cmpxchg dword [rsi], ecx
jne 0x18018dfa0
mov ecx, eax
and ecx, 0x100
mov dword [rsp + 0x28], ecx
jne 0x18018e21b
and eax, 0x20000000
mov dword [rsp + 0x28], eax
je 0x18018e0e4
jmp 0x18018e246
mov eax, dword [rsi]
nop word cs:[rax + rax]
mov ecx, eax
and ecx, 0xdfffffff
lock cmpxchg dword [rsi], ecx
jne 0x18018dff0
mov ecx, eax
and ecx, 0x20000000
mov dword [rsp + 0x28], ecx
je 0x18018e17f
cmp eax, 0x40000000
jb 0x18018e14b
and eax, 0xdfffffff
pause
xor ecx, ecx
test eax, eax
jns 0x18018e076
mov edi, eax
mov eax, dword [rsi]
nop dword [rax]
mov ecx, eax
xor ecx, 0xa0000000
lock cmpxchg dword [rsi], ecx
jne 0x18018e030
mov ecx, eax
and ecx, 0x80000000
mov dword [rsp + 0x28], ecx
je 0x18018e1d9
and eax, 0x3fffff00
mov dword [rsp + 0x28], eax
jne 0x18018e206
mov rcx, rsi
call fcn.1801119e0
mov ecx, 0x20000000
test al, al
mov eax, edi
jne 0x18018e14b
test eax, 0x40000000
je 0x18018dfe0
mov dword [rsp + 0x64], ecx
mov dword [rsp + 0x2c], pe_nt_image_headers64
mov edx, ecx
or edx, 0x50000100
mov eax, dword [rsi]
nop word [rax + rax]
mov r8d, eax
xor r8d, edx
lock cmpxchg dword [rsi], r8d
jne 0x18018e0a0
mov edx, eax
and edx, ecx
mov dword [rsp + 0x28], edx
cmp edx, ecx
jne 0x18018e25b
mov edx, eax
and edx, 0x100
mov dword [rsp + 0x28], edx
jne 0x18018e21b
and eax, 0x20000000
mov edx, eax
xor edx, ecx
mov dword [rsp + 0x28], edx
cmp eax, ecx
jne 0x18018e246
mov rcx, rsi
call fcn.1801114b0
shl eax, 8
mov ecx, 0x10000000
sub ecx, eax
lock sub dword [rsi], ecx
mov eax, 0xffffff00
lock xadd dword [rsi], eax
mov ecx, eax
and ecx, 0x3fffff00
cmp ecx, 0x100
setne cl
cmp eax, 0x40000000
setb dl
or dl, cl
jne 0x18018e14b
add eax, 0xffffff00
mov ecx, eax
and ecx, 0xc0000000
mov dword [rsp + 0x28], ecx
jne 0x18018decf
mov qword [rsp + 0x30], 0
lea rax, [0x18021d1a0]
jmp 0x18018e1e9
add rsp, 0x68
pop rdi
pop rsi
ret
mov qword [rsp + 0x30], 0
lea rax, [0x18021d0e0]
mov qword [rsp + 0x20], rax
lea r8, [0x18021d0d8]
lea rdx, [rsp + 0x28]
lea r9, [rsp + 0x30]
xor ecx, ecx
call fcn.18018e6d0
mov qword [rsp + 0x30], 0
lea rax, [0x18021d170]
jmp 0x18018e1e9
mov qword [rsp + 0x30], 0
lea rax, [0x18021d140]
jmp 0x18018e1e9
mov qword [rsp + 0x30], 0
lea rax, [0x18021d128]
jmp 0x18018e1e9
mov qword [rsp + 0x30], 0
lea rax, [0x18021d0f8]
jmp 0x18018e162
mov qword [rsp + 0x30], 0
lea rax, [0x18021d110]
jmp 0x18018e1e9
mov qword [rsp + 0x30], 0
lea rax, [0x18021d188]
mov qword [rsp + 0x20], rax
lea r8, [0x18021d0d8]
lea rdx, [rsp + 0x28]
lea r9, [rsp + 0x30]
mov cl, 1
call fcn.18018e6d0
mov qword [rsp + 0x30], 0
lea rax, [0x18021d158]
jmp 0x18018e162
mov qword [rsp + 0x30], 0
lea rax, [0x18021d1b8]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x28]
lea r8, [rsp + 0x2c]
lea r9, [rsp + 0x30]
mov cl, 1
call fcn.18018e6d0
mov qword [rsp + 0x30], 0
lea rax, [0x18021d1e8]
jmp 0x18018e162
mov qword [rsp + 0x30], 0
lea rax, [0x18021d1d0]
mov qword [rsp + 0x20], rax
lea rdx, [rsp + 0x28]
lea r8, [rsp + 0x64]
lea r9, [rsp + 0x30]
xor ecx, ecx
call fcn.18018e6d0
int3