#include "stdafx.h"
#include "Disasm.h"

BYTE GetBit(BYTE value,int start,int size)
{
	value >>= start;
	int n = 0;
	for(int i=0;i<size;i++)
	{
		n <<= 1;
		n |= 1;
	}
	return value & n;
}

bool CDisasm::Disasm(BYTE* ptr,int size)
{
	BYTE* end = ptr + size;
	while(ptr < end)
	{
		if(Jmp.Disasm(ptr));
		else if(Mov.Disasm(ptr));
		else return false;
	}
	return true;
}