When your car is declared a total loss typically you will negotiate with the insurance company for a settlement. The amount that a totaled car is settled for is the actual cash value (ACV) which is determined by various means by the insurance company. The amount of your down payment and what you owe is not generally a means of determining the worth of a car since a car depreciates basically as soon as it drives off of the dealer's lot.
As for your warranty should see if the warranty company will reimburse you for the portion of the warranty that will not be used since you no longer have the car. If they will not this is something you could possibly negotiate into your settlement with the insurance company's claims adjuster.
Our article Function of an Insurance Adjuster could help you as you work to settle your claim.