"And if a bounty from Allah befalls you"—meaning the spoils of war—"he would surely say, as if there had been no affection between you and him, 'Oh, I wish I had been with them so I could have attained a great attainment,'" meaning: I would have received a share of the spoils. These are the hypocrites.
Regarding His saying: "As if there had been no affection between you and him," in what is apparent.
Muhammad said: "So I could have attained" (fa-afuza) is in the subjunctive mood (mansub) as a response to the wish (tamanni) using the letter fa.