There are basically two kinds of heist movies. One focuses on what happens leading up to the heist, and the other focuses on what happens afterwards.

When the big robbery sequence in “Triple Frontier” happens before the halfway point of the action-thriller, we know just what kind of heist movie director J.C. Chandor is making. “Triple Frontier” is playing theatrically in some cities, but most of the country, including Madison, is getting its premiere Wednesday on Netflix.

The film opens in an unnamed South American country, where an American mercenary nicknamed Pope (Oscar Isaac) is providing covert assistance for local police trying to take down a big drug lord named Lorea. After raiding one of Lorea’s strongholds, Pope learns that the drug lord has reportedly squirreled away $75 million in his fortified house deep in the jungle. “The house is the safe,” he’s told.

Seeing an opportunity, Pope goes stateside to reconnect with his former special forces comrades with a proposal. They’ll raid Lorea’s home and steal the money themselves.

For the veterans, all of whom have had trouble adjusting to civilian life, the lure of riches and military action is tempting. Ironhead Miller (Charlie Hunnam) gives pep talks to military personnel urging them not to become private contractors, as he did. His brother Ben Miller (Garrett Hedlund) is a small-time mixed-martial arts fighter, managed by former helicopter pilot Catfish (Pedro Pascal).

But it’s the group’s commanding officer, Redfly (Ben Affleck) who has fallen the farthest in civilian life. Once a leader to be admired and emulated, Redfly is sad and defeated, a divorced dad trying to sell dumpy condos to pay the mortgage each month. He leaps at the chance to make some money and to reclaim a little mojo in his life.

The heist planning and execution scenes are crisply staged, with just enough authenticity to suggest that real special forces procedures are being used. The original screenplay was written by Mark Boal, who partnered with director Kathryn Bigelow on “The Hurt Locker” and “Zero Dark Thirty,” and “Triple Frontier” has a similar cinematic verisimilitude when it comes to men and guns.

Chandor, who rewrote Boal’s script as well as directed, has made a career out of films about men in crisis, from hedge fund managers (“Margin Call”) to shady businessmen (“A Most Violent Year”) to millionaire sailors (“All is Lost”). Here, he finds cracks within the action beats of Boal’s screenplay to suggest the humanity beneath these tough guys’ emotional armor.

Deep down, there’s an element of self-loathing in their willingness to use their military training not for country, but for greed. Their struggle to see themselves as honorable warriors is a strong emotional thread through the film.

After the heist is pulled off, seemingly a success, we wait and see when things will go awry for the team. And they do, spectacularly, forcing the warriors to go way off plan and improvise their way out of danger, dragging duffel bags of cash through the jungles of South America and across the Andes.

The scenery is spectacular, the action is entertaining, and each of the actors is given enough space to do more than fire automatic weapons and shout “Clear!” every few minutes. “Triple Frontier” is the least of Chandor’s films, not digging quite as deep into the fractured masculine psyche, but it’s still an enjoyable and well-paced movie. It’s the thinking man’s action movie, as long as that man doesn’t want to think too hard.

Rob Thomas is the features editor and social media editor for the Capital Times, as well as its film critic. He joined the Cap Times in 1999 and has written about movies, music, food and books.