The thing that is really interesting to me is how the whole episode of ASIB, people think Irene’s feminine wiles are affecting him, but if you watch, Sherlock behaves exactly the same as usual. He loves to solve puzzles, he loves people that are clever. He hates to fail, especially if there are casualties.
He ignored Irene’s texts, all 57 of them, because he didn’t give a shit about her. He’d failed in his assignment and it was no longer interesting after that. Then he got her phone and realized she was probably dead, was irritated that she hadn’t come to him for help before she was in imminent danger, but now he will occupy himself with figuring out why she died. Solve her murder – it’s kind of his thing.
Sherlock wasn’t eating and he was composing music because it helps him think, and when John asks him what he’s thinking about, Sherlock answers him: he’s trying to figure out the passcode. A week later she turns up alive, trying to get John to collude with her behind his back. Now it’s not solving her murder, but whatever game she’s trying to play. He engages her with the text because he knows it’s part of the game, and then the next day he’s x-raying her phone.
When she shows up in his bed, he calls her a client, probably happy that they’re finally done with the cat and mouse bullshit. He solves the puzzle in 7 seconds because he was practically gagging to finally know what the hell was going on. Once he’s cracked the code, and Irene is pretty much offering herself to him, another piece of the puzzle presents itself and he’s literally brushing her aside to resolve that one. He goes into his mind palace for awhile, and when he comes out, he starts talking about what was on his mind and Irene ignores this and starts flirting with him. He shifts his hand for the sole purpose
(we later find out) of taking her pulse to find out what her deal is. He seems completely unperturbed that Mrs. Hudson interrupts them.Later, after the fall out with Mycroft, he’s listening to their convo, irritated by the impenetrability of the phone, deep in thought, and then finally realizes what the passcode is and tells her that she’s lost the game. But she was a worthy opponent and maybe he still considers her his client, so he saves her life.
The whole time John thinks he’s pining for Irene. Even Mycroft thinks that Sherlock only solved the puzzle to please her, but it was really the puzzle itself that mattered. Moriarty knows this, and lures him in with more puzzles two episodes later.