Aaron Sorkin talks a good game, so it should come as no surprise that his directorial debut — surprisingly cinematic for someone so voluble, in which Jessica Chastain plays self-made gambling madam Molly Bloom, who built a multi-million-dollar poker empire that managed to attract a lot of unwanted attention (much of it on account of her memoir, “Molly’s Game”) — amounts to a series of mile-a-minute monologues, stacked back-to-back for the better part of 140 minutes. Still, for a writer accused of misogyny in the past, “Molly’s Game” delivers one of the screen’s great female parts — a dense, dynamic, compulsively entertaining affair, whose central role makes stunning use of Chastain’s stratospheric talent.

Whereas most Hollywood directors aspire to the show-don’t-tell school of screenwriting, Sorkin clearly subscribes to a different philosophy: tell more, tell it faster, and then re-tell it in different words for added effect. And guess what? That strategy works wonders in a film that’s ultimately about sizing up what exactly the competition has on you, and then calling their bluff. At the end of the day, movies and poker are about the same thing: stakes.

And that’s where Sorkin’s otherwise audacious debut falters somewhat, because Molly has already lost pretty much everything when the film opens (including her drug habit), and the script must do cartwheels to compensate for the fact that it doesn’t much matter to us whether she goes free or spends the rest of her days behind bars. It’s not like her life’s in danger, just her reputation, and that’s a relatively small pot compared to what Sorkin’s relatively idealistic characters stand for in other scripts.

Still, more of a magician than a traditional card dealer, Sorkin has plenty of tricks up his sleeve, none more effective than his choice of leading lady: In what was basically the role “The Sopranos” daughter Jamie-Lynn Sigler was born to play — the sexy, yet shady lady who organized an illegal gambling ring at which A-listers like Tobey Maguire, Leonardo DiCaprio and Ben Affleck were alleged to have played — Sorkin instead casts Chastain, the redheaded girl-next-door who could grow up to be President.

Chastain’s not the type, but she’s a star with an instinct for great material, and as such, the character adapts to fit her persona, rather than the other way around (the real Bloom comes across more like the call girl who brought down Eliot Spitzer). “Molly’s Game” is Chastain’s movie, and she’s demonstrating once again what we’ve seen in everything from “Zero Dark Thirty” to “A Most Violent Year”: No matter how powerful the men around her, Chastain is perfectly capable of being in control — and that’s not to be taken lightly in an industry that provides an alarming deficit of stand-their-ground female role models (even those who are technically breaking the law).

“Molly’s Game” introduces its protagonist and narrator as a would-be Olympic skier, going full-Sorkin as she talks circles around the subject — which in this case is why she quit the sport (a devastating back injury) and went back to school. The accident seems to drive a wedge in Molly’s already strained relationship with her father (Kevin Costner), a tough-love psychologist, so she shifts her attention to making money. As written, Molly is wicked-smart, assertive and unintimidated by powerful men, which allows her to put up with douchebag boss. It also means she’s savvy enough to seize her chance after he introduces her to the world of underground poker, where the buy-in is $10,000 and some have been known to lose nearly a million dollars.

When her boss tries to cut her out of the loop, Molly takes his contact list and establishes her own rival poker showroom, poaching his players and raising the stakes. Sorkin’s script makes it clear that many of the rich and famous who agreed to follow her did so because a movie star made the switch. (Michael Cera plays the celeb in question, supplying a familiar face and borderline-surreal comedic streak without upstaging Chastain as the film’s true star.) But they stayed because Molly was good at her job, which is true even as her precarious operation starts to implode.

When the boys eventually try to elbow her out of the business, Molly moves to New York and assembles an even more exclusive game with an even bigger buy-in, but things start to unravel as she develops a drug habit and accidentally (allegedly?) opens the game to members of three different Russian crime families. This in turn attracts the attention of the Feds, which brings us back to the beginning, when Molly is arrested and sued by the United States government, who hope the incredibly well-connected power-dealer can be pressured to spill details on her regulars. The way Sorkin has assembled the film, the timeline jumps between Molly’s court case (in the “present”) and the almost unbelievable backstory that brought her there (as reported in her memoir), but he’s a firm believer that her book ended just as things were getting really interesting, seizing her arrest and trial as a framing device for a story that’s otherwise an awful lot like “Rounders” or “House of Games,” minus the juicy con-man twists.

Sorkin approaches Molly as an earnest and upstanding citizen — practically a crusader of sorts, and Chastain plays her with practically the same conviction she did a power-lobbyist in last year’s “Miss Sloane” — who went out of her way to ask a lawyer (Michael Kostroff) whether her unconventional business was legal. When the Feds say otherwise, she realizes she’s gonna need a far better attorney to spare her doing serious time in prison. And so she settles on Idris Elba, who’s reluctant to take her case for myriad reasons: With her assets seized, she can’t pay him; plus, he’s skeptical that she’s as clean as she claims (frankly, the movie never establishes why she deserves to get off). Still, Elba’s reasons for taking the role are clear: It’s a terrific part with a chewy “drop the goddamn charges” monologue.

The point is, Molly’s a great character, and in the Chastain-Sorkin partnership, she’s performed every bit as forcefully as she’s written. “Molly’s Game” delivers that rare example of a female character who gets the better of some of the country’s richest and most powerful men — and in the film’s most cathartic scene (which immediately follows an entirely unnecessary one, set at the ice-skating rink in New York’s Central Park), she finally gets to confront the ne plus ultra of alpha males, her Svengali-like father, about issues Sorkin has stealthily woven throughout his script.

Remember, he’s a shrink, and in the space of a few minutes, Costner manages to blow her mind, delivering the single most dazzling case of on-screen psychotherapy ever witnessed. As he puts it, “I’m gonna give you the answers.” And he does. And in that moment, as in the brilliant rooftop scene at the end of “Steve Jobs” when the Apple innovator recognizes his daughter as his greatest creation, Sorkin shows his cards, making the movie about something we really care about: human reconciliation, not getting rich, or defending one’s honor. After that, the judge’s verdict hardly matters. Chastain and Sorkin have already won over the audience.