The truth is a bit more complicated than that, ownership of IP generated while working for another company can be a very tricky issue, it depends on your local laws, your employment contract and so on... consult a lawyer.
IAAL, and I second this. Even if you do everything right and would win in the courtroom, megacorp can make it into a Pyhrric victory by consuming vast amounts of time and money (if you have the resources to get that far, even).