Get it on some flat pavement and it should tell you the whole story. Like was said the upper steering stem pipe that is in front of the gas tank is very easily bent and it's just about as easy to bend back. As long as the tubing or welds aren't cracked, you should be OK bending it back. Another soft spot is where the A arm mounts to the frame. Look closely at the welds and see if the paint has flaked off. The other really soft spot is the frame rails where the grab bar mounts. This is really more of an appearance problem and it will make the whole quad look tweeked. Bang it back down {or up}. As long as the welds are OK, you can still ride it. If the welds are bad and the frame is significantly bent, look for a replacement or get your local welding shop to repair it.
If you had it insured, it's time to cash in. When mine got flipped, the shop I took it to said it is $600 for a frame and 9 hours to exchange the parts at $58 per hour {$522}. plus all new bolts, seals, washers etc. plus new plastic and on and on. I thanked my ins co for the generous payment and I'm still riding it as it was except for the required parts.