Its only illegal if you get the source code from ripping the compiled binaries apart.