"Excluded from memory protection" not working properly

Hi,
my executable (windows) is creating a section like this:

#pragma section(".hdata", read)
#pragma data_seg(".hdata$1")
#pragma data_seg()
__declspec (allocate(".hdata$1"))

After that I allocate a variable which is going to hold a HWID.

Now if I enable “Excluded from memory protection” and “Excluded from Packing”, only “Exclude from Packing” is going to work, after changing the variable in .hdata it’s going to throw the “File corrupted! This program has been manipulated and maybe it’s infected by a Virus or cracked. This file won’t work anymore.” error.

Please notice that the “Excluded from memory protection” feature works at the runtime only. VMProtect checks whole file on a disk while starting even some sections were excluded from the memory protection. So you can’t change anything in your file after protection.

Oh ok I see, so I would have to completely disable Memory Protection in order to modify binary without problems?

Yeah.