(a) A person is guilty of an attempt to commit a crime if, with intent to commit a crime, the person engages in conduct which constitutes a substantial step toward the commission of that crime.
(b) In a prosecution under this section, it is not a defense that it was factually or legally impossible to commit the crime which was the object of the attempt if the conduct engaged in by the defendant would be a crime had the circumstances been as the defendant believed them to be.
(c) In a prosecution under this section, it is an affirmative defense that the defendant, under circumstances manifesting a voluntary and complete renunciation of the defendant's criminal intent, prevented the commission of the attempted crime.
(d) An attempt is
(1) an unclassified felony if the crime attempted is murder in the first degree;
(2) a class A felony if the crime attempted is an unclassified felony other than murder in the first degree;
(3) a class B felony if the crime attempted is a class A felony;
(4) a class C felony if the crime attempted is a class B felony;
(5) a class A misdemeanor if the crime attempted is a class C felony;
(6) a class B misdemeanor if the crime attempted is a class A or class B misdemeanor.
(e) If the crime attempted is an unclassified crime described in a state law which is not part of this title and no provision for punishment of an attempt to commit the crime is specified, the punishment for the attempt is imprisonment for a term of not more than half the maximum period prescribed as punishment for the unclassified crime, or a fine of not more than half the amount of the maximum fine prescribed as punishment for the unclassified crime, or both. If the crime attempted is punishable by an indeterminate or life term, the attempt is a class A felony.