Whether it's legal depends on how old, and whether someone still holds a valid copyright and any rights under the EULA that applied when the game was sold. If the game is not sold or published, and there is no technical support for it, then I would have few moral qualms about hacking away at it.
You'll need to look at the config files and other resources that make up the game to begin with. Things like servers may be listed in text or binary formats. If you are trying to build a local server you'll need to get familiar with packet sniffing tools, which is not my area of expertise 🙂.