Hermione is sent back in time to the maurader era.

There she:

notices that Narcissa's eyes didn't change properly during her pregnancy

convinces Bellatrix that she should marry Rodolphus

Is forced to have an abortion via potion by the Dark Lord. This potion/ingredients are brought to the dark lord by Lucius and Regulus which makes them switch sides.

marries Snape right outside of school

sends her younger self back in time with the memories and scars so that time remains a loop

shows Bellatrix/Regulus/Rodolphus/Lucius/Narcissa/Rabastan her memories in a book and explains that she kept them from becoming the evil people she remembered