OP: the code and intellectual property belongs to you unless you transfer copyright over or mark as open source. That said, code is hardly the most valuable asset in an early-stage startup. The best real way to "protect" yourself (besides getting legal docs papered) is to stay involved in every important discussion and develop your own relationships with investors. Your cofounder should welcome this, and should help you develop your non-technical skills.
If you notice any unease, red flags, shadiness, lack of transparency, BAIL OUT. Incorporate yourself and transfer the IP into a company owned 100% by you. Find a new business partner.