I got sick of it, and bailed. Now they're telling me that I need to give them the code.
I live in Canada, and no idea how to reply. I donn't have resources or time to put towards this argument.
What should I do? Am I legally bound to send them the code?
If they hired you and paid you for work even without an explicit written agreement they do deserve the results of the work for which they paid you for. If that is code that you wrote from directions or ideas that they gave you then that would be the code.
On the other hand if you just spoke about the idea of forming a company and the kind of software that the company would need to develop even with specific ideas around it but they never paid you for work in general you will not owe them any work. Now you still may be bound by certain things such as a copyright for the idea so you can't just go and resell your code or market it on your own. That is all highly dependent on locale and governing laws which a lawyer could help you with.
If money changed hands chances are very high that you are legally bound to deliver some result to them for that money. If it did not change hands and they simply want the result of your work offer to sell it to them. Get a sales agreement for it.
There seems to be a lot of missing information here.
I would start by simply asking them if they believe there is a legal agreement between the three of you and why. If they believe there is, and that it binds you to provide software then what are their legal obligations to you.
In the event they respond, I imagine your actual lawyer (who you will engage) will want to know this anyways.
If they paid you something - then it's muddy/lawyer-sh turf.