had a similar problem connecting my S3 Galaxy with drivers not installing properly and messages saying USB device malfunctioning and despite being able to charge the phone it was not being recognised as a mass storage device or offering me an option on the phone as to what i would like it to connect to the pc as until.....
i changed my USB cable !!
go figure.... i had read some posts that had suggested this, and in the end after trying all the on phone settings from debugging to what ever else i could try this is what worked ...new cable ..drivers installed themselves ....selected use as media device on phone from notificaton menu....double clicked my Computer and opened Phone to display media....and was then also able to select USB tethering to allow connection to the internet which is what kicked this all off in the first place ....
.hope this helps some others....
what i also discovered during this process was how to set the phone up as a wi fi hotspot...i just followed a neat you tube detailing this and was at least able to connect my laptop to the internet while i sorted out the rest of my problem
How to Setup Samsung Galaxy S3 as a WiFi HotSpot SIII GT-i9300 - YouTube