I agree this seems fairly clearly illegal.
That said, I think OP is morally in the right here, and I wish I had the guts to do similar things.
Sharing code is a good thing. Helping one company innovate using code that another company chose to ignore is also a good thing.