The Hangover

To celebrate his upcoming marriage to Tracy Garner, Doug Billings travels to Las Vegas with his best friends Phil Wenneck and Stu Price, and Tracy's brother Alan, in Doug's future father-in-law's vintage Mercedes-Benz. They spend the night at Caesars Palace, where they relax in the room before celebrating with a few drinks on the hotel rooftop. The next morning, Phil, Stu, and Alan awaken to find they have no memory of the previous night, and Doug is nowhere to be found. Stu's tooth is in Alan's pocket, their hotel suite is in a state of complete disarray, a tiger is in their bathroom, a chicken in their living room, and a baby is in the closet, whom they name "Carlos". They find Doug's mattress impaled on a statue outside of their hotel and when they ask for their Mercedes, the valet delivers an LVPD police cruiser.
Using clues to retrace their steps, the trio travel to a hospital where they discover they were drugged with Rohypnol ("roofies"), causing their memory loss, and that they came to the hospital from a chapel. At the chapel, they learn that Stu married a stripper named Jade, despite being in a long-term relationship with his girlfriend Melissa. Outside the chapel, the trio is attacked by gangsters saying they are looking for someone. They flee and visit Jade, discovering that she is the mother of the baby, whose real name is Tyler. They are then arrested by the police for stealing the police cruiser. After being told that the Mercedes has been impounded, the trio is released when they unknowingly volunteer to be targets for a taser demonstration. While driving the Mercedes, they discover a naked Chinese man named Leslie Chow in the trunk. Chow jumps out of the trunk, beats the trio up with a crowbar and flees. Alan confesses that he drugged their drinks to ensure they had a good night, believing the drug to be ecstasy.
Returning to their villa, they find the boxer Mike Tyson, who orders the trio to return the tiger to his mansion immediately. Stu drugs the tiger with the remaining Rohypnol, and they drive towards Tyson's home in the Mercedes. However, the tiger awakens and attacks them, clawing Phil on the neck and damaging the car's interior. After pushing the car the rest of the way to the mansion, Tyson shows the trio footage of them at his house to help them locate Doug. While driving, their car is intentionally t-boned by another vehicle. The passengers are revealed to be the gangsters from the chapel, and their boss Chow (the naked man from the trunk). Chow accuses the trio of kidnapping him and stealing $80,000 that was in his purse. As the trio denies this, Chow tells them he has Doug, and threatens to kill him if his money is not returned. Unable to find Chow's $80,000, Alan, with help from Stu and Jade, uses his knowledge of card counting to win $82,400 playing Blackjack.
They meet with Chow and exchange the money, only to find that "Doug" is the black drug dealer, who accidentally sold Alan the Roofies. With the wedding set to occur in 5 hours, Phil calls Tracy and tells her that they cannot find Doug. When "Black Doug" mentions that, "If you take Roofies, you're more likely to end up on the floor than on the roof," Stu realizes where Doug is. The trio travels back to their hotel where they find a delirious and badly sunburned Doug on the roof. Stu, Phil, and Alan moved him there on his mattress the night before as a practical joke, but forgot where they left him. Doug's mattress had been thrown onto the statue by Doug, in an attempt to signal help. Before leaving, Stu makes arrangements to go on a date with Jade the following week. With less than four hours before the wedding and with no flights to L.A. available, the four race home. Along the way, Doug reveals he has possession of Chow's original $80,000. Despite their late arrival, Doug and Tracy are married, the former learns the damaged Mercedes was a wedding gift, and Stu angrily breaks up with Melissa, having grown tired of her controlling attitude. As the reception ends, Alan finds Stu's digital camera containing photos of the events they cannot remember, and the four agree to look at the pictures together before deleting the evidence of their exploits.
All of them, with the exception of Alan, are deeply disturbed by the pictures, which are shown during the credits.

Question: How do the guys figure out what they did?