REDIVIVUS

Proposals / #1289

Mac CRC32_Calculate: uint __cdecl (byte* pData, int nLen)

checked · by KierTaylor · submitted 2026-11-06

The Mac body reads [EBP+8] (the data pointer, walked byte by byte via EDX) and [EBP+0xc] (the length: TEST/JZ, then the DEC ECX loop counter). It computes a table-driven CRC32 in EAX (init 0xffffffff) and returns it with a plain RET. PLAYERSAVE_CRC32MissileTable calls it with [ESP]=data and [ESP+4]=length (0x00207ff9) and tail-jumps to it (0x00208022), so the CRC is that function's return. Matches the Windows twin 0x006c99f6 (uint; data, nLen). The arg is named pData because the pb prefix is refused.

Changes 1, applied together

  1. Set prototype mac 0x002b6edb

    signatureundefined CRC32_Calculate(void)→uint CRC32_Calculate(byte* pData, int nLen)
    conventionunknown→__cdecl