ClickItemRight's two register parameters are the mouse Y and X, not an item and an inventory
ClickItemRight types ECX as D2UnitStrc * pItem and EDX as D2InventoryStrc * pGridCoords, but neither is ever dereferenced. They are only screen coordinates: ECX is copied to ESI (0048774b) and EDX to EDI (0048774d), then EDI minus the grid's nPixelLeft is divided by nCellWidth (0048776d MOV EAX,EDI; 0048776f SUB EAX,[0x7bcb8c]; 00487777 DIV ECX), and ESI minus nTop gives the row (0048777b MOV EAX,ESI; 0048777d SUB EAX,[0x7bcb94]). The same is repeated for the two bank grids. Both callers pass the mouse position: the generated source reads ClickItemRight((D2UnitStrc*)nMouseY, (D2InventoryStrc*)nMouseX, ...). This retypes both to int32_t. Their names are wrong too (nMouseY, nMouseX), but the tool will not rename chosen names, so that is left to review.
Changes 2, applied together
Retype variable
win 0x00487740 ECXtypeD2UnitStrc *→int32_tRetype variable
win 0x00487740 EDXtypeD2InventoryStrc *→int32_t