Following on from the previous episode, Sherlock and Joan investigate the scene of a triple homicide where one of the victims is Emil Kurtz, the mole in Morland Holmes's company who Joan had blackmailed into working for her. She immediately suspects that the robbery was just a blind for a targeted assassination of Kurtz.
Sherlock confronts her about her connection to Kurtz, and she explains everything. Sherlock is upset but understands her reasons. He later fills in Captain Gregson about their suspicions that Morland Holmes discovered Kurtz's duplicity and had him killed.
Their investigation reveals the identity of the shooter, who readily confesses to the crime and admits that Kurtz was the target. He also confesses to an earlier hit hired by the same person. The victim was a forensic psyciatrist, Dr. Nailer, who had developed an online survey to get data on reactions to particular types of crimes.
Morland provides evidence that he was not behind the murders and that he had discovered that Kurtz was a mole and he was planning a long game to find out who was pulling Kurtz's strings.
Sherlock discovers that the online survey was being used to locate sociopathic personalities to use as hitmen, as the killer was in this case. He realizes that this complicated scheme resembled one run by an old nemesis: Moriarty.