Function at 0x18018ba50
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 r10, qword [rcx + 0x18]
mov rax, r10
inc rax
je 0x18018c21a
mov r15, rdx
mov r9, rcx
mov rbp, qword [rcx + 8]
lea r14, [rbp + 1]
mov rcx, r14
shr rcx, 3
mov r11, r14
and r11, 0xfffffffffffffff8
sub r11, rcx
cmp rbp, 8
mov rcx, r11
cmovb rcx, rbp
movabs r8, 0x7ffffffffffffff0
mov rdx, rcx
shr rdx, 1
cmp rax, rdx
mov qword [rsp + 0x30], r9
jbe 0x18018bade
inc rcx
cmp rax, rcx
cmova rcx, rax
cmp rcx, 8
jae 0x18018bb5b
xor eax, eax
cmp rcx, 4
setae al
lea rdi, [rax*4 + 4]
jmp 0x18018bbc0
mov qword [rsp + 0x48], r11
mov qword [rsp + 0x50], r10
mov rbx, qword [r9]
test r14, r14
je 0x18018bc32
pxor xmm0, xmm0
pcmpgtb xmm0, xmmword [rbx]
por xmm0, xmmword [0x180190840]
movdqa xmmword [rbx], xmm0
cmp r14, 0x11
jb 0x18018bb3d
mov eax, 0x10
movdqa xmm0, xmmword [0x180190840]
nop dword [rax + rax]
pxor xmm1, xmm1
pcmpgtb xmm1, xmmword [rbx + rax]
por xmm1, xmm0
movdqa xmmword [rbx + rax], xmm1
add rax, 0x10
jb 0x18018bb3d
cmp rax, r14
jb 0x18018bb20
cmp r14, 0x10
jae 0x18018be06
lea rcx, [rbx + 0x10]
mov rdx, rbx
mov r8, r14
call fcn.180181ff0
jmp 0x18018be10
mov rax, rcx
shr rax, 0x3d
jne 0x18018c21a
shl rcx, 3
mov edi, 1
cmp rcx, 0xe
jb 0x18018bbc0
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 rdi, 0xffffffffffffffff
shr rdi, cl
movabs rax, 0x800000000000000
inc rdi
dec rax
cmp rdi, rax
ja 0x18018c21a
mov rsi, rdi
shl rsi, 5
lea r12, [rdi + 0x10]
mov r13, rsi
add r13, r12
jb 0x18018c21a
cmp r13, r8
ja 0x18018c21a
mov qword [rsp + 0x20], r15
mov r15, r10
test r13, r13
je 0x18018bc48
movzx eax, byte [0x180221a30]
mov rcx, qword [0x1802219b8]
test rcx, rcx
jne 0x18018bc15
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x18018bc28
mov rcx, rax
mov qword [0x1802219b8], rax
xor edx, edx
mov r8, r13
call qword [sym.imp.kernel32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x18018bc4d
mov rcx, r13
call fcn.18004d180
ud2
lea rcx, [rbx + 0x10]
mov rdx, rbx
mov r8, r14
call fcn.180181ff0
xor ecx, ecx
jmp 0x18018c1ea
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.180182690
sub r13, r15
mov rax, qword [rsp + 0x30]
mov r12, qword [rax]
test r14, r14
je 0x18018bdc6
mov qword [rsp + 0x38], r13
lea rax, [r12 - 0x20]
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x20]
mov rcx, qword [rax]
mov qword [rsp + 0x40], rcx
mov r15, qword [rax + 8]
mov r13d, 1
xor esi, esi
jmp 0x18018bd0d
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, rsi
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
mov rsi, r13
lea rax, [r13 + 1]
cmp r13, r14
mov r13, rax
je 0x18018bd8c
cmp byte [r12 + rsi], 0
js 0x18018bcfa
shl rsi, 5
mov rax, qword [rsp + 0x28]
sub rax, rsi
mov r8, qword [rax]
mov r9, qword [rax + 0x10]
mov rcx, qword [rsp + 0x40]
mov rdx, r15
call fcn.180109790
mov rcx, rax
and rcx, rdi
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
test edx, edx
jne 0x18018bd67
mov r8d, 0x10
nop dword [rax]
add rcx, r8
and rcx, rdi
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
add r8, 0x10
test edx, edx
je 0x18018bd50
tzcnt edx, edx
add rdx, rcx
and rdx, rdi
cmp byte [rbx + rdx], 0
js 0x18018bcc0
movdqa xmm0, xmmword [rbx]
pmovmskb ecx, xmm0
tzcnt edx, ecx
jmp 0x18018bcc0
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
je 0x18018c202
shl r14, 5
add rbp, r14
cmp rbp, 0xffffffffffffffef
jne 0x18018bdec
jmp 0x18018c202
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov qword [rax + 0x10], r13
movabs rsi, 0x7ffffffffffffff0
shl r14, 5
add rbp, r14
cmp rbp, 0xffffffffffffffef
je 0x18018c202
sub r12, r14
mov rcx, qword [0x1802219b8]
xor edx, edx
mov r8, r12
call qword [sym.imp.kernel32.dll_HeapFree]
jmp 0x18018c202
movdqu xmm0, xmmword [rbx]
movdqu xmmword [rbx + r14], xmm0
movabs rdi, 0x800000000000000
mov rax, qword [r15]
mov r15, qword [r15 + 8]
movabs rcx, 0x736f6d6570736575
xor rcx, rax
movabs rdx, 0x646f72616e646f6d
xor rdx, r15
movabs r8, 0x6c7967656e657261
xor r8, rax
mov qword [rsp + 0x68], r8
add rcx, rdx
rol rdx, 0xd
xor rdx, rcx
rol rcx, 0x20
mov qword [rsp + 0x38], rcx
mov qword [rsp + 0x70], rdx
rol rdx, 0x11
mov qword [rsp + 0x60], rdx
xor r10d, r10d
mov qword [rsp + 0x58], rbp
jmp 0x18018bea3
shr rax, 0x39
lea rcx, [r10 - 0x10]
and rcx, rbp
mov byte [rbx + r10], al
mov byte [rcx + rbx + 0x10], al
lea rax, [r10 + 1]
cmp r10, rbp
mov r10, rax
je 0x18018c1dd
cmp byte [rbx + r10], 0x80
jne 0x18018be93
mov rax, r10
not rax
shl rax, 5
add rax, rbx
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x28], r10
mov rax, r10
shl rax, 5
neg rax
add rax, rbx
add rax, 0xffffffffffffffe0
mov qword [rsp + 0x40], rax
nop word [rax + rax]
mov rcx, qword [rsp + 0x40]
mov r11, qword [rcx + 0x10]
mov r8, r15
xor r8, r11
movabs rax, 0x7465646279746573
xor r8, rax
mov rax, qword [rsp + 0x68]
lea rdx, [rax + r8]
rol r8, 0x10
mov r9, qword [rcx]
xor r8, rdx
mov rax, qword [rsp + 0x38]
lea r12, [r8 + rax]
add rdx, qword [rsp + 0x70]
mov r13, rdx
rol r13, 0x20
xor rdx, qword [rsp + 0x60]
rol r8, 0x15
xor r8, r12
xor r12, r11
lea rax, [r11 + r11]
mov r10d, eax
and r10d, 6
xor r14d, r14d
and rax, 0xfffffffffffffff8
je 0x18018bf93
nop word [rax + rax]
add r12, rdx
rol rdx, 0xd
mov rcx, qword [r9 + r14]
xor rdx, r12
rol r12, 0x20
xor r8, rcx
add r13, r8
rol r8, 0x10
xor r8, r13
add r12, r8
rol r8, 0x15
add r13, rdx
rol rdx, 0x11
xor rdx, r13
rol r13, 0x20
xor r8, r12
xor r12, rcx
add r14, 8
cmp r14, rax
jb 0x18018bf50
cmp r10d, 3
jbe 0x18018bfb0
mov esi, dword [r9 + r14]
mov eax, 4
mov rcx, rax
or rcx, 1
cmp rcx, r10
jb 0x18018bfc0
jmp 0x18018bfeb
xor esi, esi
xor eax, eax
mov rcx, rax
or rcx, 1
cmp rcx, r10
jae 0x18018bfeb
lea rcx, [rax + r14]
mov rbp, r15
mov r15, rdi
movzx edi, word [r9 + rcx]
lea ecx, [rax*8]
shl rdi, cl
or rsi, rdi
mov rdi, r15
mov r15, rbp
mov rbp, qword [rsp + 0x58]
or rax, 2
cmp rax, r10
jae 0x18018c003
add r14, rax
movzx r9d, byte [r9 + r14]
shl eax, 3
mov ecx, eax
shl r9, cl
or rsi, r9
mov r10, qword [rsp + 0x28]
shl r11, 0x39
add r11, rdi
add r12, rdx
rol rdx, 0xd
or r11, rsi
xor rdx, r12
rol r12, 0x20
xor r8, r11
add r13, r8
rol r8, 0x10
xor r8, r13
add r12, r8
rol r8, 0x15
add r13, rdx
rol rdx, 0x11
xor r8, r12
xor rdx, r13
rol r13, 0x20
xor r12, r11
add r12, rdx
rol rdx, 0xd
xor rdx, r12
rol r12, 0x20
xor r13, 0xff
add r13, r8
rol r8, 0x10
xor r8, r13
add r12, r8
rol r8, 0x15
add r13, rdx
rol rdx, 0x11
xor rdx, r13
rol r13, 0x20
xor r8, r12
add r12, rdx
rol rdx, 0xd
xor rdx, r12
rol r12, 0x20
add r13, r8
rol r8, 0x10
xor r8, r13
add r12, r8
rol r8, 0x15
add r13, rdx
rol rdx, 0x11
xor rdx, r13
rol r13, 0x20
xor r8, r12
add r12, rdx
rol rdx, 0xd
add r13, r8
rol r8, 0x10
xor r8, r13
rol r8, 0x15
xor rdx, r12
add r13, rdx
rol rdx, 0x11
mov rax, r13
rol rax, 0x20
xor rax, rdx
xor rax, r8
xor rax, r13
mov rcx, rbp
and rcx, rax
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
mov r8, rcx
test edx, edx
jne 0x18018c118
mov r9d, 0x10
mov r8, rcx
nop dword [rax]
add r8, r9
and r8, rbp
movdqu xmm0, xmmword [rbx + r8]
pmovmskb edx, xmm0
add r9, 0x10
test edx, edx
je 0x18018c100
tzcnt edx, edx
add rdx, r8
and rdx, rbp
cmp byte [rbx + rdx], 0
js 0x18018c134
movdqa xmm0, xmmword [rbx]
pmovmskb edx, xmm0
tzcnt edx, edx
mov r8, r10
sub r8, rcx
mov r9, rdx
sub r9, rcx
xor r9, r8
and r9, rbp
cmp r9, 0x10
jb 0x18018be80
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 0x18018c1b0
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
jmp 0x18018bee0
lea rax, [r10 - 0x10]
and rax, rbp
mov byte [rbx + r10], 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 0x18018be93
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