It is based on the average of your moderated internal marks and external marks (ie just your normal hsc mark), however, if you’re first your internal mark will be the highest external mark from your cohort (presumably your own), and because state ranking pretty much requires you to be first, it might as well be external only beyond that