In one embodiment, an antivirus mechanism builds an automaton of a virus
using a pattern and a set of rules. The antivirus mechanism may then scan
a binary file to detect an engine of the virus by matching the automaton
with a plurality of disassembly codes derived from the binary file. The
pattern may comprise a data structure including a name of a particular
virus, and information for detecting the virus using the disassembly
codes.