Imagine I work for a company that has a software X, no algorithm in this software is patented.
If I want to create an open source software Z that has similar features as software X by looking into the code of software X and recreating the logic would that be illegal?
Consider that software Z would be created using different technology, different programming language and would not have copy-pasted code from X.