REDIVIVUS

Proposals / #1341

Mac SRP_ComputeServerProof: void __cdecl (pSrp, pClientPublic, pClientProof, pSessionKey, uint8_t* pHashOut)

checked · by KierTaylor · submitted 2026-11-06

The Mac body SHA1-inits a local context, feeds [EBP+0xc] (0x20 bytes, the client public value), [EBP+0x10] and the further args, and finalises into the out buffer. SRP_ClientVerifyServerProof 0x002f9785 stores [ESP+4]=ctx+0x60, [ESP+8]=ctx+0xa8, [ESP+0xc]=ctx+0x80 and [ESP+0x10]=LEA of a 20-byte local (the hash out), then memcmp's that local against the server proof. Slot [ESP] (pSrp) is left unset, matching the Windows twin 0x00528480, whose pSrp is 'passed by the callers but not read'. Same 5-arg layout, void.

Changes 1, applied together

  1. Set prototype mac 0x002f92a4

    signatureundefined SRP_ComputeServerProof(void)→void SRP_ComputeServerProof(D2Srp* pSrp, void* pClientPublic, void* pClientProof, void* pSessionKey, uint8_t* pHashOut)
    conventionunknown→__cdecl