If they can argue its copyright infringement, then you can be sued for it. Sometimes you can get away with just a rebuild of the engine without the assets (do not try to copy the assets!) but even then its up to the company's lawyers if they want to push it. Certainly if you try to sell your remake things get spiky. Can look at all the legal disclaimers on things like OpenSAGE as an example. But plenty of companies are cool, as long as they see no competition to their own copyright: https://en.wikipedia.org/wiki/List_of_game_engine_recreation...
There is also trademark law to consider.