Before the Devil Knows You're Dead

Andy Hanson (Philip Seymour Hoffman), is a finance executive in desperate need of money to cover funds he embezzled from his employer, which he stole to pay for drugs, due to an upcoming audit. His brother Hank (Ethan Hawke), needs money to pay child support or else his ex-wife (Amy Ryan) will cut him out of his daughter's life. Andy devises a plan to rob their parents' jewelry store, which Hank reluctantly agrees to. Andy argues that he cannot go himself because he has been in the neighborhood recently, and could therefore be recognized. They assume that only the old woman who works for their parents will be in the store. Andy states that only a toy gun is needed and that it is a victimless crime, because the insurance will repay their parents.Without consulting Andy, Hank hires a co-worker who is also an experienced thief, Bobby Lasorda (Brian F. O'Byrne), to help him in the robbery. In fact, Bobby will do it himself (with a real and loaded gun); Hank just needs to wait in the car. The brothers' mother Nanette (Rosemary Harris) happens to be in the store herself filling in for the original clerk. The robbery goes awry when Nanette pulls a hidden gun on Bobby, causing a shootout. Hank flees the scene after seeing Bobby shot to death. Nanette dies later in the hospital after her husband Charles (Albert Finney) agrees to take her off life support. Charles, unsatisfied with the police's help, decides to investigate on his own as he knows that Bobby had a partner in crime and becomes obsessed with finding the other criminal (Hank).Hank finds himself fixing many problems while Andy only chastises him for his mistake. After removing evidence he had left in the rented car he used for the robbery, Hank is confronted by Bobby's brother-in-law Dex (Michael Shannon) who demands financial compensation for Bobby's death to provide for Bobby's widow/the in-law's sister, Chris.Hank has secretly been having an affair with Andy's wife, Gina (Marisa Tomei), who has been unsatisfied with her relationship to Andy. Gina reveals this to Andy at the point of leaving him. Upon hearing of Dex's blackmail, Andy decides to fix the situation with Hank by robbing Andy's drug dealer. Once at the dealer's apartment, they overpower the dealer and steal his money. Hank is then shocked when Andy murders the dealer and a client who happened to be present. The brothers then go to pay off Dex, but Andy impulsively kills him for fear of blackmailing them further. When Hank objects to Andy wanting to kill Chris (partially because Chris and Bobby's child is heard in an adjacent room), Andy decides to kill Hank and reveals to him he knows about Hank and Gina's relationship. Before Andy can pull the trigger, he is shot by Chris with her brother's gun. Hank leaves his brother and most of the money before fleeing.Charles had been following his sons this whole time, having picked up their trail and found out they were behind the robbery. Andy is moved to a hospital where Charles visits him. Andy feebly apologizes to his estranged father for everything, explaning Nanette's death to be an accident. Charles accepts his apology. Charles then attaches Andy's heart monitor to himself, before proceeding to suffocate his son with a pillow, killing him. As medical staff rush to Andy's aid, Charles leaves.

Question: Who was blackmailing Andy?
Answer: Dex.