Function at 0x18017d780
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 0x18017e098
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 0x18017d809
inc rcx
cmp rax, rcx
cmova rcx, rax
cmp rcx, 8
jae 0x18017d888
xor eax, eax
cmp rcx, 4
setae al
lea rdx, [rax*4 + 4]
jmp 0x18017d8ea
mov qword [rsp + 0x60], r11
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x40], r9
mov rbx, qword [r9]
test r8, r8
je 0x18017d95d
pxor xmm0, xmm0
pcmpgtb xmm0, xmmword [rbx]
por xmm0, xmmword [0x18018b840]
movdqa xmmword [rbx], xmm0
cmp r8, 0x11
jb 0x18017d86d
mov eax, 0x10
movdqa xmm0, xmmword [0x18018b840]
nop dword [rax + rax]
pxor xmm1, xmm1
pcmpgtb xmm1, xmmword [rbx + rax]
por xmm1, xmm0
movdqa xmmword [rbx + rax], xmm1
add rax, 0x10
jb 0x18017d86d
cmp rax, r8
jb 0x18017d850
cmp r8, 0x10
jae 0x18017db2b
lea rcx, [rbx + 0x10]
mov rdx, rbx
call fcn.180170ea0
jmp 0x18017db35
mov rax, rcx
shr rax, 0x3d
jne 0x18017e098
shl rcx, 3
mov edx, 1
cmp rcx, 0xe
jb 0x18017d8ea
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 0x18017e098
mov rsi, rdx
shl rsi, 5
lea r12, [rdx + 0x10]
mov r13, rsi
add r13, r12
jb 0x18017e098
cmp r13, rdi
ja 0x18017e098
mov qword [rsp + 0x30], r14
mov qword [rsp + 0x38], r8
mov rdi, rdx
mov r14, r9
test r13, r13
je 0x18017d970
mov rcx, qword [0x180219958]
test rcx, rcx
jne 0x18017d940
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x18017d953
mov rcx, rax
mov qword [0x180219958], rax
xor edx, edx
mov r8, r13
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
jne 0x18017d975
mov rcx, r13
call fcn.18004c6e0
ud2
lea rcx, [rbx + 0x10]
mov rdx, rbx
call fcn.180170ea0
xor ecx, ecx
jmp 0x18017e068
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.180171550
sub r13, r15
mov r12, qword [r14]
mov rax, qword [rsp + 0x38]
test rax, rax
je 0x18017daeb
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x40], r14
lea rax, [r12 - 0x20]
mov qword [rsp + 0x48], rax
mov rax, qword [rsp + 0x30]
mov r13, qword [rax]
mov r15, qword [rax + 8]
xor esi, esi
jmp 0x18017da2a
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 0x18017daac
cmp byte [r12 + rsi], 0
js 0x18017da1a
mov r14, rsi
shl r14, 5
mov rax, qword [rsp + 0x48]
sub rax, r14
mov r8, qword [rax]
mov r9, qword [rax + 0x10]
mov rcx, r13
mov rdx, r15
call fcn.18007a6a0
mov rcx, rax
and rcx, rdi
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
test edx, edx
jne 0x18017da87
mov r8d, 0x10
nop dword [rax + rax]
add rcx, r8
and rcx, rdi
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
add r8, 0x10
test edx, edx
je 0x18017da70
tzcnt edx, edx
add rdx, rcx
and rdx, rdi
cmp byte [rbx + rdx], 0
js 0x18017d9e0
movdqa xmm0, xmmword [rbx]
pmovmskb ecx, xmm0
tzcnt edx, ecx
jmp 0x18017d9e0
mov rax, qword [rsp + 0x40]
mov qword [rax], rbx
mov qword [rax + 8], rdi
mov rcx, qword [rsp + 0x28]
mov qword [rax + 0x10], rcx
test rbp, rbp
movabs rsi, 0x7ffffffffffffff0
mov rax, qword [rsp + 0x38]
je 0x18017e080
shl rax, 5
add rbp, rax
cmp rbp, 0xffffffffffffffef
jne 0x18017db11
jmp 0x18017e080
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 0x18017e080
sub r12, rax
mov rcx, qword [0x180219958]
xor edx, edx
mov r8, r12
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18017e080
movdqu xmm0, xmmword [rbx]
movdqu xmmword [rbx + r8], xmm0
mov rax, qword [r14]
mov rcx, qword [r14 + 8]
movabs rdx, 0x736f6d6570736575
xor rdx, rax
mov qword [rsp + 0x30], rdx
movabs rdx, 0x646f72616e646f6d
xor rdx, rcx
mov qword [rsp + 0x28], rdx
movabs rdx, 0x6c7967656e657261
xor rdx, rax
mov qword [rsp + 0x58], rdx
movabs rax, 0x7465646279746573
xor rax, rcx
mov qword [rsp + 0x50], rax
xor r10d, r10d
jmp 0x18017dbb3
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 0x18017e05b
cmp byte [rbx + r10], 0x80
jne 0x18017dba3
mov r13, r10
not r13
shl r13, 5
add r13, rbx
mov qword [rsp + 0x48], r10
mov rax, r10
shl rax, 5
mov rcx, rbx
sub rcx, rax
mov qword [rsp + 0x70], rcx
neg rax
add rax, rbx
add rax, 0xffffffffffffffe0
mov qword [rsp + 0x38], rax
jmp 0x18017dc10
movdqu xmm1, xmmword [r13 + 0x10]
movups xmm2, xmmword [rcx]
movups xmm3, xmmword [rcx + 0x10]
movups xmmword [r13], xmm2
movups xmmword [r13 + 0x10], xmm3
movdqu xmmword [rcx], xmm0
movdqu xmmword [rcx + 0x10], xmm1
mov rax, qword [rsp + 0x38]
mov r14, qword [rax]
mov r15, qword [rax + 0x10]
mov edi, r15d
and edi, 7
mov rax, r15
and rax, 0xfffffffffffffff8
je 0x18017dcb0
mov r9, qword [rsp + 0x58]
mov r8, qword [rsp + 0x28]
mov r10, qword [rsp + 0x50]
xor r11d, r11d
mov rdx, qword [rsp + 0x30]
nop word cs:[rax + rax]
add rdx, r8
rol r8, 0xd
mov rcx, qword [r14 + r11]
xor r8, rdx
rol rdx, 0x20
xor r10, rcx
add r9, r10
rol r10, 0x10
xor r10, r9
add rdx, r10
rol r10, 0x15
add r9, r8
rol r8, 0x11
xor r8, r9
rol r9, 0x20
xor r10, rdx
xor rdx, rcx
add r11, 8
cmp r11, rax
jb 0x18017dc50
cmp edi, 3
jbe 0x18017dccc
mov esi, dword [r14 + r11]
mov eax, 4
mov rcx, rax
or rcx, 1
cmp rcx, rdi
jb 0x18017dcdc
jmp 0x18017dcf6
mov r10, qword [rsp + 0x50]
mov r8, qword [rsp + 0x28]
mov r9, qword [rsp + 0x58]
mov rdx, qword [rsp + 0x30]
xor r11d, r11d
cmp edi, 3
ja 0x18017dc98
xor esi, esi
xor eax, eax
mov rcx, rax
or rcx, 1
cmp rcx, rdi
jae 0x18017dcf6
lea rcx, [rax + r11]
movzx r12d, word [r14 + rcx]
lea ecx, [rax*8]
shl r12, cl
or rsi, r12
or rax, 2
cmp rax, rdi
jae 0x18017dd10
add r11, rax
movzx r11d, byte [r14 + r11]
shl eax, 3
mov ecx, eax
shl r11, cl
or rsi, r11
jmp 0x18017dd15
test rdi, rdi
je 0x18017dd72
lea ecx, [rdi*8]
mov r11d, 0xff
shl r11, cl
or r11, rsi
cmp rdi, 7
jne 0x18017de52
mov ecx, 8
add rdx, r8
rol r8, 0xd
sub rcx, rdi
xor r8, rdx
rol rdx, 0x20
xor r10, r11
add r9, r10
rol r10, 0x10
xor r10, r9
add rdx, r10
rol r10, 0x15
xor r10, rdx
add r9, r8
rol r8, 0x11
xor r8, r9
rol r9, 0x20
xor rdx, r11
jmp 0x18017dd74
xor ecx, ecx
mov r11d, 1
sub r11, rcx
mov eax, r11d
and eax, 7
and r11, 0xfffffffffffffff8
cmp rcx, r11
jae 0x18017de00
nop dword [rax]
add rdx, r8
rol r8, 0xd
mov rsi, r10
xor r8, rdx
rol rdx, 0x20
xor rsi, 0xff
add r9, rsi
shld rsi, r10, 0x10
xor rsi, r9
add rdx, rsi
rol rsi, 0x15
add r9, r8
rol r8, 0x11
mov r10, rsi
xor r8, r9
rol r9, 0x20
xor r10, rdx
xor rdx, 0xff
add rcx, 8
cmp rcx, r11
jb 0x18017dd90
xor r11d, r11d
cmp rax, 4
setae r11b
cmp eax, 4
mov esi, 0
mov ecx, 0xff
cmovae rsi, rcx
shl r11, 2
jmp 0x18017de05
xor esi, esi
xor r11d, r11d
mov rdi, r11
lea ecx, [r11*8]
mov r14d, 0xff
shl r14, cl
or rdi, 1
mov r12, r11
or r12, 2
cmp rdi, rax
mov edi, 0
cmovae r14, rdi
cmovae r12, r11
or r14, rsi
lea ecx, [r12*8]
mov r11d, 0xff
shl r11, cl
cmp r12, rax
cmovae r11, rdi
or r11, r14
shl r15, 0x38
movabs rax, 0x100000000000000
add r15, rax
add rdx, r8
rol r8, 0xd
or r15, r11
xor r8, rdx
rol rdx, 0x20
xor r10, r15
add r9, r10
rol r10, 0x10
xor r10, r9
add rdx, r10
rol r10, 0x15
add r9, r8
rol r8, 0x11
xor r10, rdx
xor r8, r9
rol r9, 0x20
xor rdx, r15
add rdx, r8
rol r8, 0xd
xor r8, rdx
rol rdx, 0x20
xor r9, 0xff
add r9, r10
rol r10, 0x10
xor r10, r9
add rdx, r10
rol r10, 0x15
add r9, r8
rol r8, 0x11
xor r8, r9
rol r9, 0x20
xor r10, rdx
add rdx, r8
rol r8, 0xd
xor r8, rdx
rol rdx, 0x20
add r9, r10
rol r10, 0x10
xor r10, r9
add rdx, r10
rol r10, 0x15
add r9, r8
rol r8, 0x11
xor r8, r9
rol r9, 0x20
xor r10, rdx
add rdx, r8
rol r8, 0xd
add r9, r10
rol r10, 0x10
xor r10, r9
rol r10, 0x15
xor r8, rdx
add r9, r8
rol r8, 0x11
mov rax, r9
rol rax, 0x20
xor rax, r8
xor rax, r10
xor rax, r9
mov rcx, rbp
and rcx, rax
movdqu xmm0, xmmword [rbx + rcx]
pmovmskb edx, xmm0
mov r8, rcx
test edx, edx
mov r10, qword [rsp + 0x48]
jne 0x18017df78
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 0x18017df60
tzcnt edx, edx
add rdx, r8
and rdx, rbp
cmp byte [rbx + rdx], 0
js 0x18017df94
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 0x18017db90
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 0x18017e030
shl rdx, 5
mov rax, rbx
sub rax, rdx
movdqu xmm0, xmmword [r13]
cmp r13, rax
jae 0x18017dbf0
cmp rcx, qword [rsp + 0x70]
jae 0x18017dbf0
movups xmm1, xmmword [rcx]
movups xmmword [r13], xmm1
movdqu xmmword [rcx], xmm0
movdqu xmm0, xmmword [r13 + 0x10]
movdqu xmm1, xmmword [rcx + 0x10]
movdqu xmmword [r13 + 0x10], xmm1
movdqu xmmword [rcx + 0x10], xmm0
jmp 0x18017dc10
lea rax, [r10 - 0x10]
and rax, rbp
mov byte [rbx + r10], 0xff
mov byte [rax + rbx + 0x10], 0xff
movdqu xmm0, xmmword [r13]
movdqu xmm1, xmmword [r13 + 0x10]
movdqu xmmword [rcx + 0x10], xmm1
movdqu xmmword [rcx], xmm0
jmp 0x18017dba3
cmp rbp, 8
mov rcx, qword [rsp + 0x60]
cmovb rcx, rbp
sub rcx, qword [rsp + 0x68]
mov rax, qword [rsp + 0x40]
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