Cocaine is simple to extract as it is an alklaoid. An alkaloid is water soluble in an acid warer carrier and oil soluble in an alkaline water carrier. Takees an IQ of about 50 to carry out the extraction, clean it and leave it in either a water or oil soluble form. All you need is water, sodium hydroxide (draino), hydrochloric acid, salt and a little sulfuric acid. Base has no residuals attached, cocaine hydrochloride obviously has some hydrocloric gas used in its final preparation (made simply with salt and sulfuric acid) and usually it is used in excess. It can also be made in a final form as a sulfate salt.
A few thousand words would explain every thing in detail. It is really all quite simple, "once you collect the leaves."