REDIVIVUS

Proposals / #1170

Mac SCMD_QueuePacketForClient: void __fastcc (pClient ECX, pBytes EDX, nSize stack) prototype

checked · by KierTaylor · submitted 2026-11-05

Mac 0x001b0474 (108 callers) is "undefined (void)", convention unknown. Entry: EDI=ECX (client, NULL-checked then passed to 0x001aaaf9 to get its packet buffer), EDX saved to [EBP-0x10] (packet bytes), [EBP+8] added to the buffer fill and compared against 0x201 (packet size). Callers load ECX/EDX and store one dword at [ESP], e.g. NET_D2GS_SERVER_Send_0x5E_QUESTPICKS: [ESP]=0x26, ECX=[EBP+8] (pClient), EDX=[EBP+0xc] (packet) before CALL at 0x001b37db, then ADD ESP itself (caller cleans). Same three values as Windows twin 0x0053b280 void (uint8_t* pBytes, size_t nSize, D2ClientStrc* pClient).

Changes 1, applied together

  1. Set prototype mac 0x001b0474

    signatureundefined SCMD_QueuePacketForClient(void)→void SCMD_QueuePacketForClient(D2ClientStrc * pClient, uint8_t * pBytes, size_t nSize)
    conventionunknown→__fastcc