As wikipedia says,
A major limitation on copyright on ideas is that copyright protects only the original expression of ideas
Suppose there are two companies: A and B, that produce software. Now, suppose that A published some commercial program, but obfuscated it, so that its functionality is unchanged, but the machine code produced looks completely different than in unobfuscated one. Subsequently, company B bought this program, deobfuscated its code and started selling it.
As I understand, the original way of expressing ideas by company A was by publishing obfuscated code (the original version was not published at all). Since after deobfuscation by company B, code looks completely different, does it qualify as another way of expressing the same ideas and is legal, or has company B broken the copyright law?
The above question concerns the case when B is selling the original program code that was extracted from published obfuscated version. But imagine that B transformed the code published by A to a completely different form different from both original and obfuscated one, but preserving functionality and sells it. Has company B broken the copyright law in this case?