The shaiya-chat-native-re project is a Ghidra decompilation and documentation corpus targeting the native chat subsystem of Shaiya Core V9. It covers the full chat flow from the Windows client through the world server and login handshake, providing decompiled C source, annotated manifests, wire-format specifications, and AES-CTR crypto analysis. The goal is to give reverse engineers and emulator developers a complete, reproducible base for understanding and reimplementing Shaiya’s chat protocol.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ThalissonTMora/shaiya-chat-native-re/llms.txt
Use this file to discover all available pages before exploring further.
Three Binary Targets
The corpus decompiles three Windows PE executables, each assigned to its own folder to prevent cross-contamination of generated.c files. All three binaries originate from the Shaiya-Core (V9) open-source project and are versioned in bin/.
| Target | File | Folder | Role |
|---|---|---|---|
| Client | Game.exe | game-chat-native/ | Chat UI, send/recv 0xA101, all 0x11xx handlers |
| World server | ps_game.exe | psgame-chat-native/ | Server-side chat dispatch, broadcast, queue pipeline |
| Login server | ps_login.exe | pslogin-chat-native/ | Outbound 0xA101 key-blob send path |
Corpus Size
The table below summarises the number of manifest entries (functions explicitly listed for export) and.c files currently committed to the repository. The .c count exceeds the manifest count because some binaries have extra decomps committed alongside the manifest-driven exports (client crypto, psgame-chat-native/script/, and pslogin-chat-native/crypto/BigInt_* for KeyTable support).
| Target | Manifest entries | .c files in repo |
|---|---|---|
Game.exe | 160 | 169 |
ps_game.exe | 136 | 143 |
ps_login.exe | 17 | 46 |
| Total | 313 | 358 |
Repository Folder Layout
| Folder | Contents |
|---|---|
docs/ | All guides and specs: packet layouts, wire crypto, chat channel map, RE status, gap analysis |
game-chat-native/ | Ghidra .c exports for Game.exe; manifest at game-chat-functions.manifest |
psgame-chat-native/ | Ghidra .c exports for ps_game.exe; manifest at psgame-chat-functions.manifest |
pslogin-chat-native/ | Ghidra .c exports for ps_login.exe; manifest at pslogin-crypto-functions.manifest |
tools/ | Ghidra export scripts (tools/ghidra/) and the ExportDecompileByAddress.java script |
bin/ | Versioned Shaiya Core V9 binaries (Game.exe, ps_game.exe, ps_login.exe) |
test/ | Test helpers and validation fixtures |
Top Manifest Categories per Binary
Each manifest row is tagged with a category that groups functions by role. The top categories per binary reveal the shape of the RE work done so far.| Target | Top manifest categories |
|---|---|
Game.exe | ui 32 · handlers 27 · vtable 16 · buffer 14 · recv 11 |
ps_game.exe | queue 26 · broadcast 17 · network 14 · pipeline 12 · handlers 12 |
ps_login.exe | keypath 6 · pipeline 4 · crypto 2 · network 2 |
Reimplementation Confidence
The table below represents AI-assisted assessments of how confidently each RE goal could be implemented given the current corpus. Confidence is expected to improve as gaps identified indocs/CHAT_RE_GAPS.md are closed.
| Goal | Confidence |
|---|---|
| Hook chat send/recv (plaintext) | ~95% |
| Login key-blob replay | ~90% |
| Server emulator + stock client | ~88% |
| Wire-compatible proxy | ~85% |
| Standalone cipher clone | ~82% (counter pre-CounterLoad may need live capture) |
All binaries are sourced from the Spelunkern/Shaiya-Core C++ patching framework for Shaiya Core V9. They are versioned in
bin/ so Ghidra scripts have a stable, hash-verified input.Main Documentation Sections
Packet Spec
Wire layouts for all
0x11xx chat opcodes and the 0xA101 key-blob packet, including field offsets and length encoding.Wire Crypto
AES-CTR cipher setup, counter derivation (
CRYPTO_COUNTER.md), and the login handshake key-blob RE.Chat Channel Map
Opcode-to-handler mapping for every chat channel: normal, whisper, trade, guild, party, shout, zone, union, admin.
RE Status
Milestone tracker, known gaps (
CHAT_RE_GAPS.md), and the missing-content inventory.