You can catch more flies with honey than with vinegar...
yelling, shouting, cursing, threatening, will not get you anywhere.
did they tell you upfront there would be a cost? did they tell it was possible the repair would NOT be covered under warranty?
if you refuse to pay for the repair, have them return the phone, you sell it for parts and grab another one.
i dont know what issues you had with the phone but it would seem they determined it to be the fault of something you did with the device.
its your word against htc. they are probably playing things close to the chest since the company is going through the difficult times at the moment (pure speculation on my part though).
keep things civil. ask to speak to someone higher up and explain the issues and why you feel it may be a defective phone rather than user error.