Function at 0x18018b010
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 rax, qword [rcx + 0x18]
mov qword [rsp + 0x40], rax
inc rax
je 0x18018b971
mov r15, rdx
mov rbx, rcx
mov rdi, qword [rcx + 8]
lea r8, [rdi + 1]
mov rcx, r8
shr rcx, 3
mov rdx, r8
and rdx, 0xfffffffffffffff8
sub rdx, rcx
cmp rdi, 8
mov qword [rsp + 0x48], rdx
mov rcx, rdx
cmovb rcx, rdi
movabs r9, 0x7ffffffffffffff0
mov rdx, rcx
shr rdx, 1
cmp rax, rdx
jbe 0x18018b0a5
inc rcx
cmp rax, rcx
cmova rcx, rax
cmp rcx, 8
mov qword [rsp + 0x20], r8
jae 0x18018b118
xor eax, eax
cmp rcx, 4
setae al
lea r14, [rax*4 + 4]
jmp 0x18018b168
mov qword [rsp + 0x30], rbx
mov rbx, qword [rbx]
test r8, r8
je 0x18018b1e0
pxor xmm0, xmm0
pcmpgtb xmm0, xmmword [rbx]
por xmm0, xmmword [0x18018c840]
movdqa xmmword [rbx], xmm0
cmp r8, 0x11
jb 0x18018b0fd
mov eax, 0x10
movdqa xmm0, xmmword [0x18018c840]
nop dword [rax]
pxor xmm1, xmm1
pcmpgtb xmm1, xmmword [rbx + rax]
por xmm1, xmm0
movdqa xmmword [rbx + rax], xmm1
add rax, 0x10
jb 0x18018b0fd
cmp rax, r8
jb 0x18018b0e0
cmp r8, 0x10
jae 0x18018b3ba
lea rcx, [rbx + 0x10]
mov rdx, rbx
call fcn.180171d20
jmp 0x18018b3c4
mov rax, rcx
shr rax, 0x3d
jne 0x18018b971
shl rcx, 3
mov r14d, 1
cmp rcx, 0xe
jb 0x18018b168
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 r14, 0xffffffffffffffff
shr r14, cl
inc r14
mov ecx, 0x28
mov rax, r14
mul rcx
jo 0x18018b971
mov rsi, rax
add rsi, 0xf
and rsi, 0xfffffffffffffff0
lea rbp, [r14 + 0x10]
mov r13, rsi
add r13, rbp
jb 0x18018b971
cmp r13, r9
ja 0x18018b971
test r13, r13
je 0x18018b1f3
mov rcx, qword [0x18021a960]
test rcx, rcx
jne 0x18018b1c3
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x18018b1d6
mov rcx, rax
mov qword [0x18021a960], rax
xor edx, edx
mov r8, r13
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov r12, rax
test rax, rax
jne 0x18018b1f9
mov rcx, r13
call fcn.18004ca00
ud2
lea rcx, [rbx + 0x10]
mov rdx, rbx
call fcn.180171d20
xor ecx, ecx
jmp 0x18018b941
mov r12d, 0x10
mov qword [rsp + 0x28], r15
mov r15, r14
dec r14
mov rax, r15
shr rax, 3
and r15, 0xfffffffffffffff8
sub r15, rax
cmp r14, 8
cmovb r15, r14
add r12, rsi
mov rcx, r12
mov dl, 0xff
mov r8, rbp
call fcn.1801723c0
sub r15, qword [rsp + 0x40]
mov r13, qword [rbx]
mov rax, qword [rsp + 0x20]
test rax, rax
je 0x18018b36e
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], rbx
lea rsi, [r13 - 0x28]
mov rax, qword [rsp + 0x28]
mov rbp, qword [rax]
mov r15, qword [rax + 8]
xor ebx, ebx
jmp 0x18018b2c1
shr rax, 0x39
lea rcx, [rdx - 0x10]
and rcx, r14
mov byte [r12 + rdx], al
mov byte [rcx + r12 + 0x10], al
lea rax, [rbx*8]
lea rax, [rax + rax*4]
mov rcx, r13
sub rcx, rax
shl rdx, 3
lea rax, [rdx + rdx*4]
mov rdx, r12
sub rdx, rax
neg rax
movdqu xmm0, xmmword [rcx - 0x28]
movdqu xmm1, xmmword [rcx - 0x18]
movdqu xmmword [r12 + rax - 0x28], xmm0
mov rax, qword [rcx - 8]
mov qword [rdx - 8], rax
movdqu xmmword [rdx - 0x18], xmm1
lea rax, [rbx + 1]
cmp rbx, rdi
mov rbx, rax
je 0x18018b340
cmp byte [r13 + rbx], 0
js 0x18018b2b5
mov rax, rbx
neg rax
lea rax, [rax + rax*4]
lea r8, [rsi + rax*8]
mov rcx, rbp
mov rdx, r15
call fcn.1801358c0
mov rcx, rax
and rcx, r14
movdqu xmm0, xmmword [r12 + rcx]
pmovmskb edx, xmm0
test edx, edx
jne 0x18018b318
mov r8d, 0x10
nop dword [rax]
add rcx, r8
and rcx, r14
movdqu xmm0, xmmword [r12 + rcx]
pmovmskb edx, xmm0
add r8, 0x10
test edx, edx
je 0x18018b300
tzcnt edx, edx
add rdx, rcx
and rdx, r14
cmp byte [r12 + rdx], 0
js 0x18018b260
movdqa xmm0, xmmword [r12]
pmovmskb ecx, xmm0
tzcnt edx, ecx
jmp 0x18018b260
mov rax, qword [rsp + 0x30]
mov qword [rax], r12
mov qword [rax + 8], r14
mov rcx, qword [rsp + 0x38]
mov qword [rax + 0x10], rcx
test rdi, rdi
movabs rsi, 0x7ffffffffffffff0
mov rax, qword [rsp + 0x20]
jne 0x18018b383
jmp 0x18018b959
mov qword [rbx], r12
mov qword [rbx + 8], r14
mov qword [rbx + 0x10], r15
movabs rsi, 0x7ffffffffffffff0
mov ecx, 0x28
mul rcx
add rax, 0xf
and rax, 0xfffffffffffffff0
add rdi, rax
cmp rdi, 0xffffffffffffffef
je 0x18018b959
sub r13, rax
mov rcx, qword [0x18021a960]
xor edx, edx
mov r8, r13
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18018b959
movdqu xmm0, xmmword [rbx]
movdqu xmmword [rbx + r8], xmm0
mov rax, qword [r15]
mov rcx, qword [r15 + 8]
movabs rdx, 0x736f6d6570736575
xor rdx, rax
movabs r8, 0x646f72616e646f6d
mov qword [rsp + 0x38], rcx
xor r8, rcx
add rdx, r8
rol r8, 0xd
movabs rcx, 0x6c7967656e657261
xor r8, rdx
rol rdx, 0x20
mov qword [rsp + 0x70], rdx
xor rcx, rax
mov qword [rsp + 0x60], rcx
mov qword [rsp + 0x68], r8
rol r8, 0x11
mov qword [rsp + 0x58], r8
xor ebp, ebp
jmp 0x18018b452
shr rax, 0x39
lea rcx, [rbp - 0x10]
and rcx, rdi
mov byte [rbx + rbp], al
mov byte [rcx + rbx + 0x10], al
lea rax, [rbp + 1]
cmp rbp, rdi
mov rbp, rax
je 0x18018b934
cmp byte [rbx + rbp], 0x80
jne 0x18018b442
mov rax, rbp
not rax
lea rax, [rax + rax*4]
lea rax, [rbx + rax*8]
mov qword [rsp + 0x28], rax
mov rax, rbp
neg rax
lea rax, [rax + rax*4]
lea rsi, [rbx + rax*8]
add rsi, 0xffffffffffffffd8
mov qword [rsp + 0x50], rbp
mov qword [rsp + 0x20], rsi
mov r11, qword [rsi]
mov r8, qword [rsi + 0x10]
test r11, r11
jne 0x18018b4a4
nop word cs:[rax + rax]
mov r11, qword [rsi + 8]
mov rdx, qword [rsp + 0x38]
xor rdx, r8
movabs rax, 0x7465646279746573
xor rdx, rax
mov rax, qword [rsp + 0x60]
lea r15, [rdx + rax]
rol rdx, 0x10
xor rdx, r15
mov rax, qword [rsp + 0x70]
lea r14, [rdx + rax]
add r15, qword [rsp + 0x68]
mov r12, r15
rol r12, 0x20
xor r15, qword [rsp + 0x58]
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 0x18018b543
add r14, r15
rol r15, 0xd
mov rcx, qword [r11 + r9]
xor r15, r14
rol r14, 0x20
xor rdx, rcx
add r12, rdx
rol rdx, 0x10
xor rdx, r12
add r14, rdx
rol rdx, 0x15
add r12, r15
rol r15, 0x11
xor r15, r12
rol r12, 0x20
xor rdx, r14
xor r14, rcx
add r9, 8
cmp r9, rax
jb 0x18018b500
cmp r10d, 3
jbe 0x18018b560
mov r13d, dword [r11 + r9]
mov eax, 4
mov rcx, rax
or rcx, 1
cmp rcx, r10
jb 0x18018b571
jmp 0x18018b590
xor r13d, r13d
xor eax, eax
mov rcx, rax
or rcx, 1
cmp rcx, r10
jae 0x18018b590
lea rcx, [rax + r9]
movzx esi, word [r11 + rcx]
lea ecx, [rax*8]
shl rsi, cl
or r13, rsi
mov rsi, qword [rsp + 0x20]
or rax, 2
cmp rax, r10
jae 0x18018b5b0
add r9, rax
movzx r9d, byte [r11 + r9]
shl eax, 3
mov ecx, eax
shl r9, cl
or r13, r9
movzx r9d, byte [rsi + 0x18]
jmp 0x18018b5ba
movzx r9d, byte [rsi + 0x18]
test r10, r10
je 0x18018b620
movzx eax, r9b
lea ecx, [r10*8]
shl rax, cl
or rax, r13
cmp r10, 7
jne 0x18018b702
mov ecx, 8
add r14, r15
rol r15, 0xd
sub rcx, r10
xor r15, r14
rol r14, 0x20
xor rdx, rax
add r12, rdx
rol rdx, 0x10
xor rdx, r12
add r14, rdx
rol rdx, 0x15
xor rdx, r14
add r12, r15
rol r15, 0x11
xor r15, r12
rol r12, 0x20
xor r14, rax
jmp 0x18018b622
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 0x18018b6b0
nop
add r14, r15
rol r15, 0xd
mov r9, rdx
xor r15, r14
rol r14, 0x20
xor r9, rax
add r12, r9
shld r9, rdx, 0x10
xor r9, r12
add r14, r9
rol r9, 0x15
add r12, r15
rol r15, 0x11
mov rdx, r9
xor r15, r12
rol r12, 0x20
xor rdx, r14
xor r14, rax
add rcx, 8
cmp rcx, r11
jb 0x18018b640
xor ebp, ebp
cmp r10, 4
setae bpl
cmp r10d, 4
mov r11d, 0
cmovae r11, rax
shl rbp, 2
jmp 0x18018b6b5
xor r11d, r11d
xor ebp, ebp
mov rsi, rbp
or rsi, 1
lea ecx, [rbp*8]
mov r13, rax
shl r13, cl
mov r9, rbp
or r9, 2
cmp rsi, r10
mov esi, 0
cmovae r13, rsi
cmovae r9, rbp
or r13, r11
lea ecx, [r9*8]
shl rax, cl
cmp r9, r10
cmovae rax, rsi
or rax, r13
mov rbp, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x20]
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 r12, rdx
rol rdx, 0x10
xor rdx, r12
add r14, rdx
rol rdx, 0x15
add r12, r15
rol r15, 0x11
xor rdx, r14
xor r15, r12
rol r12, 0x20
xor r14, r8
add r14, r15
rol r15, 0xd
xor r15, r14
rol r14, 0x20
xor r12, 0xff
add r12, rdx
rol rdx, 0x10
xor rdx, r12
add r14, rdx
rol rdx, 0x15
add r12, r15
rol r15, 0x11
xor r15, r12
rol r12, 0x20
xor rdx, r14
add r14, r15
rol r15, 0xd
xor r15, r14
rol r14, 0x20
add r12, rdx
rol rdx, 0x10
xor rdx, r12
add r14, rdx
rol rdx, 0x15
add r12, r15
rol r15, 0x11
xor r15, r12
rol r12, 0x20
xor rdx, r14
add r14, r15
rol r15, 0xd
add r12, rdx
rol rdx, 0x10
xor rdx, r12
rol rdx, 0x15
xor r15, r14
add r12, r15
rol r15, 0x11
mov rax, r12
rol rax, 0x20
xor rax, r15
xor rax, rdx
xor rax, r12
mov rcx, rdi
and rcx, rax
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
mov r8, rcx
test edx, edx
jne 0x18018b828
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 0x18018b810
tzcnt edx, edx
add rdx, r8
and rdx, rdi
cmp byte [rbx + rdx], 0
js 0x18018b844
movdqa xmm0, xmmword [rbx]
pmovmskb edx, xmm0
tzcnt edx, edx
mov r8, rbp
sub r8, rcx
mov r9, rdx
sub r9, rcx
xor r9, r8
and r9, rdi
cmp r9, 0x10
jb 0x18018b430
mov rcx, rdx
not rcx
lea rcx, [rcx + rcx*4]
lea rcx, [rbx + rcx*8]
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 0x18018b900
mov r8, qword [rsp + 0x28]
mov rax, qword [r8]
mov rdx, qword [rcx]
mov qword [r8], rdx
mov qword [rcx], rax
mov rax, qword [r8 + 8]
mov rdx, qword [rcx + 8]
mov qword [r8 + 8], rdx
mov qword [rcx + 8], rax
mov rax, qword [r8 + 0x10]
mov rdx, qword [rcx + 0x10]
mov qword [r8 + 0x10], rdx
mov qword [rcx + 0x10], rax
mov rax, qword [r8 + 0x18]
mov rdx, qword [rcx + 0x18]
mov qword [r8 + 0x18], rdx
mov qword [rcx + 0x18], rax
mov rax, qword [r8 + 0x20]
mov rdx, qword [rcx + 0x20]
mov qword [r8 + 0x20], rdx
mov qword [rcx + 0x20], rax
mov r11, qword [rsi]
mov r8, qword [rsi + 0x10]
test r11, r11
je 0x18018b4a0
jmp 0x18018b4a4
lea rax, [rbp - 0x10]
and rax, rdi
mov byte [rbx + rbp], 0xff
mov byte [rax + rbx + 0x10], 0xff
mov rdx, qword [rsp + 0x28]
mov rax, qword [rdx + 0x20]
mov qword [rcx + 0x20], rax
movdqu xmm0, xmmword [rdx]
movdqu xmm1, xmmword [rdx + 0x10]
movdqu xmmword [rcx + 0x10], xmm1
movdqu xmmword [rcx], xmm0
jmp 0x18018b442
cmp rdi, 8
mov rcx, qword [rsp + 0x48]
cmovb rcx, rdi
sub rcx, qword [rsp + 0x40]
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