Private servers are in no way illegal so long as it's emulation, emulation is perfectly fine.
one would first need to decrypt the packet encryption and log every single packet send and received to even start work on the emulator, but emulators are no joke they are huge projects (I used to be a dev on the PvPGN team(Battle.net Emulation)