The HSC exam is worth 50% of your marks, so yes you can still do well even if you bomb the trials. However, you must be realistic. If your failing your trials (when I say fail I mean less then 50% not just a bad mark) and ranking very poorly, then a comeback will be very difficult as you will need to perform extremely well in the externals.
Depends how much trials are worth.
A lot of mine are worth ~30%, which isn't actually that much depending on how well you've performed in your other assessments