The InsetWindow class is what actually draws the panel, its position determined by the xOffset/yOffset properties. As for the assembly code, you don't need to worry: the important part is in ScrollableInventory::drawInvWindow. Which is a mess and a half of guessed variable names but still!
In an otherwise untouched ScrollableInventory.sc, around line 1322 it runs through all the objects that were added, checks if they're inventory items or not, and places them accordingly:
(= temp17 32767)
(if firstThru
(= scrollableInventoryFirst (self first:))
(while scrollableInventoryFirst
(= temp9 (NodeValue scrollableInventoryFirst))
(if (not (temp9 isKindOf: InventoryItem))
; This is a button
(= theTheTheTheTheCurPos_2
(CelWide (temp9 view?) (temp9 loop?) (temp9 cel?))
)
(= theTheTheTheCurPos_2
(CelHigh (temp9 view?) (temp9 loop?) (temp9 cel?))
)
(if (not (& (temp9 signal?) $0080)) ;icFIXED
; If we haven't decided the height of the iconbar,
; do so now.
(if (== temp17 32767)
(= temp17 (- temp11 theTheTheTheCurPos_2))
; ...so that's a pretty good hint I guess.
; that's actually (= atY (- invH cHigh))
)
; Place the button along the top.
(temp9
nsLeft: temp16
nsTop: temp17
nsBottom: (+ temp17 theTheTheTheCurPos_2)
nsRight: (+ temp16 theTheTheTheTheCurPos_2)
)
)
(= temp16 (+ (temp9 nsLeft?) theTheTheTheTheCurPos_2))
(= temp17 (temp9 nsTop?))
(temp9 signal: (& (temp9 signal?) $fffb))
(temp9 show:)
)
(= scrollableInventoryFirst
(self next: scrollableInventoryFirst)
)
)
)
Now, right before that it tries to lay out the items, and that quite explicitly according to the InsetWindow's offsets. It uses temp17/atY for that, but then reuses it -- after all, it'll point at the last item's coordinate in the grid, not the top of the window.