REDIVIVUS

Proposals / #719

Recover the Mac allied-unit predicate's full Boolean return

applied · by Commit-Will · submitted 2026-11-01, applied 2026-11-02

Ghidra vmac 109 · 39698f0

The complete164-byte predicate returns a full32-bit0/1, not an unknown byte. Identical-unit path sets EAX=1; the party path combines SETcc bytes then MOVZX EAX,AL. The remaining path returns IsAllyOf's EAX unchanged, and that complete107-byte callee returns only ESI=0/1 via MOV EAX,ESI while preserving caller ESI. All three callers test full EAX as status. Restore only the return to existing4-byte BOOL. Preserve the unused leading undefined4 slot, both existing unit formals, all selected names, cdecl and three stack positions; no game-pointer identity is assigned to the unused argument. Complete target, IsAllyOf, register-preservation helper and caller bytes independently audited in the original Mac database. Nonexecutable LINKEDIT DATA ref is metadata. No Windows twin, shared party/layout edit, source/runtime or matching claim.

Changes 1, applied together

  1. Set prototype mac 0x0027b14e

    signatureundefined SUNIT_AreUnitsAllied(undefined4 param_1, D2UnitStrc * param_2, D2UnitStrc * pOtherUnit)→BOOL SUNIT_AreUnitsAllied(undefined4 param_1, D2UnitStrc * param_2, D2UnitStrc * pOtherUnit)
    convention__cdecl