Disclaimer: This is currently out of date, unfinished and not usable with the current version of the game and I am not responsible for anything you may do with this code.
It's been a while since I worked on this project as I hit a wall during development and could not get world loading to work and slowly lost interest. I wanted to wait to have a working "sandbox" before releasing this code but I figured maybe it could be useful to other people while I'm not actively working on it myself. This is an emulator which is able to go up to character creation/selection (some opcodes are probably outdated). It contains the code required to emulate all(?) of the game's network encryption.
https://bitbucket.org/drakefish/nxsemu/overview
What it currently does:
- Emulates the sts server logon and encryption used by StsConnLib. (SRP6 and RC4)
- Emulates the game's auth/realm servers and encryption. (Unknown encryption name but it currently works)
- Contains experimental packets serialisation code for readable and simple packet data.
What needs to be done for it to be a working sandbox:
- Update currently used opcodes.
- Find, code and send the right game packets for reaching the world.
- Possibly more tweaks and fixes to the packets serialization and to the bitpacker.
Note: Even though I reversed the algorithm and made my own code from it, I still don't know what algorithm the "PacketCrypt" code (link here) is based on. If anyone recognizes what it is, I would be interested in having more information about it .