Name the index, state, bit word and stat key parameters of five small helpers
Ghidra v1805 · 8293ab3
Five one-parameter helpers whose job settles the name. INV_GetCharStatsTxtLine range-checks ECX and scales it by the 0xc4 charstats row, and its callers pass pUnit->nClassId. INV_GetUniqueItemsTxtLine scales ECX by the 0x14c row, and GFXUTIL_SetItemGfxFile passes ITEM_GetItemData_nFileIndex after checking quality 7. STATES_IsStateActive range-checks against the states count, as SKILLDRUID_ApplyTimedAuraBuff's nTxtStatesSize does, then tests that bit. FindFirstFreeBit inverts ECX and runs BSF on it. STATLIST_BinarySearchStatById compares EDI with the first dword of each 8-byte entry, the packed value proposal 601 calls nStatKey. Machine code only, not tested live.
Changes 5, applied together
Rename variable
win 0x004833e0 ECXnamenParam→nClassIdRename variable
win 0x00483470 ECXnamenParam→nFileIndexRename variable
win 0x0063a4a0 Stack[0x8]namenParam→nStateIdRename variable
win 0x00409220 ECXnamenParam→dwBitsRename variable
win 0x00624b90 EDInamenParam→nStatKey