#jumptomain NONE
#pragma option w32

extern WINAPI "kernel32.dll"
{
	ExitProcess(dword);
}

extern WINAPI "user32.dll"
{
	MessageBoxA();
}

void main()
inline
{
	ESI=0xC0001000;
	ECX=0xFFFF;
loops:
	asm{
		cmp	DSDWORD[ESI+ECX],0x3C478BFB
		loopne	loops
	}
	IF(ZEROFLAG){
		IF(DSDWORD[ESI+ECX+5]==0x83F8472B){
			DSBYTE[ESI+ECX+1]=0xF4;
			ExitProcess(0);
		}
	}
	MessageBoxA(0,"Already patched or incompatible version",
		"Can't patch VMM: sequence not found",0x10);
	ExitProcess(-1);
}

