So as the movie progresses you realize the protagonist has been fighting inverted versions of the enemy and even themselves (although not intentionally). So in the middle of the movie, they are going backwards toward the beginning of the movie. There is then a climatic fight scene were you have two teams of soldiers (one inverted and one regular) fighting in a ten minute interval (ten-net). That is the part of the trailer were you see a building blown up, reassembled, and blown up again.
The future earth wants to rebuild the world, (something about oceans rising, rivers drying - global warming shit but they don't go in detail). So, although they can invert time they cannot dominate time (the past still determines the future). A scientist figured out an algorithm that could be used to allow the future to change the past, but that would destroy the past Earth. Future Earth doesn't give a shit because they believe that the grandfather paradox won't affect them, that they will continue to exist. The scientist (who is not shown) splits and sends the algorithm into 9 pieces where (i'm lost here) it gets into nuclear weapons facilities which is supposed to be the most secure places on Earth.
Future Earth uses a time capsule which is inverted, knowing it will be discovered in the future by the Villain. The Villain finds the capsule with directions, and is able to do make himself rich and use dead drops to send the algorithm to the future by putting it in a place that will be unrecoverable except those in the future. The Villain doesn't care that Earth will be destroyed because he is dying of cancer and wants to take him and his wife (who has jungle fever with the main Protagonist) with him. In fact, they invert time in order to save the woman which is when you discover some scenes they were fighting against themselves (but didn't know it because they were wearing masks). The Villain cannot be killed because he has a heart monitor that will automatically beam the algorithm to the future (why he needed to bury it then doesn't make sense, either I am missing something or this is movie logic). To me that is the most weakest part of the story, and the same shit happened in interstellar where the ending is kinda fucked in the logic department.