Recover the Mac unit tooltip getter input and object text pointer result
Ghidra vmac 111 · 3cfe190
Mac 0x0011ff57 is currently undefined(void) with an unknown convention. Native code reads one Stack[4] unit pointer and returns object-data +40, the existing char[16] owner-name field. Recover char * HOVER_GetUnitTooltip(D2UnitStrc * pUnit), __cdecl. Both actual calls supply the incoming unit; the native six-row dispatch and entry reachability allow only UNIT_OBJECT (2) to reach them. A byte consumer, raw (%s) format and an independent setter's destination/length request corroborate character storage. The complete getter, both call preparations and caller-owned frame establish the observed input and caller-cleanup contract. Preserve the selected function name; remove no existing formal. Four code regions (4,121 bytes), 35 data bytes and two alignment bytes match separate assembly. No copy effect, NUL, lifetime, memory safety, runtime, original Mac-file hash or build-gain claim.
Changes 1, applied together
Set prototype
mac 0x0011ff57signatureundefined HOVER_GetUnitTooltip(void)→char * HOVER_GetUnitTooltip(D2UnitStrc * pUnit)conventionunknown→__cdecl