Hello, Administrator, I am a registered VMProtect user. I have sevel questions when using your product,following is my source code:
situation1:
#include <Windows.h>
#include "VMProtectSDK.h"
void func(int param)
{
VMProtectBegin("func");
if(param > 100)
{
_tprintf(TEXT("<100"));
return;
}
else
{
_tprintf(TEXT(">100"));
}
VMProtectEnd();
VMProtectBegin("func2");
switch(param)
{
case 0:
MessageBoxA(0,"Begin",0,0);
return;
case 1:
MessageBoxA(0,"Begin1",0,0);
break;
default:
break;
}
VMProtectEnd();
}
int _tmain(int argc, _TCHAR* argv[])
{
MessageBoxA(0,0,0,0);
IsDebuggerPresent();
func(10);
return 0;
}
When I open my released .exe file, VMProtect identifies only the first Marker "func" in function func,can you tell me why?
The Debuged edition is right.
The second question,source code:
situation 2:
void func(int param)
{
VMProtectBegin("func");
if(param > 100)
{
_tprintf(TEXT("<100"));
return;
}
else
{
_tprintf(TEXT(">100"));
}
switch(param)
{
case 0:
MessageBoxA(0,"Begin",0,0);
return;
case 1:
MessageBoxA(0,"Begin1",0,0);
break;
default:
break;
}
VMProtectEnd();
}
int _tmain(int argc, _TCHAR* argv[])
{
VMProtectBegin("_tmain");
MessageBoxA(0,0,0,0);
IsDebuggerPresent();
VMProtectEnd();
func(10);
return 0;
}
When I open the released .exe file ,VM only identifies the Marker "_tmain" in function _tmain, while the marker "func" in function func() is ignored.
Can you tell me why?
Marker Count identify error
Re: Marker Count identify error
Please send us a test application with this problem (original exe+map+vmp files).
-
- Posts: 10
- Joined: Mon Jun 27, 2011 1:59 am
Re: Marker Count identify error
Attachment is the file .
By the way ,I used the Macro in previous edition of VMProtect, and it display right!
By the way ,I used the Macro in previous edition of VMProtect, and it display right!
- Attachments
-
- Release.rar
- (6.21 KiB) Downloaded 776 times
Re: Marker Count identify error
The reason of this problem is an optimization:
VMProtect did not find the second marker by call esi+call edi. Please try add #pragma optimize( "g", off ) and #pragma optimize( "g", on ) around _tmain or use MAP file for the selection of protection functions.
Code: Select all
00401004 8B35B0204000 mov esi, [004020B0] <- VMProtectMarker "_tmain"
0040100A 57 push edi
0040100B 6838214000 push 00402138 -> ANSI "_tmain"
00401010 FFD6 call esi
00401012 8B2DA8204000 mov ebp, [004020A8] -> USER32.MessageBoxA
00401018 6A00 push 00
0040101A 6A00 push 00
0040101C 6A00 push 00
0040101E 6A00 push 00
00401020 FFD5 call ebp
00401022 FF1500204000 call dword ptr [00402000] -> KERNEL32.IsDebuggerPresent
00401028 8B3DB4204000 mov edi, [004020B4] -> VMProtectSDK32.VMProtectEnd
0040102E FFD7 call edi
00401030 6824214000 push 00402124 -> ANSI "func3"
00401035 FFD6 call esi
00401037 682C214000 push 0040212C -> Unicode ">100"
0040103C FF157C204000 call dword ptr [0040207C] -> MSVCR90.wprintf
00401042 83C404 add esp, 04
00401045 FFD7 call edi
00401047 6804214000 push 00402104 -> ANSI "checkCheat"
0040104C FFD6 call esi
I think that in preious cases you had a different code.By the way ,I used the Macro in previous edition of VMProtect, and it display right!
-
- Posts: 10
- Joined: Mon Jun 27, 2011 1:59 am
Re: Marker Count identify error
Thanks for your reply.
I have realized the question due to your reply.
But the code is identical except the mark when it display well.You can try using the code I posted.
I have realized the question due to your reply.
But the code is identical except the mark when it display well.You can try using the code I posted.
Re: Marker Count identify error
We`ll fix this issue in the next versions.