Page 1 of 1

Floating point instruction virtualization error

Posted: Sun Sep 06, 2015 9:13 pm
by tmp
Hi,

I was testing latest version of VMProtect (3.0.2.470) and it seems that it cannot virtualize fldcw instruction. What's interesting its counterpart fstcw compiles without problems.

Here's a minimal sample to reproduce this issue (compile using VS):

Code: Select all

__declspec(noinline) void vmProtectionFailureTest()
{
	unsigned short cw;
	__asm
	{
		fstcw cw
		fldcw cw
	}
}

int main()
{
	vmProtectionFailureTest();
	return 0;
}
Protection settings and compilation log:
Image

Re: Floating point instruction virtualization error

Posted: Tue Sep 08, 2015 4:04 pm
by Admin
Thank you for your report. We'll fix it in next build.

Re: Floating point instruction virtualization error

Posted: Tue Sep 08, 2015 8:18 pm
by drlai
Wow... so much to learn!
tmp wrote:Hi,

I was testing latest version of VMProtect (3.0.2.470) and it seems that it cannot virtualize fldcw instruction. What's interesting its counterpart fstcw compiles without problems.

Here's a minimal sample to reproduce this issue (compile using VS):

Code: Select all

__declspec(noinline) void vmProtectionFailureTest()
{
	unsigned short cw;
	__asm
	{
		fstcw cw
		fldcw cw
	}
}

int main()
{
	vmProtectionFailureTest();
	return 0;
}
Protection settings and compilation log:
Image

Re: Floating point instruction virtualization error

Posted: Mon Sep 14, 2015 6:31 pm
by tmp
Thanks for fixing this issue in 3.0.3.481. Unfortunately I've found another corner case for virtualization:
Image

Again it's suprising that complementary pushad is handled properly but popad is not.

Re: Floating point instruction virtualization error

Posted: Wed Sep 16, 2015 8:31 am
by Admin
Thank you for your report.