As the others say, talking to a lawyer would be best, but even in situations where there's no written agreement many times there's an agreement in principle that people are bound to.
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.