Skip to main content

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.

This map covers every chat opcode processed by Game.exe and ps_game.exe in Shaiya Core V9. For each opcode you will find the client handler virtual address, the vtable slot it dispatches through, the decompiled .c file path in this repository, and the resulting UI effect. The companion PACKET_SPEC.md documents the wire layouts; this file focuses on routing, function addresses, and code evidence. Base address for all VAs: 0x00400000.
BinaryMD5
Game.exec1edd96639ad81835624b9c4516ac781
ps_game.exe91b212afbe6623382713772489dc82ce

Repository Layout

Folder / fileContents
docs/All .md specs (PACKET_SPEC, WIRE_CRYPTO, CHAR21_SITES, …)
game-chat-native/Client .c decompiles + game-chat-functions.manifest
psgame-chat-native/World server .c decompiles + psgame-chat-functions.manifest
pslogin-chat-native/Login 0xA101 send path (15 .c files)
tools/ghidra/Canonical manifests + decompile scripts

Key Globals

GlobalVA / value
Chat singletonDAT_022fa2f0
Vtable (.rdata)0x00747544
Regenerate client .c./tools/ghidra/decompile-game-chat.sh (binaries in bin/)
Client manifestgame-chat-native/game-chat-functions.manifest
Server manifestpsgame-chat-native/psgame-chat-functions.manifest

Flow Overview

DirectionMain steps
SendInputCaptureSubmitChatInputPacketSend_*NetworkSend
RecvGameSocketWndProc → decrypt → PacketDispatcher → handler → vtable → buffer / format → DrawText / SysMsgChatWindow_Render
World / entityNotify (0xE05 / 0xE06), speech balloon (4126D0), nameplate (56C650), position FX

Received Packets — All Opcodes

Routing source: game-chat-native/recv/PacketDispatcher_005f1e10.c (chat opcodes ~L917; crypto 0xA101 ~L1193).
All handler VAs and vtable offsets are confirmed from game-chat-functions.manifest and cross-checked against decompiled .c files. Entries marked “stub vfn” have a ret 4 body with no UI output.
OpcodeChannelHandler VAHandler fileVTable offset / VAVTable fileMain effect
0x0E05Notify A005E5000handlers/Handler_ChatNotify_E05_005e5000.c+0x31C / 00595690vtable/ChatNotify_vfn_0x31C_00595690.cEntity FX / position (no chat box)
0x0E06Notify B005E5070handlers/Handler_ChatNotify_E06_005e5070.c+0x320 / 005957E0vtable/ChatNotify_vfn_0x320_005957e0.cEntity FX / position (no chat box)
0x0F02Admin monitor005E4E30handlers/Handler_AdminChatMonitor_005e4e30.c+0x308 / 00595570vtable/AdminChatMonitor_vfn_0x308_00595570.cMonitor flag or SysMsg
0x0502Entity spawn005E0CF0handlers/Handler_Packet_0502_005e0cf0.c+0xF0 / 00593970vtable/ChatEntitySpawn_vfn_0xF0_00593970.cWorld entity update (no chat box)
0xA101Key material005E3D60handlers/Handler_Packet_A101_KeyMaterial_005e3d60.c+0x254 / 005A4D50crypto/Connection_OnKeyMaterial_005a4d50.cCrypto handshake (see WIRE_CRYPTO.md)
0x1101Normal005E50E0handlers/Handler_ChatNormal_005e50e0.c+0x324 / 0059C380vtable/ChatNormalParty_vfn_0x324_0059c380.cChat box + 3D balloon
0x1102Whisper005E5180handlers/Handler_ChatWhisper_005e5180.c+0x328 case 0 / 0059BDB0vtable/ChatWhisperTradeGuildZoneMega_vfn_0x328_0059bdb0.cChat box + whisper highlight
0x1103Trade005E5250handlers/Handler_ChatTrade_005e5250.c+0x328 case 1sameChat box (SysMsg)
0x1104Guild005E5310handlers/Handler_ChatGuild_005e5310.c+0x328 case 2sameChat box (SysMsg)
0x1105Party005E53D0handlers/Handler_ChatParty_005e53d0.c+0x324 / 0059C380vtable/ChatNormalParty_vfn_0x324_0059c380.cChat box + 3D balloon
0x1106Error005E5470handlers/Handler_ChatError_005e5470.c+0x340 / 0059ABA0vtable/ChatError_vfn_0x340_0059aba0.cChat box (fixed SysMsg)
0x1107Shout005E54A0handlers/Handler_ChatShout_005e54a0.c+0x32C / 0059AA10vtable/ChatShout_vfn_0x32C_0059aa10.cChat box + 3D balloon
0x1108Megaphone005E5540handlers/Handler_ChatMegaphone_005e5540.c+0x328 case 3vtable/ChatWhisperTradeGuildZoneMega_vfn_0x328_0059bdb0.cChat box (SysMsg)
0x1109Zone005E5600handlers/Handler_ChatZone_005e5600.c+0x328 case 4 / 5sameChat box (DrawText)
0x110AUnion005E56F0handlers/Handler_ChatUnion_005e56f0.c+0x34C / 0059A940vtable/ChatUnion_vfn_0x34C_0059a940.cChat box (DrawText + GetMsg name)
0x110BChannel link005E5740handlers/Handler_Chat_110B_005e5740.c+0x350 / 0059A9D0vtable/ChatChannel_vfn_0x350_0059a9d0.cText → entity nameplate (56C650)
0x1111Area (alt)005E57D0handlers/Handler_Chat_Area_1111_005e57d0.c+0x330 / 0059A900vtable/ChatArea_vfn_0x330_0059a900.cChat box (SysMsg 0x31)
0x1112Long text005E88D0handlers/Handler_Chat_LongText_1112_005e88d0.c+0x578 / 0059BD00vtable/ChatLongMsg_vfn_0x578_0059bd00.cChat box (SysMsg, buf 0x400)
0xF101Party notify005E5880handlers/Handler_Chat_PartyNotify_F101_005e5880.c+0x324 / 0059C380vtable/ChatNormalParty_vfn_0x324_0059c380.cParty chat box (param_1=1)
0xF102Admin whisper005E5920handlers/Handler_Chat_Admin_F102_005e5920.c+0x328 / 0059BDB0vtable/ChatWhisperTradeGuildZoneMega_vfn_0x328_0059bdb0.cPattern C · SysMsg 0x162 / highlight
0xF103Admin trade/shout005E59F0handlers/Handler_Chat_Admin_F103_005e59f0.c+0x328 case 1samePattern B · SysMsg 0x163
0xF104Admin guild005E5AB0handlers/Handler_Chat_Admin_F104_005e5ab0.c+0x328 case 2samePattern B · SysMsg 0x172
0xF105Admin party005E5B70handlers/Handler_Chat_Admin_F105_005e5b70.c+0x324 / 0059C380vtable/ChatNormalParty_vfn_0x324_0059c380.cPattern A · party SysMsg
0xF106Admin long / sys005E5C10handlers/Handler_Chat_Admin_F106_005e5c10.c+0x334 / 0059ABC0vtable/ChatAdminLong_vfn_0x334_0059abc0.cu16le len · text (max 0x7D0) · SysMsg 0x164 · optional EVENTMSG- prefix
0xF107Whisper target set005DE950handlers/Handler_Chat_Admin_F107_005de950.c+0x344 / 0056BCB0vtable/ChatWhisperTarget_vfn_0x344_0056bcb0.cS→C Pattern H char[21] · stub vfn · server sets CUser+0x5810 · client no UI
0xF109Whisper target clear005DE9B0handlers/Handler_Chat_Admin_F109_005de9b0.c+0x348 / 0056BCB0same (alias slot)S→C Pattern H · dual notify · server clears CUser+0x5810 · client no UI
0xF10AAdmin long005E88D0handlers/Handler_Chat_LongText_1112_005e88d0.c+0x578ChatLongMsg_vfnSame handler as 0x1112

Shared Vtable +0x328 Sub-Channel Dispatch

The shared vtable function at +0x328 (0x0059BDB0) — ChatWhisperTradeGuildZoneMega_vfn — handles six different channels via its param_3 argument.
caseChannelCalled functions
0WhisperAppendSuffix 0x420C10, SysMsg 0x423150, opt. WhisperHighlight 0x47F970
1TradeAppendSuffix, SysMsg
2GuildAppendSuffix, SysMsg
3MegaphoneAppendSuffix, SysMsg
4Zonelookup + DrawText 0x422B90
5Zone (alt)lookup + DrawText 0x422B90

Admin Recv Wire Details — 0xF1020xF109

Evidence: game-chat-native/handlers/Handler_Chat_Admin_F*.c
OpcodeMirrorPayload (after opcode)Handler read sequence
0xF1020x1102C u8 dir · char[21] · u8 len · text[len]Scalar×1 · String 0x15 · Scalar×1 · String len
0xF1030x1103B char[21] · u8 len · text[len]String 0x15 · Scalar×1 · String len
0xF1040x1104B (same as F103)same
0xF1050x1105 / 0xF101A u32 id · u8 len · text[len]Scalar×4 · Scalar×1 · String len
0xF106(unique)u16le len · text[len] (buf 0x7D0)Scalar×2 · String (len & 0xFFFF)
0xF107server whisper bindH char[21]String 0x15 only → stub vfn
0xF109server whisper clearH char[21]String 0x15 only → stub vfn

Admin Whisper Bind — 0xF107 / 0xF108 / 0xF109

CONFIRMED May 2026. Server state field CUser+0x5810 holds the bound partner’s id (CUser+0x128 of the whisper partner). Full send chain: psgame-chat-native/send/Chat_AdminWhisper_F107_F109_chain.md.
DirectionOpcodePlaintext sizeEvidence
C→S bind0xF1070x17AdminChat_ProcessIncoming @ 0x0048038E; clears packet+0x16 before World_FindUserByName @ 0x00414D40
C→S clear0xF1092 (opcode only)case @ L317 — Chat_AdminWhisperHelper @ 0x0047F350; no body read
S→C bind notify0xF1070x17mov $0xF107 @ 0x004803C7 — dual SConnection_Send: target gets admin name, admin gets target name
S→C clear notify0xF1090x17mov $0xF109 @ 0x0047F390 — dual send from Chat_AdminWhisperHelper
C→S relay0xF108len + 3AdminChat_ProcessIncoming case @ asm 0x00480462; requires CUser+0x5810 != 0
S→C relay (partner)0xF102len + 0x19Pattern C dir=0 · admin name @ CUser+0x184
S→C relay (echo)0xF102len + 0x19Pattern C dir=1 · partner name
ChatWindow_SetWhisperTarget @ 0x0047C690 (vtable +0x198) is not wired to 0xF107 / 0xF109 recv handlers. The stock client does not update the whisper UI when the server sends an admin bind notification — the vfn at 0x0056BCB0 is a ret 4 stub with no side effects.

0xF108 — Bound Admin Whisper Relay

AspectDetail
Client recvNot routedPacketDispatcher @ 0x005F1E10 jumps F107F109 (no F108 case)
Client sendAbsent — zero mov $0xF108 in Game.exe
Server handlerAdminChat_ProcessIncoming case @ asm 0x00480462
C→S wirePattern I: u16 + u8 len + text[len] (plain len + 3)
S→C relayDual 0xF102 Pattern C (dir=0 partner / dir=1 admin) — never emits 0xF108 downstream
PrerequisiteCUser+0x5810 must be set by a prior C→S 0xF107
Full docdocs/ADMIN_F108_WHISPER_RELAY.md

Send Path (Client → Server)

Client Send Functions

SymbolVAFileNotes
NetworkSend005EA9A0send/NetworkSend_005ea9a0.cFinal wire (__cdecl)
PacketSend_Chat005ED060send/PacketSend_Chat_005ed060.cNormal / shout vanilla
PacketSend_Whisper005ED160send/PacketSend_Whisper_005ed160.cOnly send function with char[21]
PacketSend_Guild005ED220send/PacketSend_Guild_005ed220.c
PacketSend_Party005ED2B0send/PacketSend_Party_005ed2b0.c
PacketSend_Zone005ED340send/PacketSend_Zone_005ed340.c
ChatWindow_FormatOutgoing005663B0send/ChatWindow_FormatOutgoing_005663b0.cBuilds payload
ChatWindow_SubmitChatInput0047A4B0ui/ChatWindow_SubmitChatInput_0047a4b0.cEnter / submit

Send Opcode → Channel

All send functions except PacketSend_Whisper use the compact layout opcode + u8 len + text (plaintext = msg_len + 3). The server injects the player name from CUser+0x184 during broadcast repackaging.
Send functionOpcode sentChannel
PacketSend_Chat(0, 0, …)0x1101Normal
PacketSend_Chat(0, 1, …)0x1103Trade
PacketSend_Chat(0, 2, …)0x1104Guild
PacketSend_Chat(0, 3, …)0x1105Party
PacketSend_Chat(0, 4, …)0x1107Shout
PacketSend_Whisper0x1102 / 0xF102Whisper
PacketSend_Guild0x1104Guild (direct)
PacketSend_Party0x1103 / 0x1105Trade / Party send
PacketSend_Zone0x1111Zone / Area
PacketSend_Chat(1, …)0xF1010xF105Admin channels

Server-Side Handlers (ps_game.exe)

SymbolVADescription
Chat_ProcessIncoming0x0047F400Main C→S dispatch for 0x11010x1112
AdminChat_ProcessIncoming0x0047FD10C→S dispatch for 0xF1010xF10A
Chat_BroadcastNormal(cells mode 7)Normal chat S→C broadcast
Chat_BroadcastTrade0x004192F0Trade S→C queue
Chat_BroadcastGuild0x00432530Guild + 0x0812 alliance S→C
Chat_BroadcastShout(mode 5)Shout radius broadcast
Chat_BroadcastNamed0x004D55B0Megaphone / name-bearing S→C
Chat_BroadcastZone0x00427090Zone / area fanout
CParty_BroadcastPacket0x0044E950Party member broadcast
Chat_AdminWhisperHelper0x0047F350Clears CUser+0x5810; sends F109 dual notify
SConnection_Send0x004ED0E0Final TCP send to one connection
World_FindUserByName0x00414D40Name → CUser* lookup
World_FindUserById0x00414D10Id → CUser* lookup
Chat_LogGameLogB0x0047F190Monitor session logging (optional)

Chat Object Vtable (DAT_022fa2f0, base 0x00747544)

OffsetSymbolVAFileUsed by
+0xF0ChatEntitySpawn_vfn00593970vtable/ChatEntitySpawn_vfn_0xF0_00593970.c0x0502
+0x254Connection_OnKeyMaterial_vfn005A4D50crypto/Connection_OnKeyMaterial_005a4d50.c0xA101
+0x308AdminChatMonitor_vfn00595570vtable/AdminChatMonitor_vfn_0x308_00595570.c0x0F02
+0x31CChatNotify_vfn00595690vtable/ChatNotify_vfn_0x31C_00595690.c0x0E05
+0x320ChatNotify_vfn005957E0vtable/ChatNotify_vfn_0x320_005957e0.c0x0E06
+0x324ChatNormalParty_vfn0059C380vtable/ChatNormalParty_vfn_0x324_0059c380.c0x1101, 0x1105, 0xF101
+0x328ChatWhisperTradeGuildZoneMega_vfn0059BDB0vtable/ChatWhisperTradeGuildZoneMega_vfn_0x328_0059bdb0.c0x11020x1104, 0x1108, 0x1109
+0x32CChatShout_vfn0059AA10vtable/ChatShout_vfn_0x32C_0059aa10.c0x1107
+0x330ChatArea_vfn0059A900vtable/ChatArea_vfn_0x330_0059a900.c0x1111
+0x334ChatAdminLong_vfn0059ABC0vtable/ChatAdminLong_vfn_0x334_0059abc0.c0xF106
+0x340ChatError_vfn0059ABA0vtable/ChatError_vfn_0x340_0059aba0.c0x1106
+0x344ChatWhisperTarget_vfn0056BCB0vtable/ChatWhisperTarget_vfn_0x344_0056bcb0.c0xF107 (stub)
+0x348ChatWhisperTarget_vfn (alias)0056BCB0same0xF109 (stub)
+0x34CChatUnion_vfn0059A940vtable/ChatUnion_vfn_0x34C_0059a940.c0x110A
+0x350ChatChannel_vfn0059A9D0vtable/ChatChannel_vfn_0x350_0059a9d0.c0x110B
+0x578ChatLongMsg_vfn0059BD00vtable/ChatLongMsg_vfn_0x578_0059bd00.c0x1112, 0xF10A
+0x680ChatObject_PacketUnderflow00598DC0vtable/ChatObject_PacketUnderflow_vfn680_00598dc0.cgeneric recv
+0x684ChatObject_GenericPacketHandler00599C30vtable/ChatObject_GenericPacketHandler_vfn684_00599c30.cgeneric recv

Cross-Reference

DocumentContents
PACKET_SPEC.mdWire packet layouts, field offsets, pattern tables
CHAR21_SITES.mdAll fixed 21-byte name field read/write sites
WIRE_CRYPTO.mdAES-CTR cipher, envelope, handshake
CHAT_RE_GAPS.mdLacunas P0/P1/P2, balloon gates, admin recv
psgame-chat-native/Server .c decompiles
tools/ghidra/*.manifestFull VA list for all decompiled functions

Build docs developers (and LLMs) love