It wouldn't be that difficult considering they both run on the same engine. The way scripts, objects, everything else program related would be virtually the same.
However, yes, reverse engineering is illegal, and I am pretty sure that's against the rules if I read correctly :P