Analysis and improvements of behaviour-based malware detection mechanisms