While Harry is tried before the Wizengamot his older self possesses him and takes control. He escapes and no one knows where to. After some initial adjustment he returns to Grimmauld place at night and takes Hermione with him. With his future knowledge and power he can easily ensure the destruction of four Horcruxes.
Throughout the year he defeats the Death Eaters, destroys the dementors and insures the giants neutrality. He also confronts Voldemort multiple time.
Harry can do this because of the love of his bonded wife Hermione and his consorts Luna, Padma, Susan and Tracy.
This story is certainly rated R.
The story can be read online at Ficwad.
There is also a PDF.