It definitely isn't too late to redeem yourself. Keep in mind that the HSC exams contribute 50% towards your final marks for your respective subjects, and your marks in your HSC exams are determined based on your own performance. They are not affected by any other factors. As was mentioned above, your trial exams constitute only one part of your overall Assessment Mark, meaning that if you have been performing consistently well throughout year 12, i.e. in the rest of your assessment tasks (which I suspect you have been given your estimated 96, you will likely end up with favourable final ranks, consequently putting you in a favourable position as you approach the HSC exams, in which you must perform to the best of your abilities as the HSC exam can make a significant difference, particularly if you perform well, ultimately allowing you to hopefully achieve an ATAR in your desired range.
In terms of your chances of becoming dux, I don't think anything has been finalised yet. It is a common occurrence for students who achieve high ATAR's to perform unsatisfactorily in one of their assessment tasks/exams. This means that they are definitely able to turn things around in their favour, and eventually achieve their respective ATAR goal. There is still 50% of your final mark yet to be determined, and your chances of becoming dux ultimately depend on your overall performance relative to that of your cohort. Based on this, you should not give up, as I don't think there isn't any hope. However, I would still advise you to have good performance as your primary goal instead of specifically aiming to become the dux of your school, because even if you don't perform well enough to become dux, your overall results will still be great and that alone will make you proud of your achievements.
I hope this helps!