benilla-re systems structs docs

s_netMessagesDispatched

global · net

Address
0xc0d46c · 4 bytes, up to 0xc0d46f
Type
uint32_t
Meaning
Counts the packets the dispatcher has handled
Confidence
verified, proof two
Finding
net/dispatch#dispatch

Finding: Dispatch in net: dispatch

0x537aa0 reads the packet's 16-bit opcode, counts one in 0xc0d46c, calls the client's slot 16 with it (0x537b00, a bare return in all three vtables that hold it), and calls the registered handler with the context in ecx, the opcode in edx, and the packet's time and data store on the stack. A handler returns with ret 8. With none, it calls the data store's slot 6 and drops the packet. The opcode is not range-checked: from 0x33c to 0x677 the handler comes from the context table, and the context, like every handler above 0x677, from past both tables. A packet with no opcode bytes leaves the 16-bit read unwritten, so the opcode is the store pointer's high half.

The derivation is in the doc.