Yeah the rank is the most important.
From the HSC results, your school gets a set number of score (larger if your school does well). Those scores are distributed according to the difference between each rank.
If are ranked first and do badly in the HSC, you'll still get the top mark (but not...