Function at 0x140006640
Capabilities:
Encode data using xor
Encrypt data using dpapi

Disassembly:
mov r11, rsp
push rdi
sub rsp, 0xe0
mov rax, qword [0x140037008]
xor rax, rsp
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x70], rcx
mov rdi, rcx
mov rcx, qword [rdx]
xorps xmm0, xmm0
mov eax, dword [rdx + 8]
xor r9d, r9d
sub eax, ecx
mov qword [r11 + 0x18], rbx
xor ebx, ebx
mov dword [r11 - 0x60], eax
lea rax, [r11 - 0x70]
mov qword [r11 - 0x58], rcx
mov qword [rsp + 0x30], rax
lea rdx, [r11 - 0x78]
mov qword [r11 - 0x10], rsi
lea rcx, [r11 - 0x60]
mov dword [rsp + 0x28], ebx
xor r8d, r8d
mov qword [rsp + 0x20], rbx
mov qword [r11 - 0x18], r14
movups xmmword [rsp + 0x78], xmm0
mov qword [r11 - 0x78], rbx
call qword [sym.imp.CRYPT32.dll_CryptUnprotectData]
test eax, eax
jne 0x1400068c6
cmp dword [0x140037020], 2
mov ecx, ebx
mov eax, dword [str._d___N]
movups xmm0, xmmword [str._XTUSI]
mov dword [rsp + 0x50], eax
movzx eax, word [0x14002f16c]
mov word [rsp + 0x54], ax
movzx eax, byte [0x14002f16e]
mov byte [rsp + 0x56], al
movups xmmword [rsp + 0x40], xmm0
jl 0x14000687f
movdqa xmm0, xmmword [0x14002f590]
lea rdx, [rsp + 0x44]
movdqa xmm5, xmmword [0x14002f4e0]
mov eax, 1
movdqa xmm4, xmmword [0x14002f580]
movaps xmmword [rsp + 0xc0], xmm6
movaps xmmword [rsp + 0xb0], xmm7
movdqa xmm7, xmmword [0x14002f500]
movd xmm6, eax
mov eax, 0x1f
movdqa xmmword [rsp + 0x60], xmm0
mov r8d, dword [rsp + 0x60]
movaps xmmword [rsp + 0xa0], xmm8
movd xmm8, eax
nop word [rax + rax]
movd xmm2, ecx
lea eax, [rcx + 4]
pshufd xmm2, xmm2, 0
lea rdx, [rdx + 8]
paddd xmm2, xmm5
movd xmm3, eax
movdqa xmm1, xmm2
pshufd xmm3, xmm3, 0
punpckldq xmm1, xmm2
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
paddd xmm3, xmm5
pmuldq xmm0, xmm4
add ecx, 8
pmuldq xmm1, xmm4
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm2, xmm0
pshuflw xmm0, xmm2, 0xd8
pshufhw xmm1, xmm0, 0xd8
pshufd xmm2, xmm1, 0xd8
movdqa xmm1, xmm3
pand xmm2, xmmword [0x14002f570]
packuswb xmm2, xmm2
punpckldq xmm1, xmm3
pmuldq xmm1, xmm4
movd xmm0, r8d
paddb xmm2, xmm0
movd xmm0, dword [rdx - 0xc]
pxor xmm2, xmm0
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmm4
movd dword [rdx - 0xc], xmm2
shufps xmm1, xmm0, 0xdd
psrad xmm1, xmm6
movdqa xmm0, xmm1
psrld xmm0, xmm8
paddd xmm0, xmm1
pmulld xmm0, xmm7
psubd xmm3, xmm0
pshuflw xmm0, xmm3, 0xd8
pshufhw xmm1, xmm0, 0xd8
movd xmm0, r8d
pshufd xmm2, xmm1, 0xd8
pand xmm2, xmmword [0x14002f570]
packuswb xmm2, xmm2
paddb xmm2, xmm0
movd xmm0, dword [rdx - 8]
pxor xmm2, xmm0
movd dword [rdx - 8], xmm2
cmp ecx, 0x10
jl 0x140006760
movaps xmm8, xmmword [rsp + 0xa0]
movaps xmm7, xmmword [rsp + 0xb0]
movaps xmm6, xmmword [rsp + 0xc0]
cmp ecx, 0x17
jge 0x1400068bc
movsxd rax, ecx
lea r8, [rsp + 0x40]
add r8, rax
nop word [rax + rax]
mov eax, 0x94f2095
lea r8, [r8 + 1]
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add edx, eax
movsx eax, dl
imul edx, eax, 0x37
movzx eax, cl
inc ecx
sub al, dl
add al, 0x38
xor byte [r8 - 1], al
cmp ecx, 0x17
jl 0x140006890
lea rcx, [rsp + 0x40]
call fcn.1400055e0
mov r14d, dword [rsp + 0x78]
xorps xmm0, xmm0
mov rsi, qword [rsp + 0x80]
movups xmmword [rdi], xmm0
mov qword [rdi], rbx
mov qword [rdi + 8], rbx
mov qword [rdi + 0x10], rbx
test r14, r14
je 0x140006915
mov edx, r14d
mov rcx, rdi
call fcn.140016960
mov rbx, qword [rdi]
mov r8d, r14d
mov rcx, rbx
mov rdx, rsi
call sub.VCRUNTIME140.dll_memmove
mov rsi, qword [rsp + 0x80]
lea rcx, [r14 + rbx]
mov qword [rdi + 8], rcx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rcx, qword [rsp + 0x70]
mov r14, qword [rsp + 0xd0]
mov rsi, qword [rsp + 0xd8]
mov rbx, qword [rsp + 0x100]
test rcx, rcx
je 0x140006946
call qword [sym.imp.KERNEL32.dll_LocalFree]
mov rax, rdi
mov rcx, qword [rsp + 0x98]
xor rcx, rsp
call fcn.140027a80
add rsp, 0xe0
pop rdi
ret