Function at 0x18018a6e0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x78
mov r15, qword [rcx + 0x18]
mov rax, r15
inc rax
je 0x18018b009
mov r14, rdx
mov r9, rcx
mov rbp, qword [rcx + 8]
lea r8, [rbp + 1]
mov rcx, r8
shr rcx, 3
mov r11, r8
and r11, 0xfffffffffffffff8
sub r11, rcx
cmp rbp, 8
mov rcx, r11
cmovb rcx, rbp
movabs rdi, 0x7ffffffffffffff0
mov rdx, rcx
shr rdx, 1
cmp rax, rdx
jbe 0x18018a769
inc rcx
cmp rax, rcx
cmova rcx, rax
cmp rcx, 8
jae 0x18018a7e8
xor eax, eax
cmp rcx, 4
setae al
lea rdx, [rax*4 + 4]
jmp 0x18018a84a
mov qword [rsp + 0x48], r11
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x30], r9
mov rbx, qword [r9]
test r8, r8
je 0x18018a8bd
pxor xmm0, xmm0
pcmpgtb xmm0, xmmword [rbx]
por xmm0, xmmword [0x18018c840]
movdqa xmmword [rbx], xmm0
cmp r8, 0x11
jb 0x18018a7cd
mov eax, 0x10
movdqa xmm0, xmmword [0x18018c840]
nop dword [rax + rax]
pxor xmm1, xmm1
pcmpgtb xmm1, xmmword [rbx + rax]
por xmm1, xmm0
movdqa xmmword [rbx + rax], xmm1
add rax, 0x10
jb 0x18018a7cd
cmp rax, r8
jb 0x18018a7b0
cmp r8, 0x10
jae 0x18018aa7b
lea rcx, [rbx + 0x10]
mov rdx, rbx
call fcn.180171d20
jmp 0x18018aa85
mov rax, rcx
shr rax, 0x3d
jne 0x18018b009
shl rcx, 3
mov edx, 1
cmp rcx, 0xe
jb 0x18018a84a
movabs rdx, 0x2492492492492493
mov rax, rcx
mul rdx
sub rcx, rdx
shr rcx, 1
add rcx, rdx
shr rcx, 2
dec rcx
bsr rcx, rcx
not ecx
mov rdx, 0xffffffffffffffff
shr rdx, cl
movabs rax, 0x7ffffffffffffff
inc rdx
cmp rdx, rax
ja 0x18018b009
mov rsi, rdx
shl rsi, 5
lea r12, [rdx + 0x10]
mov r13, rsi
add r13, r12
jb 0x18018b009
cmp r13, rdi
ja 0x18018b009
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x20], r8
mov rdi, rdx
mov r14, r9
test r13, r13
je 0x18018a8d0
mov rcx, qword [0x18021a960]
test rcx, rcx
jne 0x18018a8a0
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x18018a8b3
mov rcx, rax
mov qword [0x18021a960], rax
xor edx, edx
mov r8, r13
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x18018a8d5
mov rcx, r13
call fcn.18004ca00
ud2
lea rcx, [rbx + 0x10]
mov rdx, rbx
call fcn.180171d20
xor ecx, ecx
jmp 0x18018afd9
mov ebx, 0x10
mov r13, rdi
dec rdi
mov rax, r13
shr rax, 3
and r13, 0xfffffffffffffff8
sub r13, rax
cmp rdi, 8
cmovb r13, rdi
add rbx, rsi
mov rcx, rbx
mov dl, 0xff
mov r8, r12
call fcn.1801723c0
sub r13, r15
mov r12, qword [r14]
mov rax, qword [rsp + 0x20]
test rax, rax
je 0x18018aa3b
mov qword [rsp + 0x38], r13
mov qword [rsp + 0x30], r14
lea rax, [r12 - 0x20]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x40]
mov r13, qword [rax]
mov r15, qword [rax + 8]
xor esi, esi
jmp 0x18018a986
shr rax, 0x39
lea rcx, [rdx - 0x10]
and rcx, rdi
mov byte [rbx + rdx], al
mov byte [rcx + rbx + 0x10], al
mov rax, r12
sub rax, r14
shl rdx, 5
mov rcx, rbx
sub rcx, rdx
neg rdx
movdqu xmm0, xmmword [rax - 0x20]
movdqu xmm1, xmmword [rax - 0x10]
movdqu xmmword [rbx + rdx - 0x20], xmm0
movdqu xmmword [rcx - 0x10], xmm1
lea rax, [rsi + 1]
cmp rsi, rbp
mov rsi, rax
je 0x18018a9fc
cmp byte [r12 + rsi], 0
js 0x18018a97a
mov r14, rsi
shl r14, 5
mov r8, qword [rsp + 0x28]
sub r8, r14
mov rcx, r13
mov rdx, r15
call fcn.1801358c0
mov rcx, rax
and rcx, rdi
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
test edx, edx
jne 0x18018a9d7
mov r8d, 0x10
add rcx, r8
and rcx, rdi
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
add r8, 0x10
test edx, edx
je 0x18018a9c0
tzcnt edx, edx
add rdx, rcx
and rdx, rdi
cmp byte [rbx + rdx], 0
js 0x18018a940
movdqa xmm0, xmmword [rbx]
pmovmskb ecx, xmm0
tzcnt edx, ecx
jmp 0x18018a940
mov rax, qword [rsp + 0x30]
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov rcx, qword [rsp + 0x38]
mov qword [rax + 0x10], rcx
test rbp, rbp
movabs rsi, 0x7ffffffffffffff0
mov rax, qword [rsp + 0x20]
je 0x18018aff1
shl rax, 5
add rbp, rax
cmp rbp, 0xffffffffffffffef
jne 0x18018aa61
jmp 0x18018aff1
mov qword [r14], rbx
mov qword [r14 + 8], rdi
mov qword [r14 + 0x10], r13
movabs rsi, 0x7ffffffffffffff0
shl rax, 5
add rbp, rax
cmp rbp, 0xffffffffffffffef
je 0x18018aff1
sub r12, rax
mov rcx, qword [0x18021a960]
xor edx, edx
mov r8, r12
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18018aff1
movdqu xmm0, xmmword [rbx]
movdqu xmmword [rbx + r8], xmm0
mov rax, qword [r14]
mov rcx, qword [r14 + 8]
movabs rdx, 0x736f6d6570736575
xor rdx, rax
movabs r8, 0x646f72616e646f6d
mov qword [rsp + 0x40], rcx
xor r8, rcx
add rdx, r8
rol r8, 0xd
movabs rcx, 0x6c7967656e657261
xor r8, rdx
rol rdx, 0x20
mov qword [rsp + 0x38], rdx
xor rcx, rax
mov qword [rsp + 0x68], rcx
mov qword [rsp + 0x70], r8
rol r8, 0x11
mov qword [rsp + 0x60], r8
xor esi, esi
jmp 0x18018ab12
shr rax, 0x39
lea rcx, [rsi - 0x10]
and rcx, rbp
mov byte [rbx + rsi], al
mov byte [rcx + rbx + 0x10], al
lea rax, [rsi + 1]
cmp rsi, rbp
mov rsi, rax
je 0x18018afcc
cmp byte [rbx + rsi], 0x80
jne 0x18018ab02
mov rax, rsi
not rax
shl rax, 5
add rax, rbx
mov qword [rsp + 0x20], rax
mov rax, rsi
shl rax, 5
neg rax
lea r12, [rbx + rax]
add r12, 0xffffffffffffffe0
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x28], r12
mov r11, qword [r12]
mov r8, qword [r12 + 0x10]
test r11, r11
jne 0x18018ab65
nop word cs:[rax + rax]
mov r11, qword [r12 + 8]
mov rdx, qword [rsp + 0x40]
xor rdx, r8
movabs rax, 0x7465646279746573
xor rdx, rax
mov rax, qword [rsp + 0x68]
lea r15, [rdx + rax]
rol rdx, 0x10
xor rdx, r15
mov rax, qword [rsp + 0x38]
lea r14, [rdx + rax]
add r15, qword [rsp + 0x70]
mov r13, r15
rol r13, 0x20
xor r15, qword [rsp + 0x60]
rol rdx, 0x15
xor rdx, r14
xor r14, r8
mov r10d, r8d
and r10d, 7
mov rax, r8
xor r9d, r9d
and rax, 0xfffffffffffffff8
je 0x18018ac13
nop word cs:[rax + rax]
add r14, r15
rol r15, 0xd
mov rcx, qword [r11 + r9]
xor r15, r14
rol r14, 0x20
xor rdx, rcx
add r13, rdx
rol rdx, 0x10
xor rdx, r13
add r14, rdx
rol rdx, 0x15
add r13, r15
rol r15, 0x11
xor r15, r13
rol r13, 0x20
xor rdx, r14
xor r14, rcx
add r9, 8
cmp r9, rax
jb 0x18018abd0
cmp r10d, 3
jbe 0x18018ac30
mov edi, dword [r11 + r9]
mov eax, 4
mov rcx, rax
or rcx, 1
cmp rcx, r10
jb 0x18018ac40
jmp 0x18018ac5f
xor edi, edi
xor eax, eax
mov rcx, rax
or rcx, 1
cmp rcx, r10
jae 0x18018ac5f
lea rcx, [rax + r9]
movzx r12d, word [r11 + rcx]
lea ecx, [rax*8]
shl r12, cl
or rdi, r12
mov r12, qword [rsp + 0x28]
or rax, 2
cmp rax, r10
jae 0x18018ac80
add r9, rax
movzx r9d, byte [r11 + r9]
shl eax, 3
mov ecx, eax
shl r9, cl
or rdi, r9
movzx r9d, byte [r12 + 0x18]
jmp 0x18018ac8b
movzx r9d, byte [r12 + 0x18]
test r10, r10
je 0x18018acf0
movzx eax, r9b
lea ecx, [r10*8]
shl rax, cl
or rax, rdi
cmp r10, 7
jne 0x18018add2
mov ecx, 8
add r14, r15
rol r15, 0xd
sub rcx, r10
xor r15, r14
rol r14, 0x20
xor rdx, rax
add r13, rdx
rol rdx, 0x10
xor rdx, r13
add r14, rdx
rol rdx, 0x15
xor rdx, r14
add r13, r15
rol r15, 0x11
xor r15, r13
rol r13, 0x20
xor r14, rax
jmp 0x18018acf2
xor ecx, ecx
mov r11d, 1
sub r11, rcx
mov r10d, r11d
and r10d, 7
and r11, 0xfffffffffffffff8
movzx eax, r9b
cmp rcx, r11
jae 0x18018ad80
nop
add r14, r15
rol r15, 0xd
mov r9, rdx
xor r15, r14
rol r14, 0x20
xor r9, rax
add r13, r9
shld r9, rdx, 0x10
xor r9, r13
add r14, r9
rol r9, 0x15
add r13, r15
rol r15, 0x11
mov rdx, r9
xor r15, r13
rol r13, 0x20
xor rdx, r14
xor r14, rax
add rcx, 8
cmp rcx, r11
jb 0x18018ad10
xor esi, esi
cmp r10, 4
setae sil
cmp r10d, 4
mov r11d, 0
cmovae r11, rax
shl rsi, 2
jmp 0x18018ad85
xor r11d, r11d
xor esi, esi
mov rdi, rsi
or rdi, 1
lea ecx, [rsi*8]
mov r12, rax
shl r12, cl
mov r9, rsi
or r9, 2
cmp rdi, r10
mov edi, 0
cmovae r12, rdi
cmovae r9, rsi
or r12, r11
lea ecx, [r9*8]
shl rax, cl
cmp r9, r10
cmovae rax, rdi
or rax, r12
mov rsi, qword [rsp + 0x58]
mov r12, qword [rsp + 0x28]
shl r8, 0x38
movabs rcx, 0x900000000000000
add r8, rcx
add r14, r15
rol r15, 0xd
or r8, rax
xor r15, r14
rol r14, 0x20
xor rdx, r8
add r13, rdx
rol rdx, 0x10
xor rdx, r13
add r14, rdx
rol rdx, 0x15
add r13, r15
rol r15, 0x11
xor rdx, r14
xor r15, r13
rol r13, 0x20
xor r14, r8
add r14, r15
rol r15, 0xd
xor r15, r14
rol r14, 0x20
xor r13, 0xff
add r13, rdx
rol rdx, 0x10
xor rdx, r13
add r14, rdx
rol rdx, 0x15
add r13, r15
rol r15, 0x11
xor r15, r13
rol r13, 0x20
xor rdx, r14
add r14, r15
rol r15, 0xd
xor r15, r14
rol r14, 0x20
add r13, rdx
rol rdx, 0x10
xor rdx, r13
add r14, rdx
rol rdx, 0x15
add r13, r15
rol r15, 0x11
xor r15, r13
rol r13, 0x20
xor rdx, r14
add r14, r15
rol r15, 0xd
add r13, rdx
rol rdx, 0x10
xor rdx, r13
rol rdx, 0x15
xor r15, r14
add r13, r15
rol r15, 0x11
mov rax, r13
rol rax, 0x20
xor rax, r15
xor rax, rdx
xor rax, r13
mov rcx, rbp
and rcx, rax
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
mov r8, rcx
test edx, edx
jne 0x18018aef8
mov r9d, 0x10
mov r8, rcx
nop word cs:[rax + rax]
add r8, r9
and r8, rbp
movdqu xmm0, xmmword [rbx + r8]
pmovmskb edx, xmm0
add r9, 0x10
test edx, edx
je 0x18018aee0
tzcnt edx, edx
add rdx, r8
and rdx, rbp
cmp byte [rbx + rdx], 0
js 0x18018af14
movdqa xmm0, xmmword [rbx]
pmovmskb edx, xmm0
tzcnt edx, edx
mov r8, rsi
sub r8, rcx
mov r9, rdx
sub r9, rcx
xor r9, r8
and r9, rbp
cmp r9, 0x10
jb 0x18018aaf0
mov rcx, rdx
not rcx
shl rcx, 5
add rcx, rbx
movzx r8d, byte [rbx + rdx]
shr rax, 0x39
lea r9, [rdx - 0x10]
and r9, rbp
mov byte [rbx + rdx], al
mov byte [r9 + rbx + 0x10], al
cmp r8b, 0xff
je 0x18018afa0
mov rax, qword [rsp + 0x20]
movups xmm0, xmmword [rax]
movups xmm1, xmmword [rcx]
movups xmmword [rax], xmm1
movups xmmword [rcx], xmm0
movdqu xmm0, xmmword [rax + 0x10]
movdqu xmm1, xmmword [rcx + 0x10]
movdqu xmmword [rax + 0x10], xmm1
movdqu xmmword [rcx + 0x10], xmm0
mov r11, qword [r12]
mov r8, qword [r12 + 0x10]
test r11, r11
je 0x18018ab60
jmp 0x18018ab65
lea rax, [rsi - 0x10]
and rax, rbp
mov byte [rbx + rsi], 0xff
mov byte [rax + rbx + 0x10], 0xff
mov rax, qword [rsp + 0x20]
movdqu xmm0, xmmword [rax]
movdqu xmm1, xmmword [rax + 0x10]
movdqu xmmword [rcx + 0x10], xmm1
movdqu xmmword [rcx], xmm0
jmp 0x18018ab02
cmp rbp, 8
mov rcx, qword [rsp + 0x48]
cmovb rcx, rbp
sub rcx, qword [rsp + 0x50]
mov rax, qword [rsp + 0x30]
mov qword [rax + 0x10], rcx
movabs rsi, 0x7ffffffffffffff0
add rsi, 0x11
mov rax, rsi
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2