Wanted

In Chicago, 24-year-old Wesley Gibson (James McAvoy) works at a dead-end desk job with an overbearing boss, takes anti-anxiety medication for panic attacks, and has an unfaithful live-in girlfriend who cheats on him with his friend and colleague, Barry (Chris Pratt). One night at the pharmacy, Wesley is told by a woman named Fox (Angelina Jolie) that his recently murdered father was an assassin, and the killer, a man named Cross (Thomas Kretschmann), is now hunting him. Cross and Fox engage in a shoot-out with hi-tech guns. Wesley panics and runs into the parking lot followed by Cross who steals a truck and attempts to run Wesley down. Fox flips Wesley into her car and then calmly executes a spectacular escape.
Wesley awakens in the headquarters of the Fraternity, a secret society of assassins. The group's leader, Sloan (Morgan Freeman), explains that Wesley's panic attacks are actually the untrained expression of a rare ability that allows Wesley's body to distribute massive amounts of adrenaline, granting superhuman strength, speed, and heightened perception. Sloan wants to teach him to control this ability, and to become an assassin and join their cause.
Wesley initially panics and returns to his former life. The next morning, he discovers that his bank account now contains several million dollars. The discovery changes his outlook on life, and during a tirade from his boss, Wesley snaps and delivers a public diatribe. Afterward, he picks up a keyboard and during his exit, hits Barry's face with it. Fox arrives while Wesley is outside looking at newspaper headlines of the previous night's events.
Wesley is trained for his new life and is soon shown the Loom of Fate, which gives the names of future targets through errors in the fabric. Those the Loom identifies will apparently cause problems in the future, but only Sloan can see and interpret the messages. Though Wesley is initially reluctant to kill, he is convinced when Fox tells him that, in her childhood, a hired killer who burned her father alive had been previously identified by The Loom, but efforts to kill him were unsuccessful.
After several missions, Wesley finally manages to leave his girlfriend. He soon has a shootout with Cross, wherein Wesley accidentally kills another Fraternity member. Cross shoots Wesley in the shoulder. Sloan grants Wesley's wish to avenge his father and sends him after Cross â but then secretly gives Fox a mission to kill Wesley, saying that his name had come up in the Loom, as well. Analyzing the bullet that hit Wesley, it is discovered that it was manufactured by a man named Pekwarsky. Wesley and Fox capture Pekwarsky, who arranges a meeting with Cross. Wesley faces Cross alone on a moving train. Fox steals a car and crashes it into the train, causing a derailment. After Cross saves Wesley from falling into a ravine, Wesley fatally shoots him. Before dying, Cross reveals that he is Wesley's real father. Fox confirms this, and explains that Wesley was recruited because he was the only person Cross would not kill. Fox points her gun at Wesley, but he shoots the glass under him and falls into the river.
Wesley is retrieved by Pekwarsky, who takes him to Wesley's late father's apartment (which is located just opposite to his own) and explains that Sloan started manufacturing targets for profit after discovering that he was targeted by the Loom of Fate, and he did not tell the Fraternity members that they were now nothing more than paid killers. Cross discovered the truth, went rogue, and started killing Fraternity members to keep them away from his son. Pekwarsky departs, stating that Wesley's father wished him a life free of violence. Wesley, however, decides to kill Sloan after discovering a secret room containing all of his father's weapons and maps.
After putting explosives on rats to access the Fraternity's headquarters, Wesley kills nearly every Fraternity member. Upon entering Sloan's office, he reveals Sloan's deception to those present in the room. Sloan reveals that all of the assassins' names had come up in the weaving, and that he had acted to protect them. He gives the members a choice: kill themselves, per the code, or kill Wesley. The members are considering breaking the code and killing Wesley, but Fox, who believes more in the code, turns on her fellow assassins and curves a bullet that kills everyone but Sloan and Wesley. She throws her gun to distract Wesley, before being killed by her own bullet. Wesley pursues Sloan to the now destroyed Loom chamber, but Sloan manages to escape.
Afterwards, Wesley checks his bank account and sees that Sloan has seized his funds, leaving Wesley broke again. A man is seen at Wesley's desk much later. Sloan appears and points a gun at the back of the man's head. The man turns around and is revealed to be a decoy. Sloan sees an "X" on the floor, and, shocked, says, "Oh, fuck.", and is killed by Wesley using a long-distance bullet. Wesley states his accomplishments, saying: "This is me taking control, from Sloan, from the Fraternity, from Janice, from billing reports, from ergonomic keyboards, from cheating girlfriends, and sack-of-shit best friends. This is me taking back control of my life.", and asks the audience, "What the fuck have you done lately?"

Question: What does the Loom of Fate do?
Answer: gives the names of future targets through errors in the fabric; gives the names of future targets through errors in the fabric