Function at 0x18016a140
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x88
mov r9, qword [rcx + 0x18]
mov rax, r9
inc rax
je 0x18016ab85
mov r15, rdx
mov r8, rcx
mov rdi, qword [rcx + 8]
lea r14, [rdi + 1]
mov rcx, r14
shr rcx, 3
mov r10, r14
and r10, 0xfffffffffffffff8
sub r10, rcx
cmp rdi, 8
mov rcx, r10
cmovb rcx, rdi
movabs r12, 0x7ffffffffffffff0
mov rdx, rcx
shr rdx, 1
cmp rax, rdx
mov qword [rsp + 0x38], r8
mov qword [rsp + 0x48], r9
jbe 0x18016a1d6
inc rcx
cmp rax, rcx
cmova rcx, rax
cmp rcx, 8
jae 0x18016a24b
xor eax, eax
cmp rcx, 4
setae al
lea rbx, [rax*4 + 4]
jmp 0x18016a29a
mov qword [rsp + 0x70], r10
mov rbx, qword [r8]
test r14, r14
je 0x18016a31e
pxor xmm0, xmm0
pcmpgtb xmm0, xmmword [rbx]
por xmm0, xmmword [0x180171740]
movdqa xmmword [rbx], xmm0
cmp r14, 0x11
jb 0x18016a22d
mov eax, 0x10
movdqa xmm0, xmmword [0x180171740]
nop
pxor xmm1, xmm1
pcmpgtb xmm1, xmmword [rbx + rax]
por xmm1, xmm0
movdqa xmmword [rbx + rax], xmm1
add rax, 0x10
jb 0x18016a22d
cmp rax, r14
jb 0x18016a210
cmp r14, 0x10
jae 0x18016a538
lea rcx, [rbx + 0x10]
mov rdx, rbx
mov r8, r14
call fcn.180158470
jmp 0x18016a542
mov rax, rcx
shr rax, 0x3d
jne 0x18016ab85
shl rcx, 3
mov ebx, 1
cmp rcx, 0xe
jb 0x18016a29a
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 rbx, 0xffffffffffffffff
shr rbx, cl
inc rbx
mov ecx, 0x68
mov rax, rbx
mul rcx
jo 0x18016ab85
mov rsi, rax
add rsi, 0xf
and rsi, 0xfffffffffffffff0
lea rbp, [rbx + 0x10]
mov r13, rsi
add r13, rbp
jb 0x18016ab85
cmp r13, r12
ja 0x18016ab85
mov qword [rsp + 0x28], r15
test r13, r13
je 0x18016a334
movzx eax, byte [0x1801fa9d0]
mov rcx, qword [0x1801fa958]
test rcx, rcx
jne 0x18016a301
call qword [sym.imp.kernel32.dll_GetProcessHeap]
test rax, rax
je 0x18016a314
mov rcx, rax
mov qword [0x1801fa958], rax
xor edx, edx
mov r8, r13
call qword [sym.imp.kernel32.dll_HeapAlloc]
mov r12, rax
test rax, rax
jne 0x18016a33a
mov rcx, r13
call fcn.180045da0
ud2
lea rcx, [rbx + 0x10]
mov rdx, rbx
mov r8, r14
call fcn.180158470
xor ecx, ecx
jmp 0x18016ab5c
mov r12d, 0x10
mov r15, rbx
dec rbx
mov rax, r15
shr rax, 3
and r15, 0xfffffffffffffff8
sub r15, rax
cmp rbx, 8
cmovb r15, rbx
add r12, rsi
mov rcx, r12
mov dl, 0xff
mov r8, rbp
call fcn.180158b20
sub r15, qword [rsp + 0x48]
mov rax, qword [rsp + 0x38]
mov r13, qword [rax]
test r14, r14
je 0x18016a4e9
mov qword [rsp + 0x30], r15
lea rsi, [r13 - 0x68]
mov rax, qword [rsp + 0x28]
mov rcx, qword [rax]
mov qword [rsp + 0x40], rcx
mov rax, qword [rax + 8]
mov qword [rsp + 0x28], rax
mov r15d, 1
xor ebp, ebp
jmp 0x18016a435
shr rax, 0x39
lea rcx, [rdx - 0x10]
and rcx, rbx
mov byte [r12 + rdx], al
mov byte [rcx + r12 + 0x10], al
imul rax, rbp, 0xffffffffffffff98
imul rcx, rdx, 0xffffffffffffff98
mov rdx, qword [rax + r13 - 8]
mov qword [rcx + r12 - 8], rdx
movups xmm0, xmmword [rax + r13 - 0x18]
movups xmmword [rcx + r12 - 0x18], xmm0
movups xmm0, xmmword [rax + r13 - 0x28]
movups xmmword [rcx + r12 - 0x28], xmm0
movdqu xmm0, xmmword [rax + r13 - 0x68]
movdqu xmm1, xmmword [rax + r13 - 0x58]
movups xmm2, xmmword [rax + r13 - 0x48]
movups xmm3, xmmword [rax + r13 - 0x38]
movups xmmword [rcx + r12 - 0x38], xmm3
movups xmmword [rcx + r12 - 0x48], xmm2
movdqu xmmword [rcx + r12 - 0x58], xmm1
movdqu xmmword [rcx + r12 - 0x68], xmm0
mov rbp, r15
lea rax, [r15 + 1]
cmp r15, r14
mov r15, rax
je 0x18016a4c0
cmp byte [r13 + rbp], 0
js 0x18016a422
mov rax, rbp
neg rax
imul rax, rax, 0x68
mov r8, qword [rsi + rax]
mov r9, qword [rsi + rax + 0x10]
mov rcx, qword [rsp + 0x40]
mov rdx, qword [rsp + 0x28]
call fcn.18006f5d0
mov rcx, rax
and rcx, rbx
movdqu xmm0, xmmword [r12 + rcx]
pmovmskb edx, xmm0
test edx, edx
jne 0x18016a498
mov r8d, 0x10
nop dword [rax]
add rcx, r8
and rcx, rbx
movdqu xmm0, xmmword [r12 + rcx]
pmovmskb edx, xmm0
add r8, 0x10
test edx, edx
je 0x18016a480
tzcnt edx, edx
add rdx, rcx
and rdx, rbx
cmp byte [r12 + rdx], 0
js 0x18016a3b0
movdqa xmm0, xmmword [r12]
pmovmskb ecx, xmm0
tzcnt edx, ecx
jmp 0x18016a3b0
mov rax, qword [rsp + 0x38]
mov qword [rax], r12
mov qword [rax + 8], rbx
mov rcx, qword [rsp + 0x30]
mov qword [rax + 0x10], rcx
test rdi, rdi
movabs r12, 0x7ffffffffffffff0
jne 0x18016a4fe
jmp 0x18016ab6a
mov qword [rax], r12
mov qword [rax + 8], rbx
mov qword [rax + 0x10], r15
movabs r12, 0x7ffffffffffffff0
mov ecx, 0x68
mov rax, r14
mul rcx
add rax, 0xf
and rax, 0xfffffffffffffff0
add rdi, rax
cmp rdi, 0xffffffffffffffef
je 0x18016ab6a
sub r13, rax
mov rcx, qword [0x1801fa958]
xor edx, edx
mov r8, r13
call qword [sym.imp.kernel32.dll_HeapFree]
jmp 0x18016ab6a
movdqu xmm0, xmmword [rbx]
movdqu xmmword [rbx + r14], xmm0
mov rax, qword [r15]
mov rcx, qword [r15 + 8]
movabs rdx, 0x736f6d6570736575
xor rdx, rax
mov qword [rsp + 0x30], rdx
movabs rdx, 0x646f72616e646f6d
xor rdx, rcx
mov qword [rsp + 0x68], rdx
movabs rdx, 0x6c7967656e657261
xor rdx, rax
mov qword [rsp + 0x60], rdx
movabs rax, 0x7465646279746573
xor rax, rcx
mov qword [rsp + 0x58], rax
mov r12, rbx
xor r10d, r10d
jmp 0x18016a5c7
shr rax, 0x39
lea rcx, [r10 - 0x10]
and rcx, rdi
mov byte [rbx + r10], al
mov byte [rcx + rbx + 0x10], al
lea rax, [r10 + 1]
add r12, 0xffffffffffffff98
cmp r10, rdi
mov r10, rax
je 0x18016ab45
cmp byte [rbx + r10], 0x80
jne 0x18016a5b3
imul rax, r10, 0xffffffffffffff98
lea rcx, [rbx + rax]
add rcx, 0xffffffffffffff98
mov qword [rsp + 0x80], rcx
add rax, rbx
mov qword [rsp + 0x78], rax
mov rax, r10
not rax
imul rax, rax, 0x68
add rax, rbx
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x40], r10
mov rax, r10
neg rax
imul rax, rax, 0x68
add rax, rbx
add rax, 0xffffffffffffff98
mov qword [rsp + 0x28], rax
jmp 0x18016a6a1
mov r8, qword [rsp + 0x50]
movups xmm0, xmmword [r8]
movups xmm1, xmmword [rcx]
movups xmmword [r8], xmm1
movups xmmword [rcx], xmm0
movups xmm0, xmmword [r8 + 0x10]
movups xmm1, xmmword [rcx + 0x10]
movups xmmword [r8 + 0x10], xmm1
movups xmmword [rcx + 0x10], xmm0
movups xmm0, xmmword [r8 + 0x20]
movups xmm1, xmmword [rcx + 0x20]
movups xmmword [r8 + 0x20], xmm1
movups xmmword [rcx + 0x20], xmm0
movups xmm0, xmmword [r8 + 0x30]
movups xmm1, xmmword [rcx + 0x30]
movups xmmword [r8 + 0x30], xmm1
movups xmmword [rcx + 0x30], xmm0
movups xmm0, xmmword [r8 + 0x40]
movups xmm1, xmmword [rcx + 0x40]
movups xmmword [r8 + 0x40], xmm1
movups xmmword [rcx + 0x40], xmm0
movdqu xmm0, xmmword [r8 + 0x50]
movdqu xmm1, xmmword [rcx + 0x50]
movdqu xmmword [r8 + 0x50], xmm1
movdqu xmmword [rcx + 0x50], xmm0
mov rax, qword [r8 + 0x60]
mov rdx, qword [rcx + 0x60]
mov qword [r8 + 0x60], rdx
mov qword [rcx + 0x60], rax
mov rax, qword [rsp + 0x28]
mov r14, qword [rax]
mov rsi, qword [rax + 0x10]
mov edx, esi
and edx, 7
mov rax, rsi
and rax, 0xfffffffffffffff8
je 0x18016a740
mov r9, qword [rsp + 0x60]
mov r8, qword [rsp + 0x68]
mov r10, qword [rsp + 0x58]
xor r13d, r13d
mov r11, qword [rsp + 0x30]
nop word cs:[rax + rax]
add r11, r8
rol r8, 0xd
mov rcx, qword [r14 + r13]
xor r8, r11
rol r11, 0x20
xor r10, rcx
add r9, r10
rol r10, 0x10
xor r10, r9
add r11, r10
rol r10, 0x15
add r9, r8
rol r8, 0x11
xor r8, r9
rol r9, 0x20
xor r10, r11
xor r11, rcx
add r13, 8
cmp r13, rax
jb 0x18016a6e0
cmp edx, 3
jbe 0x18016a75c
mov r15d, dword [r14 + r13]
mov eax, 4
mov rcx, rax
or rcx, 1
cmp rcx, rdx
jb 0x18016a76d
jmp 0x18016a787
mov r10, qword [rsp + 0x58]
mov r8, qword [rsp + 0x68]
mov r9, qword [rsp + 0x60]
mov r11, qword [rsp + 0x30]
xor r13d, r13d
cmp edx, 3
ja 0x18016a728
xor r15d, r15d
xor eax, eax
mov rcx, rax
or rcx, 1
cmp rcx, rdx
jae 0x18016a787
lea rcx, [rax + r13]
movzx ebp, word [r14 + rcx]
lea ecx, [rax*8]
shl rbp, cl
or r15, rbp
or rax, 2
cmp rax, rdx
jae 0x18016a7b0
add r13, rax
movzx r14d, byte [r14 + r13]
shl eax, 3
mov ecx, eax
shl r14, cl
or r15, r14
jmp 0x18016a7b5
test rdx, rdx
je 0x18016a812
lea ecx, [rdx*8]
mov r14d, 0xff
shl r14, cl
or r14, r15
cmp rdx, 7
jne 0x18016a8f1
mov ecx, 8
add r11, r8
rol r8, 0xd
sub rcx, rdx
xor r8, r11
rol r11, 0x20
xor r10, r14
add r9, r10
rol r10, 0x10
xor r10, r9
add r11, r10
rol r10, 0x15
xor r10, r11
add r9, r8
rol r8, 0x11
xor r8, r9
rol r9, 0x20
xor r11, r14
jmp 0x18016a814
xor ecx, ecx
mov edx, 1
sub rdx, rcx
mov eax, edx
and eax, 7
and rdx, 0xfffffffffffffff8
cmp rcx, rdx
jae 0x18016a8a0
nop word [rax + rax]
add r11, r8
rol r8, 0xd
mov r14, r10
xor r8, r11
rol r11, 0x20
xor r14, 0xff
add r9, r14
shld r14, r10, 0x10
xor r14, r9
add r11, r14
rol r14, 0x15
add r9, r8
rol r8, 0x11
mov r10, r14
xor r8, r9
rol r9, 0x20
xor r10, r11
xor r11, 0xff
add rcx, 8
cmp rcx, rdx
jb 0x18016a830
xor edx, edx
cmp rax, 4
setae dl
cmp eax, 4
mov r14d, 0
mov ecx, 0xff
cmovae r14, rcx
shl rdx, 2
jmp 0x18016a8a5
xor r14d, r14d
xor edx, edx
mov r15, rdx
lea ecx, [rdx*8]
mov r13d, 0xff
shl r13, cl
or r15, 1
mov rbp, rdx
or rbp, 2
cmp r15, rax
mov r15d, 0
cmovae r13, r15
cmovae rbp, rdx
or r13, r14
lea ecx, [rbp*8]
mov r14d, 0xff
shl r14, cl
cmp rbp, rax
cmovae r14, r15
or r14, r13
shl rsi, 0x38
movabs rax, 0x100000000000000
add rsi, rax
add r11, r8
rol r8, 0xd
or rsi, r14
xor r8, r11
rol r11, 0x20
xor r10, rsi
add r9, r10
rol r10, 0x10
xor r10, r9
add r11, r10
rol r10, 0x15
add r9, r8
rol r8, 0x11
xor r10, r11
xor r8, r9
rol r9, 0x20
xor r11, rsi
add r11, r8
rol r8, 0xd
xor r8, r11
rol r11, 0x20
xor r9, 0xff
add r9, r10
rol r10, 0x10
xor r10, r9
add r11, r10
rol r10, 0x15
add r9, r8
rol r8, 0x11
xor r8, r9
rol r9, 0x20
xor r10, r11
add r11, r8
rol r8, 0xd
xor r8, r11
rol r11, 0x20
add r9, r10
rol r10, 0x10
xor r10, r9
add r11, r10
rol r10, 0x15
add r9, r8
rol r8, 0x11
xor r8, r9
rol r9, 0x20
xor r10, r11
add r11, r8
rol r8, 0xd
add r9, r10
rol r10, 0x10
xor r10, r9
rol r10, 0x15
xor r8, r11
add r9, r8
rol r8, 0x11
mov rax, r9
rol rax, 0x20
xor rax, r8
xor rax, r10
xor rax, r9
mov rcx, rdi
and rcx, rax
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
mov r8, rcx
test edx, edx
mov r10, qword [rsp + 0x40]
jne 0x18016aa18
mov r9d, 0x10
mov r8, rcx
nop word cs:[rax + rax]
add r8, r9
and r8, rdi
movdqu xmm0, xmmword [rbx + r8]
pmovmskb edx, xmm0
add r9, 0x10
test edx, edx
je 0x18016aa00
tzcnt edx, edx
add rdx, r8
and rdx, rdi
cmp byte [rbx + rdx], 0
js 0x18016aa34
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, rdi
cmp r9, 0x10
jb 0x18016a5a0
mov rcx, rdx
not rcx
imul rcx, rcx, 0x68
add rcx, rbx
movzx r8d, byte [rbx + rdx]
shr rax, 0x39
lea r9, [rdx - 0x10]
and r9, rdi
mov byte [rbx + rdx], al
mov byte [r9 + rbx + 0x10], al
cmp r8b, 0xff
je 0x18016aaf0
imul rax, rdx, 0xffffffffffffff98
add rax, rbx
cmp qword [rsp + 0x80], rax
jae 0x18016a620
cmp rcx, qword [rsp + 0x78]
jae 0x18016a620
mov rcx, 0xffffffffffffff98
nop word cs:[rax + rax]
movzx edx, byte [r12 + rcx]
movzx r8d, byte [rax + rcx]
mov byte [r12 + rcx], r8b
mov byte [rax + rcx], dl
movzx edx, byte [r12 + rcx + 1]
movzx r8d, byte [rax + rcx + 1]
mov byte [r12 + rcx + 1], r8b
mov byte [rax + rcx + 1], dl
add rcx, 2
jne 0x18016aab0
jmp 0x18016a6a1
lea rax, [r10 - 0x10]
and rax, rdi
mov byte [rbx + r10], 0xff
mov byte [rax + rbx + 0x10], 0xff
mov rdx, qword [rsp + 0x50]
mov rax, qword [rdx + 0x60]
mov qword [rcx + 0x60], rax
movups xmm0, xmmword [rdx + 0x50]
movups xmmword [rcx + 0x50], xmm0
movups xmm0, xmmword [rdx + 0x40]
movups xmmword [rcx + 0x40], xmm0
movdqu xmm0, xmmword [rdx]
movdqu xmm1, xmmword [rdx + 0x10]
movups xmm2, xmmword [rdx + 0x20]
movups xmm3, xmmword [rdx + 0x30]
movups xmmword [rcx + 0x30], xmm3
movups xmmword [rcx + 0x20], xmm2
movdqu xmmword [rcx + 0x10], xmm1
movdqu xmmword [rcx], xmm0
jmp 0x18016a5b3
cmp rdi, 8
mov rcx, qword [rsp + 0x70]
cmovb rcx, rdi
movabs r12, 0x7ffffffffffffff0
sub rcx, qword [rsp + 0x48]
mov rax, qword [rsp + 0x38]
mov qword [rax + 0x10], rcx
add r12, 0x11
mov rax, r12
add rsp, 0x88
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
ud2