Entrepreneurs pouring money into the cultivation and dispensing of marijuana stand to take big losses if they don’t lock down their intellectual property. The catch is that pot remains illegal under federal law.