In the end, the HSC mark that is sent in to the board of studies (that is, your overall school mark) is the weighed average of all your assessment marks.
However, these are 'changed' in accordance to the external marks.
For instance
If i get ranked first out of a 'dumb' school with average marks of 50%, then the rank becomes irrelevant, because in the external exam, i'll still get crap compared to the state and in this way, your rank 1 in school becomes irrelevant.
Conversely, if i get ranked last in james ruse with a mark of 90%, i'll still do well compared to the state and again, my rank of last will become irrelevant.
Another example
Let's say i have a cohort that is very bright. But in my particular HSC year, the teacher decides to be a cock and sets extremely hard assessments/ marks extremely hard, and everyone fails all of the assessments. However, because we're still bright sparks, we all score 90% in the external. Then the BOS will say 'wow, these kids are actually smart, and they had hard assessments/ hard marking, so we'll bump their assessment marks up to an appropriate value'. In this way, both the ranks and marks are rather important.
The opposite will be true for not very smart kids who get easy assessments.
There's probably a complex formula for all this but i cant really explain it. The moderation of your assessment marks is determined by factors such as outliers, rank, external marks and the size of your cohort.
hope i answered.