1. A method for detecting a computer virus in a file on a computer system, comprising the steps of: identifying potential virus instructions in the file; specifying an initial state of one or more virtual registers in a virtual machine; emulating the potential virus instructions in the virtual machine using the specified initial state of the one or more virtual registers to produce a new state of the virtual registers; and examining the new state of the virtual registers to detect evidence of the computer virus.