As I've seen more people asked about this in the past, I decided to make this short post. At first I thought of creating a patcher, but the addresses are different depending on the episode of the server, so I'll just shortly explain how to do it.
The changes you have to apply are in the game.exe.
You're also gonna need a hex editor.
The default ports are 30800(login) and 30810(game), which in hex means 50 78 and respectively 5A 78. You might think they should be like 78 50 and 78 5A, but in hex the bytes are inversed, which is normal.
If you search your game.exe for 50 78 and 5A 78 you will get a few results for each, only one of them being the right one, the one that defines the port.
Here are some addresses that might work for your game.exe:
- Login Server
- 0x0000AA66
- 0x0000AB56
- Game Server
- 0x000DEDC8
- 0x000DDF44
The offsets may vary depending on the game.exe and its episode, but no matter what, they're not far from the addresses written above.
Obviously you need to change the ports on the server side as well, ps_login.ini and ps_game.ini, in the ServerPort field, which is empty by default.
I hope someone finds this more helpful than I do.