From my understanding of the process, the total pool of examination marks are pooled (added together) then distributed according to your school rank.
As you said, if you are ranked 1st, you get the top exam mark as your moderated assessment mark and if you are ranked last you get the lowest...