(1) A person is guilty of an attempt to commit a crime if, with intent to commit a specific crime, he or she does any act which is a substantial step toward the commission of that crime.
(2) If the conduct in which a person engages otherwise constitutes an attempt to commit a crime, it is no defense to a prosecution of such attempt that the crime charged to have been attempted was, under the attendant circumstances, factually or legally impossible of commission.
(3) An attempt to commit a crime is a:
(a) Class A felony when the crime attempted is murder in the first degree, murder in the second degree, arson in the first degree, child molestation in the first degree, indecent liberties by forcible compulsion, rape in the first degree, rape in the second degree, rape of a child in the first degree, or rape of a child in the second degree;
(b) Class B felony when the crime attempted is a class A felony other than an offense listed in (a) of this subsection;
(c) Class C felony when the crime attempted is a class B felony;
(d) Gross misdemeanor when the crime attempted is a class C felony;
(e) Misdemeanor when the crime attempted is a gross misdemeanor or misdemeanor.