REDIVIVUS

Proposals / #1217

Mac SAVE_SerializeItemIfValid: int32_t __cdecl 8-arg prototype (pGame, pUnit, pItem, szText, nSize, ...)

checked · by KierTaylor · submitted 2026-11-05

Mac 0x00207841 is "undefined (void)", convention unknown. Stack slots [EBP+8]..[EBP+0x24] are the eight Windows parameters: [EBP+0x10] item (NULL check, flags +0xc9), [EBP+0x14]/[EBP+0x18] buffer and size passed as args 2-3 to the item serializer 0x00178e20 at 0x002078b0, [EBP+0x1c]/[EBP+0x20]/[EBP+0x24] flags that gate a validity check (0x00207866-0x00207885). Returns ESI (bytes written or -1) in EAX; no ECX/EDX on entry; plain RET. Windows twin 0x005316d0: int32_t (pGame, D2UnitStrc* pUnit, D2UnitStrc* pItem, char* szText, size_t nSize, int32_t nParam1, nParam2, nParam3); the three generic flags get fallback names because the checker refuses nParamN.

Changes 1, applied together

  1. Set prototype mac 0x00207841

    signatureundefined SAVE_SerializeItemIfValid(void)→int32_t SAVE_SerializeItemIfValid(D2GameStrc * pGame, D2UnitStrc * pUnit, D2UnitStrc * pItem, char * szText, size_t nSize, int32_t nTmp1, int32_t nTmp2, int32_t nTmp3)
    conventionunknown→__cdecl