Markers and project settings

Hey there!
I’ve been reading nearly everything here on the site but still didn’t find out whats correct.

So you can set markers like VMProtectBegin etc. and you can use a .MAP file to select functions to protect.

So, if I have a critcal function that I want to protect, is it better to use both, or doesn’t it matter if I use VMProtectBegin or the .MAP file way? (I would prefer .MAP)

A 2nd question that’s nearly the same: If I protect a function with VMProtect, do I still have to encrypt strings with “VMProtectDecryptStringA” ? And, is that a encryptstring function at all, or what does it do?

Thanks in advance!

So, if I have a critcal function that I want to protect, is it better to use both, or doesn’t it matter if I use VMProtectBegin or the .MAP file way? (I would prefer .MAP)

The best method is the .MAP file way:
http://vmpsoft.com/support/user-manual/working-with-vmprotect/preparing-a-project/
In any case you can not use both methods.

A 2nd question that’s nearly the same: If I protect a function with VMProtect, do I still have to encrypt strings with “VMProtectDecryptStringA” ? And, is that a encryptstring function at all, or what does it do?

Unfortunately I don`t understand you. About VMProtectDecryptStringA you can read the user manual:
http://vmpsoft.com/support/user-manual/working-with-vmprotect/preparing-a-project/sdk-functions/#VMProtectDecryptStringA

Hey, thanks for clearing this out!

VMProtectDecryptStringA function allows to decrypt ANSI string constant. You have to add this constant to a list of protected objects.

I don’t understand the sense of this function, do I actually pass a already encrypted string to the function, or do I just have to pass any string I want to be encrypted to the function?
Anyway, the key question: If the string is in a protected function already, do I still need to use “VMProtectDecryptStringA” to have the string encrypted, or does VMProtect automaticly do it?

There is the example of usage:

 MessageBox(hDlg, VMProtectDecryptStringA("Incorrect password"), "Error", MB_ICONERROR + MB_OK);

After compilation in VMProtect the string “Incorrect password” will be encrypted but VMProtectDecryptStringA will return the original string.

Thanks, so I still need to encrypt the strings with “VMProtectDecryptStringA”, even if the function where the string occurs is protected by VMProtect already?

Yes. Because the function and the string are different objects.