Function at 0x180059a50
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
movaps xmmword [rsp + 0x60], xmm6
mov r13, qword [rcx + 0x18]
mov rax, r13
inc rax
je 0x18005a644
mov rbp, rdx
mov r9, rcx
mov r12, qword [rcx + 8]
lea r8, [r12 + 1]
mov rdx, r8
shr rdx, 3
mov rcx, r8
and rcx, 0xfffffffffffffff8
sub rcx, rdx
cmp r12, 8
cmovb rcx, r12
mov rdx, rcx
shr rdx, 1
cmp rax, rdx
mov qword [rsp + 0x30], r9
jbe 0x180059ad3
inc rcx
cmp rax, rcx
cmova rcx, rax
cmp rcx, 8
jae 0x180059b00
xor eax, eax
cmp rcx, 4
setae al
lea rsi, [rax*4 + 4]
jmp 0x180059b62
mov rdi, qword [r9]
mov rcx, r8
shr rcx, 4
xor eax, eax
test r8b, 0xf
setne al
add rax, rcx
je 0x180059e1a
cmp rax, 1
jne 0x180059daa
xor ecx, ecx
jmp 0x180059e04
mov rax, rcx
shr rax, 0x3d
jne 0x18005a644
shl rcx, 3
mov esi, 1
cmp rcx, 0xe
jb 0x180059b62
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 rsi, 0xffffffffffffffff
shr rsi, cl
movabs rax, 0x7fffffffffffffe
cmp rsi, rax
ja 0x18005a644
inc rsi
mov rbx, rsi
shl rbx, 5
lea r14, [rsi + 0x10]
mov r15, rbx
add r15, r14
jb 0x18005a644
movabs rax, 0x7ffffffffffffff1
cmp r15, rax
jae 0x18005a644
test r15, r15
je 0x180059bd4
movzx eax, byte [0x18366efb0]
mov rcx, qword [0x18366ef48]
test rcx, rcx
jne 0x180059bb9
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
test rax, rax
je 0x180059bcc
mov rcx, rax
mov qword [0x18366ef48], rax
xor edx, edx
mov r8, r15
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rdi, rax
test rax, rax
jne 0x180059bd9
mov rcx, r15
call fcn.18000d9b0
mov edi, 0x10
lea r15, [rsi - 1]
mov rax, rsi
shr rax, 3
mov rcx, rsi
and rcx, 0xfffffffffffffff8
sub rcx, rax
cmp rsi, 9
cmovb rcx, r15
mov qword [rsp + 0x48], rcx
add rdi, rbx
mov rcx, rdi
mov dl, 0xff
mov r8, r14
call sub.VCRUNTIME140.dll_memset
mov r9, qword [rsp + 0x30]
mov rax, qword [r9]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x38], r13
test r13, r13
je 0x180059d51
mov r14, qword [rsp + 0x28]
lea rax, [r14 - 0x20]
mov qword [rsp + 0x40], rax
movdqa xmm0, xmmword [r14]
pmovmskb ebx, xmm0
not ebx
movups xmm6, xmmword [rbp]
xor ebp, ebp
mov r13, qword [rsp + 0x38]
jmp 0x180059ca1
lea ecx, [rbx - 1]
and ecx, ebx
dec r13
shr rax, 0x39
lea r8, [rdx - 0x10]
and r8, r15
mov byte [rdi + rdx], al
mov byte [r8 + rdi + 0x10], al
mov rax, qword [rsp + 0x28]
sub rax, rsi
shl rdx, 5
mov r8, rdi
sub r8, rdx
neg rdx
movdqu xmm0, xmmword [rax - 0x20]
movdqu xmm1, xmmword [rax - 0x10]
movdqu xmmword [rdi + rdx - 0x20], xmm0
movdqu xmmword [r8 - 0x10], xmm1
mov ebx, ecx
test r13, r13
je 0x180059d51
test bx, bx
jne 0x180059ccc
nop word cs:[rax + rax]
movdqa xmm0, xmmword [r14 + 0x10]
add r14, 0x10
pmovmskb ebx, xmm0
add rbp, 0x10
cmp ebx, 0xffff
je 0x180059cb0
not ebx
tzcnt esi, ebx
add rsi, rbp
shl rsi, 5
mov rax, qword [rsp + 0x40]
sub rax, rsi
mov rdx, qword [rax + 8]
mov r8, qword [rax + 0x10]
movaps xmmword [rsp + 0x50], xmm6
lea rcx, [rsp + 0x50]
call fcn.18000e790
mov rcx, rax
and rcx, r15
movdqu xmm0, xmmword [rdi + rcx]
pmovmskb edx, xmm0
test edx, edx
jne 0x180059d27
mov r8d, 0x10
nop
add rcx, r8
and rcx, r15
movdqu xmm0, xmmword [rdi + rcx]
pmovmskb edx, xmm0
add r8, 0x10
test edx, edx
je 0x180059d10
mov r9, qword [rsp + 0x30]
tzcnt edx, edx
add rdx, rcx
and rdx, r15
cmp byte [rdi + rdx], 0
js 0x180059c50
movdqa xmm0, xmmword [rdi]
pmovmskb ecx, xmm0
tzcnt edx, ecx
jmp 0x180059c50
mov rax, qword [rsp + 0x38]
mov rcx, qword [rsp + 0x48]
sub rcx, rax
mov qword [r9], rdi
mov qword [r9 + 8], r15
mov qword [r9 + 0x10], rcx
mov qword [r9 + 0x18], rax
test r12, r12
je 0x18005a624
mov rax, r12
shl rax, 5
add r12, rax
cmp r12, 0xffffffffffffffcf
je 0x18005a624
mov r8, qword [rsp + 0x28]
sub r8, rax
add r8, 0xffffffffffffffe0
mov rcx, qword [0x18366ef48]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x18005a624
movabs rdx, 0x1ffffffffffffffe
and rdx, rax
xor ecx, ecx
movdqa xmm0, xmmword [0x18005b3e0]
nop word cs:[rax + rax]
pxor xmm1, xmm1
pcmpgtb xmm1, xmmword [rdi + rcx]
por xmm1, xmm0
movdqa xmmword [rdi + rcx], xmm1
pxor xmm1, xmm1
pcmpgtb xmm1, xmmword [rdi + rcx + 0x10]
por xmm1, xmm0
movdqa xmmword [rdi + rcx + 0x10], xmm1
add rcx, 0x20
add rdx, 0xfffffffffffffffe
jne 0x180059dd0
test al, 1
je 0x180059e1a
pxor xmm0, xmm0
pcmpgtb xmm0, xmmword [rdi + rcx]
por xmm0, xmmword [0x18005b3e0]
movdqa xmmword [rdi + rcx], xmm0
cmp r8, 0x10
jae 0x180059e3e
lea rcx, [rdi + 0x10]
mov rdx, rdi
call sub.VCRUNTIME140.dll_memmove
mov r9, qword [rsp + 0x30]
cmp r12, 0xffffffffffffffff
jne 0x180059e48
xor eax, eax
jmp 0x18005a61d
movdqu xmm0, xmmword [rdi]
movdqu xmmword [rdi + r8], xmm0
movdqu xmm1, xmmword [rbp]
pshufd xmm0, xmm1, 0x44
pxor xmm0, xmmword [0x18005b3f0]
pshufd xmm1, xmm1, 0xee
pxor xmm1, xmmword [0x18005b400]
pshufd xmm2, xmm1, 0xee
movq qword [rsp + 0x28], xmm2
movq qword [rsp + 0x40], xmm0
movq qword [rsp + 0x38], xmm1
pshufd xmm2, xmm0, 0xee
movq r10, xmm2
xor r15d, r15d
jmp 0x180059eb3
shr rbx, 0x39
lea rax, [r15 - 0x10]
and rax, r12
mov byte [rdi + r15], bl
mov byte [rax + rdi + 0x10], bl
lea rax, [r15 + 1]
cmp r15, r12
mov r15, rax
je 0x18005a5fb
cmp byte [rdi + r15], 0x80
jne 0x180059ea3
mov rax, r15
shl rax, 5
mov r13, rdi
sub r13, rax
add r13, 0xffffffffffffffe0
mov rbp, r15
neg rbp
mov rax, rdi
nop word cs:[rax + rax]
mov rcx, rbp
shl rcx, 5
mov r11, qword [rax + rcx - 0x18]
mov rbx, qword [rax + rcx - 0x10]
mov rcx, rbx
and rcx, 0xfffffffffffffff8
je 0x180059fb0
mov rax, r10
mov r8, qword [rsp + 0x38]
mov rsi, qword [rsp + 0x28]
xor r14d, r14d
mov rdx, qword [rsp + 0x40]
nop word cs:[rax + rax]
add rdx, r8
rol r8, 0xd
mov r9, qword [r11 + r14]
xor r8, rdx
rol rdx, 0x20
xor rsi, r9
add rax, rsi
rol rsi, 0x10
xor rsi, rax
add rdx, rsi
rol rsi, 0x15
add rax, r8
rol r8, 0x11
xor r8, rax
rol rax, 0x20
xor rsi, rdx
xor rdx, r9
add r14, 8
cmp r14, rcx
jb 0x180059f20
movq xmm3, rsi
movq xmm2, r8
punpcklqdq xmm2, xmm3
movq xmm4, rax
movq xmm3, rdx
punpcklqdq xmm3, xmm4
mov r9, qword [rsp + 0x30]
mov esi, ebx
and esi, 7
cmp esi, 3
jbe 0x180059fc5
mov edx, dword [r11 + r14]
mov eax, 4
mov rcx, rax
or rcx, 1
cmp rcx, rsi
jb 0x180059fd5
jmp 0x180059fef
movdqa xmm3, xmm0
movdqa xmm2, xmm1
xor r14d, r14d
mov esi, ebx
and esi, 7
cmp esi, 3
ja 0x180059f8e
xor edx, edx
xor eax, eax
mov rcx, rax
or rcx, 1
cmp rcx, rsi
jae 0x180059fef
lea rcx, [rax + r14]
movzx r8d, word [r11 + rcx]
lea ecx, [rax*8]
shl r8, cl
or rdx, r8
or rax, 2
cmp rax, rsi
jae 0x18005a010
add r14, rax
movzx r8d, byte [r11 + r14]
shl eax, 3
mov ecx, eax
shl r8, cl
or rdx, r8
jmp 0x18005a019
test rsi, rsi
je 0x18005a0f8
lea ecx, [rsi*8]
mov r14d, 0xff
shl r14, cl
or r14, rdx
cmp rsi, 7
jne 0x18005a219
mov eax, 8
sub rax, rsi
pshufd xmm4, xmm2, 0xee
movq rcx, xmm4
xor rcx, r14
movq xmm4, rcx
movdqa xmm5, xmm2
punpcklqdq xmm5, xmm4
paddq xmm3, xmm5
movq rcx, xmm3
rol rcx, 0x20
movdqa xmm4, xmm5
psrlq xmm4, 0x30
movdqa xmm6, xmm2
psrlq xmm6, 0x33
shufps xmm6, xmm4, 0xe4
psllq xmm5, 0x10
psllq xmm2, 0xd
shufps xmm2, xmm5, 0xe4
orps xmm2, xmm6
pxor xmm2, xmm3
pshufd xmm3, xmm3, 0xee
movq xmm4, rcx
punpcklqdq xmm3, xmm4
paddq xmm3, xmm2
movdqa xmm4, xmm2
psrlq xmm4, 0x2f
movdqa xmm5, xmm2
psrlq xmm5, 0x2b
movsd xmm5, xmm4
movdqa xmm4, xmm2
psllq xmm4, 0x11
psllq xmm2, 0x15
movsd xmm2, xmm4
orpd xmm2, xmm5
xorpd xmm2, xmm3
movq rcx, xmm3
rol rcx, 0x20
pshufd xmm3, xmm3, 0xee
movq rdx, xmm3
xor rdx, r14
movq xmm4, rcx
movq xmm3, rdx
punpcklqdq xmm3, xmm4
jmp 0x18005a0fa
xor eax, eax
mov ecx, 1
sub rcx, rax
mov r11d, ecx
and r11d, 7
and rcx, 0xfffffffffffffff8
cmp rax, rcx
jae 0x18005a1d0
movq rdx, xmm3
pshufd xmm4, xmm2, 0xee
movq r8, xmm4
movq r14, xmm2
pshufd xmm2, xmm3, 0xee
movq rsi, xmm2
nop word cs:[rax + rax]
add rdx, r14
rol r14, 0xd
xor r14, rdx
rol rdx, 0x20
xor r8, 0xff
add rsi, r8
rol r8, 0x10
xor r8, rsi
add rdx, r8
rol r8, 0x15
add rsi, r14
rol r14, 0x11
xor r14, rsi
rol rsi, 0x20
xor r8, rdx
xor rdx, 0xff
add rax, 8
cmp rax, rcx
jb 0x18005a140
movq xmm3, r8
movq xmm2, r14
punpcklqdq xmm2, xmm3
movq xmm4, rsi
movq xmm3, rdx
punpcklqdq xmm3, xmm4
xor eax, eax
cmp r11, 4
setae al
cmp r11d, 4
mov edx, 0
mov ecx, 0xff
cmovae rdx, rcx
shl rax, 2
jmp 0x18005a1d4
xor edx, edx
xor eax, eax
mov r8, rax
or r8, 1
lea ecx, [rax*8]
mov r14d, 0xff
shl r14, cl
mov rcx, rax
or rcx, 2
cmp r8, r11
mov r8d, 0
cmovae r14, r8
cmovae rcx, rax
or r14, rdx
cmp rcx, r11
jae 0x18005a219
shl ecx, 3
mov eax, 0xff
shl rax, cl
or r14, rax
pshufd xmm4, xmm3, 0xee
movq rax, xmm4
movq rcx, xmm2
pshufd xmm4, xmm2, 0xee
movq r11, xmm4
shl rbx, 0x38
movabs rdx, 0x100000000000000
add rbx, rdx
or rbx, r14
paddq xmm2, xmm3
rol rcx, 0xd
movq r14, xmm2
xor rcx, r14
rol r14, 0x20
xor r11, rbx
add rax, r11
rol r11, 0x10
xor r11, rax
add r14, r11
rol r11, 0x15
add rax, rcx
rol rcx, 0x11
xor r11, r14
xor rcx, rax
rol rax, 0x20
xor r14, rbx
add r14, rcx
rol rcx, 0xd
xor rcx, r14
rol r14, 0x20
xor rax, 0xff
add rax, r11
rol r11, 0x10
xor r11, rax
add r14, r11
rol r11, 0x15
add rax, rcx
rol rcx, 0x11
xor rcx, rax
rol rax, 0x20
xor r11, r14
add r14, rcx
rol rcx, 0xd
xor rcx, r14
rol r14, 0x20
add rax, r11
rol r11, 0x10
xor r11, rax
add r14, r11
rol r11, 0x15
add rax, rcx
rol rcx, 0x11
xor rcx, rax
rol rax, 0x20
xor r11, r14
add r14, rcx
rol rcx, 0xd
add rax, r11
rol r11, 0x10
xor r11, rax
rol r11, 0x15
xor rcx, r14
add rax, rcx
rol rcx, 0x11
mov rbx, rax
rol rbx, 0x20
xor rbx, rcx
xor rbx, r11
xor rbx, rax
mov rax, r12
and rax, rbx
movdqu xmm2, xmmword [rdi + rax]
pmovmskb ecx, xmm2
mov rdx, rax
test ecx, ecx
jne 0x18005a357
mov r8d, 0x10
mov rdx, rax
nop word cs:[rax + rax]
add rdx, r8
and rdx, r12
movdqu xmm2, xmmword [rdi + rdx]
pmovmskb ecx, xmm2
add r8, 0x10
test ecx, ecx
je 0x18005a340
tzcnt ecx, ecx
add rcx, rdx
and rcx, r12
cmp byte [rdi + rcx], 0
js 0x18005a373
movdqa xmm2, xmmword [rdi]
pmovmskb ecx, xmm2
tzcnt ecx, ecx
mov rdx, r15
sub rdx, rax
mov r8, rcx
sub r8, rax
xor r8, rdx
and r8, r12
cmp r8, 0x10
jb 0x180059e90
mov rax, rcx
shl rax, 5
neg rax
add rax, rdi
add rax, 0xffffffffffffffe0
movzx edx, byte [rdi + rcx]
shr rbx, 0x39
lea r8, [rcx - 0x10]
and r8, r12
mov byte [rdi + rcx], bl
mov byte [r8 + rdi + 0x10], bl
cmp dl, 0xff
je 0x18005a5d0
movzx ecx, byte [r13]
movzx edx, byte [rax]
mov byte [r13], dl
mov byte [rax], cl
movzx ecx, byte [r13 + 1]
movzx edx, byte [rax + 1]
mov byte [r13 + 1], dl
mov byte [rax + 1], cl
movzx ecx, byte [r13 + 2]
movzx edx, byte [rax + 2]
mov byte [r13 + 2], dl
mov byte [rax + 2], cl
movzx ecx, byte [r13 + 3]
movzx edx, byte [rax + 3]
mov byte [r13 + 3], dl
mov byte [rax + 3], cl
movzx ecx, byte [r13 + 4]
movzx edx, byte [rax + 4]
mov byte [r13 + 4], dl
mov byte [rax + 4], cl
movzx ecx, byte [r13 + 5]
movzx edx, byte [rax + 5]
mov byte [r13 + 5], dl
mov byte [rax + 5], cl
movzx ecx, byte [r13 + 6]
movzx edx, byte [rax + 6]
mov byte [r13 + 6], dl
mov byte [rax + 6], cl
movzx ecx, byte [r13 + 7]
movzx edx, byte [rax + 7]
mov byte [r13 + 7], dl
mov byte [rax + 7], cl
movzx ecx, byte [r13 + 8]
movzx edx, byte [rax + 8]
mov byte [r13 + 8], dl
mov byte [rax + 8], cl
movzx ecx, byte [r13 + 9]
movzx edx, byte [rax + 9]
mov byte [r13 + 9], dl
mov byte [rax + 9], cl
movzx ecx, byte [r13 + 0xa]
movzx edx, byte [rax + 0xa]
mov byte [r13 + 0xa], dl
mov byte [rax + 0xa], cl
movzx ecx, byte [r13 + 0xb]
movzx edx, byte [rax + 0xb]
mov byte [r13 + 0xb], dl
mov byte [rax + 0xb], cl
movzx ecx, byte [r13 + 0xc]
movzx edx, byte [rax + 0xc]
mov byte [r13 + 0xc], dl
mov byte [rax + 0xc], cl
movzx ecx, byte [r13 + 0xd]
movzx edx, byte [rax + 0xd]
mov byte [r13 + 0xd], dl
mov byte [rax + 0xd], cl
movzx ecx, byte [r13 + 0xe]
movzx edx, byte [rax + 0xe]
mov byte [r13 + 0xe], dl
mov byte [rax + 0xe], cl
movzx ecx, byte [r13 + 0xf]
movzx edx, byte [rax + 0xf]
mov byte [r13 + 0xf], dl
mov byte [rax + 0xf], cl
movzx ecx, byte [r13 + 0x10]
movzx edx, byte [rax + 0x10]
mov byte [r13 + 0x10], dl
mov byte [rax + 0x10], cl
movzx ecx, byte [r13 + 0x11]
movzx edx, byte [rax + 0x11]
mov byte [r13 + 0x11], dl
mov byte [rax + 0x11], cl
movzx ecx, byte [r13 + 0x12]
movzx edx, byte [rax + 0x12]
mov byte [r13 + 0x12], dl
mov byte [rax + 0x12], cl
movzx ecx, byte [r13 + 0x13]
movzx edx, byte [rax + 0x13]
mov byte [r13 + 0x13], dl
mov byte [rax + 0x13], cl
movzx ecx, byte [r13 + 0x14]
movzx edx, byte [rax + 0x14]
mov byte [r13 + 0x14], dl
mov byte [rax + 0x14], cl
movzx ecx, byte [r13 + 0x15]
movzx edx, byte [rax + 0x15]
mov byte [r13 + 0x15], dl
mov byte [rax + 0x15], cl
movzx ecx, byte [r13 + 0x16]
movzx edx, byte [rax + 0x16]
mov byte [r13 + 0x16], dl
mov byte [rax + 0x16], cl
movzx ecx, byte [r13 + 0x17]
movzx edx, byte [rax + 0x17]
mov byte [r13 + 0x17], dl
mov byte [rax + 0x17], cl
movzx ecx, byte [r13 + 0x18]
movzx edx, byte [rax + 0x18]
mov byte [r13 + 0x18], dl
mov byte [rax + 0x18], cl
movzx ecx, byte [r13 + 0x19]
movzx edx, byte [rax + 0x19]
mov byte [r13 + 0x19], dl
mov byte [rax + 0x19], cl
movzx ecx, byte [r13 + 0x1a]
movzx edx, byte [rax + 0x1a]
mov byte [r13 + 0x1a], dl
mov byte [rax + 0x1a], cl
movzx ecx, byte [r13 + 0x1b]
movzx edx, byte [rax + 0x1b]
mov byte [r13 + 0x1b], dl
mov byte [rax + 0x1b], cl
movzx ecx, byte [r13 + 0x1c]
movzx edx, byte [rax + 0x1c]
mov byte [r13 + 0x1c], dl
mov byte [rax + 0x1c], cl
movzx ecx, byte [r13 + 0x1d]
movzx edx, byte [rax + 0x1d]
mov byte [r13 + 0x1d], dl
mov byte [rax + 0x1d], cl
movzx ecx, byte [r13 + 0x1e]
movzx edx, byte [rax + 0x1e]
mov byte [r13 + 0x1e], dl
mov byte [rax + 0x1e], cl
movzx ecx, byte [r13 + 0x1f]
movzx edx, byte [rax + 0x1f]
mov byte [r13 + 0x1f], dl
mov byte [rax + 0x1f], cl
mov rax, qword [r9]
jmp 0x180059ee0
lea rcx, [r15 - 0x10]
and rcx, r12
mov byte [rdi + r15], 0xff
mov byte [rcx + rdi + 0x10], 0xff
movdqu xmm2, xmmword [r13]
movdqu xmm3, xmmword [r13 + 0x10]
movdqu xmmword [rax + 0x10], xmm3
movdqu xmmword [rax], xmm2
jmp 0x180059ea3
mov rcx, qword [r9 + 8]
mov r13, qword [r9 + 0x18]
lea rax, [rcx + 1]
mov rdx, rax
shr rdx, 3
and rax, 0xfffffffffffffff8
sub rax, rdx
cmp rcx, 8
cmovb rax, rcx
sub rax, r13
mov qword [r9 + 0x10], rax
movabs rax, 0x8000000000000001
movaps xmm6, xmmword [rsp + 0x60]
add rsp, 0x78
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
call fcn.18000d970
int3