Are nested functions obfuscated?

Issues related to VMProtect
Post Reply
db2021
Posts: 4
Joined: Mon Jul 26, 2021 5:46 pm

Are nested functions obfuscated?

Post by db2021 »

We have a large project. Can nested functions be obfuscated all at once in it?
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Are nested functions obfuscated?

Post by Admin »

Do you mean nested functions in .NET application?
huyi51462
Posts: 2
Joined: Fri Aug 13, 2021 12:42 pm

Re: Are nested functions obfuscated?

Post by huyi51462 »

Admin wrote:Do you mean nested functions in .NET application?
I don't quite understand this problem either.
If there are three functions like these:

Code: Select all

void Fun_3()
{
int a= 3+3;
Fun_2();
}

void Fun_2()
{
int a= 2+2;
Fun_2();
}

void Fun_1()
{
int a= 1+1;
Fun_2();
}

int Main()
{
VMProtectBeginVirtualization("main")
int i = 3+2+1;
Fun_1();
VMProtectEnd();
return 0;
}
Fun_1,Fun_2,Fun_3,these three functions are not using markers or MAP-file.
The problem is:
After compilation in VMProtect,the code between VMProtectBeginVirtualization("main") and VMProtectEnd()in the Main like "int i = 3+2+1;" will be virtualized,but what about call to "Fun_1();" in the Main?
When the Main calls the Fun_1 , will the internal code of the FUN_1 such as "int a = 1+1;" be virtualized?
More like "int a= 2+2;" "int a= 3+3;" in the Fun_2 and Fun_3?
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Are nested functions obfuscated?

Post by Admin »

Fun_1,Fun_2,Fun_3,these three functions are not using markers or MAP-file.
The problem is:
After compilation in VMProtect,the code between VMProtectBeginVirtualization("main") and VMProtectEnd()in the Main like "int i = 3+2+1;" will be virtualized,but what about call to "Fun_1();" in the Main?
When the Main calls the Fun_1 , will the internal code of the FUN_1 such as "int a = 1+1;" be virtualized?
More like "int a= 2+2;" "int a= 3+3;" in the Fun_2 and Fun_3?
VMProtect will virtualize ONLY the marker "main". If you want to virtualize Fun_1 - you have to add this function into the "Functions for protection" section.
huyi51462
Posts: 2
Joined: Fri Aug 13, 2021 12:42 pm

Re: Are nested functions obfuscated?

Post by huyi51462 »

Admin wrote:
Fun_1,Fun_2,Fun_3,these three functions are not using markers or MAP-file.
The problem is:
After compilation in VMProtect,the code between VMProtectBeginVirtualization("main") and VMProtectEnd()in the Main like "int i = 3+2+1;" will be virtualized,but what about call to "Fun_1();" in the Main?
When the Main calls the Fun_1 , will the internal code of the FUN_1 such as "int a = 1+1;" be virtualized?
More like "int a= 2+2;" "int a= 3+3;" in the Fun_2 and Fun_3?
VMProtect will virtualize ONLY the marker "main". If you want to virtualize Fun_1 - you have to add this function into the "Functions for protection" section.
Thanks, figured it out
Post Reply