There is no such thing as "gun registration" at the Federal level or in most States. You complete the form 4473 and that form stays in the store for 20 years (I believe). It is not illegal to sell a gun to a friend. No bill of sale is required.
In very unusual circumstances, local LE will request a "Gun Trace" through ATF. They contact the manufacturer, find out what distributor is was sent to. They contact the distributor to find out what dealer it went to. They physically go into the dealer's shop and look through the 4473's and write down the information about the buyer. That information is then sent to the LE agency who can follow up with an interview (or most likely a phone call). Normally, a five minute phone conversation clears the matter up. They may try to contact the next guy and so on. They may find a suspect in that chain, but normally they find the chain was broken by a burglary.
Just because you owned it at one time has NOTHING to do with your involvement in a crime any more that a car you owned 20 years ago involved in a Leaving the Scene collision means you are culpable
In life, strive to take the high road....It offers a better field of fire.
"Robo is right" Fuzzball