Hi,
please see the below document
http://www.cisco.com/en/US/docs/security/asa/asa71/configuration/guide/trouble.html#wp1058131
You don't need to set the firewall to 'factory defaults' you only need to start it up on rom mode, get the config saved on flash back to memory, reset the password and then save the config from memory to flash again (it will include the new password you have just changed) change the config register .. and that's it. the link provide all the details
please rate helpful posts !!!