VMProtectBegin/VMProtectEnd question
Posted: Sun Apr 24, 2011 8:15 pm
for these markers, can i include the whole function with return in it?
ie
DWORD function1(int a,int b)
{
VMProtectBegin("function1");
if(a==1)
return 1;
else if(a==3)
return 3;
else return 4;
VMProtectEnd();
}
is this ok or i need to have return outside the marker.
i read the help files, it said "you must not allow jumps from unprotected sections inside a marker"
does this mean jump from inside marker or jump into the marker?
void function 2()
{
VMProtectBegin("function1");
__asm{
cmp eax,3
jne jmpcode
ret
jmpcode:
jmp function3
}
VMProtectEnd();
}
is this valid?
ie
DWORD function1(int a,int b)
{
VMProtectBegin("function1");
if(a==1)
return 1;
else if(a==3)
return 3;
else return 4;
VMProtectEnd();
}
is this ok or i need to have return outside the marker.
i read the help files, it said "you must not allow jumps from unprotected sections inside a marker"
does this mean jump from inside marker or jump into the marker?
void function 2()
{
VMProtectBegin("function1");
__asm{
cmp eax,3
jne jmpcode
ret
jmpcode:
jmp function3
}
VMProtectEnd();
}
is this valid?