We are presumably meant to sympathize with brothers Cal (Jai Courtney) and Oyster (Nat Wolff), the fraternal pair at the center of Henry Alex Rubin’s “Semper Fi,” but the writing and performances make that rather difficult to do—despite the travails they go through—simply because of the awful choices they make. In the end you may wonder whether they don’t get pretty much what they deserve.

Cal, played with much intensity by Courtney, is the focal character here. He’s a dedicated if sometimes overeager cop who’s also a Marine Corps reservist. He and his rowdy buddies—Jaeger (Finn Wittrock), Milk (Beau Knapp) and Snowball (Arturo Castro)—are about to ship out for a tour of duty in Iraq, but before their departure they raise plenty of hell, and in the midst of it all Cal’s loud, abrasive younger brother—whom Wolff makes pretty obnoxious, to tell the truth—gets into an altercation in a bar and the other fellow winds up dead.

Being a principled officer, Cal prevents Oyster from going on the lam; in fact, he’s instrumental in taking him in. Oyster is, as you might expect, not happy with this, especially after he’s convicted of manslaughter and sentenced to a long term in the pen, where his cocky attitude soon brings the wrath of the nasty guards on him.

Cal’s tour in Iraq with his buddies is unsettling, given the dangers they face, but with the exception of Jaeger, they come back physically uninjured. (A scene in which they all visit Walter Reed Hospital and see injured comrades-in-arms being treated is the film’s most moving moment.) But when Cal learns how his brother’s being treated in prison, he’s anxious to have his case appealed, or maybe get him a transfer. Oyster doesn’t help matters by accusing Cal of not having given him enough support after their parents died; he essentially blames his brother for his present predicament.

So Cal decides to take extreme action: with the help of his Marine pals, he’ll arrange for his brother’s escape. The scheme involves using the team’s military expertise to waylay a prison bus transporting Oyster and then spiriting him across the Canadian border. There’s supposed to be suspense as to whether the operation will succeed, but not much is actually created; and there’s heavy-handed irony in the conclusion, in which Cal sacrifices much to secure his brother’s freedom. To say that the outcome strains credulity would be an understatement.

It’s certainly true that Rubin and his cast capture the drunken camaraderie of this bunch of longtime buddies quite realistically, as well as their devotion to supporting and protecting one another. There is a female presence here, in the person of Leighton Meester as Clara, Jaeger’s girlfriend, who serves as the reasonable alternative to the impulsiveness that arises from Cal’s damaged psyche; but the emphasis—indeed, the whole point of the film—is on the guys and how they’re always loyal to their pals, no matter what. “Semper Fi” is the Marine Corps motto, of course, but here it refers to the unbreakable bond that links these brothers in arms who are also brothers in life.

That’s a nice premise, but it’s one that intersects poorly with the action-movie tropes and overripe melodrama employed here to shape the narrative. The fraternal relationship at the center of the film is frankly mawkish, however many recriminations Cal and Oyster shout at one another, and the dirty half-dozen heroics at the close border on action-movie parody. This is a film that wants to seem grittily real, but under its ostensibly hard surface it has a mushy core.