Since you're first ranked, your raw mark doesn't matter (same goes for last ranked, but it can be volatile depending on the mean of the cohort). If you're any other rank, then it does matter.
The raw mark by itself isn't important. It's the raw mark with respect to others in your cohort which is very important. Coming second by 2 marks will yield a better assessment mark than coming second by 15 marks. Your rank doesn't determine your assessment mark. A rank is an order, not a mark.
Now, since you are first, for your assessment mark, the mark you will get will be the highest HSC exam mark in your school cohort, irrespective of who achieved that mark (generally, unless there's some crazy outliers). So if 6th ranked student achieved 94 HSC exam mark and that was the highest, you will received 94 for your assessment mark. However, all students will retain their HSC exam mark - this can't change. So, your final HSC mark will be the average of that highest exam mark (this is your assessment mark) + your exam mark. But, if you achieve the highest exam mark, then you will obviously get the average of your own mark + your own mark.
If you're not ranked first, then factors such as highest/lowest exam marks, how your raw marks deviate from other students, the mean of your school and exam marks, any outlier marks, and a few minor factors.