It just so happens, that this very thing happened to a friend of mine. I won't mention any names, or even the type of weapon.
Being that I was a police officer, the person came to me for help. The gun was picked up by ATF, and the investigator contacted the NFA branch and research was performed on the gun. Once the gun information was obtained and ATF found no malice or ill intent, they allowed the person and helped him go through the NFA paperwork and allowed him to register the firearm.
Now before you think this might be standard procdure, I would assume that it will vary depending on the investigators discression. It was stated by ATF, that they could have destroyed the firearm, but they found no ill intent, so that was the reason to move forward with the NFA branch
I never saw a wild thing sorry for itself. A small bird will drop frozen dead from a bough. Without ever having felt sorry for itself. -- D.H. Lawrence