Floating point instruction virtualization error

Issues related to VMProtect
Post Reply
tmp
Posts: 6
Joined: Sun Sep 06, 2015 8:55 pm

Floating point instruction virtualization error

Post 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
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Floating point instruction virtualization error

Post by Admin »

Thank you for your report. We'll fix it in next build.
drlai
Posts: 63
Joined: Tue Sep 27, 2011 2:29 pm

Re: Floating point instruction virtualization error

Post 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
tmp
Posts: 6
Joined: Sun Sep 06, 2015 8:55 pm

Re: Floating point instruction virtualization error

Post 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.
Admin
Site Admin
Posts: 2566
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Re: Floating point instruction virtualization error

Post by Admin »

Thank you for your report.
Post Reply