REDIVIVUS

Proposals / #1499

Mac SCOMP_AcquireTempBuffer: void* __fastcc (uint32_t nSize ECX, int32_t* pShared EDX)

checked · by KierTaylor · submitted 2026-11-08

ECX -> EDI = the requested size (SMemAlloc 0x00018b0b size; compared with and stored into the cached size global). EDX -> [EBP-0x10] = an out flag: 0 when a private buffer is allocated because the shared one is busy (0x0000f1fb), 1 when the shared buffer is handed out (0x0000f29d). Under the SComp lock it returns the buffer in EBX (MOV EAX,EBX at 0x0000f2b7). There are no stack args. This is the counterpart of SCOMP_ReleaseTempBuffer(pBuf, bShared). Caller: SCompDecompress 0x0000f41e. pb is refused, so the flag is named pShared.

Changes 1, applied together

  1. Set prototype mac 0x0000f191

    signatureundefined SCOMP_AcquireTempBuffer(void)→void* SCOMP_AcquireTempBuffer(uint32_t nSize, int32_t* pShared)
    conventionunknown→__fastcc