You got to get creative in California. As for the handgun roster there are 3 ways to get off roster guns, all through the private market:
a. A Law enforcement officer buys the firearm, gets tired of it and flips it as a private sale.
b. Interfamily transfer between immediate family members. Eg. Father to Son, Grandfather to daughter, spouse to spouse. This includes interstate if you have family out of state, which would allow off-roaster firearms.
c. Relocation. Say you moved from another state to California, you could pick up a few wish list items before you do so.
Bad guns will depend on how it is bad. Say you had an AR-pistol or a Pistol modern sporting rifle which is generally a no-no item, however, all the AW weapon laws are exempt if there is a locked magazine with less than 10 rounds, so you have some creative devices which will make the gun compliant.
That's the reason you see "Assault pistols" of all types for sale on the secondary market in California, but due to all of the above, you are talking about 100-200% markup. Or you buy the CA version which has a fake can welded/secured to it to lengthen the pistol to a rifle or whatever.