Use the existing MonItemPercent row pointer for its Windows lookup
Ghidra v1797 · 3bccb89
Win 00654fe0 returns an address in the existing D2MonItemPercentTxt table, currently int32_t. Its complete 79-byte body loads the typed base at 0096d484 and computes base + index*4, or explicitly clears full EAX for rejected indices. Error paths terminate through the verified CRT ExitProcess chain. Existing D2MonItemPercentTxt is four bytes with four percentage-byte fields. Its sole producer 00654f20 defines those four schema offsets, passes row size 4 and literal monitempercent to CompileTxt, then stores the returned table base at 0096d484; plain refs prove that is the sole write. Restore only the record-pointer return, preserving nTCArrayIdx, its signed type, one stack argument, stdcall and RET4. Complete target and 150-byte producer are independently decoded from the original Windows PE. There are no incoming references, so no active caller or runtime benefit is claimed. No Mac pair, table layout, local or implementation change is inferred.
Changes 1, applied together
Set prototype
win 0x00654fe0signatureint32_t TC_GetTreasureClassArrayEntry(int32_t nTCArrayIdx)→D2MonItemPercentTxt * TC_GetTreasureClassArrayEntry(int32_t nTCArrayIdx)convention__stdcall