I would like to think that it wouldn't be illegal - but then again John Fogerty was sued for sounding too much like himself.
(in that he recorded an album at record label one, moved to record label two, recorded new music at record label two, and record label one sued because one of the songs on record 2 sounded "too much like" a song from record 1. Even though they were both completely original songs that he himself wrote.)
So, um, I would recommend not reworking a remix into an original piece for profit. It might backfire.