In general the the 501(3)c isn't replaced by a for-profit corp though. The 501(3)c remains and a new for-profit corp is established under its ownership.
IANAL but I think the tax issue would likely hinge on how well that $500k was isolated from the for-profit side. If the non-profit has no substantial operations and is just a shell for the for-profit, I could see getting in trouble for trying to deduct that as a donation. But if there's an audit trail showing that the money is staying on the non-profit side, it would likely be fine.
Yes if the for-profit was the entire operation, I think you could definitely have issues with the IRS. It would ultimately depend on your ability to convince either the IRS or a judge that there is some purpose to the nonprofit apart from giving investors in the for-profit side tax deductions.
IANAL but I think the tax issue would likely hinge on how well that $500k was isolated from the for-profit side. If the non-profit has no substantial operations and is just a shell for the for-profit, I could see getting in trouble for trying to deduct that as a donation. But if there's an audit trail showing that the money is staying on the non-profit side, it would likely be fine.