Tom McCarthy continues his string of engagingly low-key comedy-dramas, which began with “The Station Agent” and “The Visitor,” with this deadpan study of a small-time lawyer who becomes legal guardian to an elderly man at the edge of dementia solely for the state benefits, but inherits a surrogate son as a result. The title of “Win Win” may exaggerate its positive character a bit, but the picture still comes down mostly on the positive side of the ledger.

Paul Giamatti, toning things down from his usual hysteria, plays Mike Flaherty, a guy who’s finding it hard to support his family—wife Jackie (Amy Ryan) and tyke Abby (Claire Foley)—on his increasingly meager income from his practice with hangdog partner Steve Vigman (Jeffrey Tambor), with whom he also coaches the high school wrestling team. As court-appointed attorney for Leo Poplar (Burt Young), a senior citizen without family in the area who can no longer live on his own, Mike learns that if he were to agree to become the man’s guardian, he’d receive a monthly stipend. And so he promises to make it possible for Leo to stay in his own house rather than move into a nursing home. But Mike’s actual plan is simply to deposit the fellow in the facility, pay the cost from the old fellow’s considerable savings, and pocket the stipend.

That would make Mike a pretty unsavory fellow if he weren’t played by Giamatti, whose essentially likable quality comes through despite the rotten scheme he’s hatched. And it doesn’t take long for his plan to unravel anyway: Poplar’s grandson Kyle (Alex Shaffer) suddenly shows up on his grandpa’s doorstep, fleeing his drug-addict mother Cindy (Melanie Lansky) and her brutal boyfriend. Mike and Jackie take the boy—a laconic, bleached-blonde kid with a coolly matter-of-fact air—in temporarily, with Mike intending to send him away after a few days, until he learns that Kyle is a champion-level wrestler who could turn his desperately untalented team around in an instant. So he and his wife invite the kid to stay and enroll him in school, with Mike assuring the boy that the court had ordered his grandfather into the nursing home.

Of course it isn’t long before Cindy shows up, seeking with the help of her own attorney (Margo Martindale) to take over her father’s care—though all she’s interested in is his estate. The situation’s complicated by the fact that Kyle finds out about how Mike’s reneged on his pledge to keep Leo at home. By then, though, Mike and Jackie both have bonded with the kid, and don’t want to put him back into his mother’s charge. But Mike’s deception threatens Kyle’s trust in him—and his very livelihood (not to mention the boy’s chance to win a wrestling competition and, just maybe, a college scholarship).

“Win Win” works, despite its contrivances, because McCarthy’s touch—in both writing and direction—retains the quirky, laid-back charm he exhibited in his earlier films, and because it’s blessed with a great cast. Giamatti’s paunchy, regular-guy persona keeps Mike from becoming unpleasant, and Ryan positively sparkles as Jackie. Tambor brings his usual dyspeptic seriousness to sad-sack Steve, while McCarthy favorite Bobby Cannavale exudes energy as Mike’s pal Terry, whose fury at being dumped by his wife for the contractor he hired to fix up their house is matched only by his ineptitude at contributing to the wrestling team as an assistant coach. Young is amiably grumpy as old man Poplar, and Lynskey convincing as a troubled woman who inflicts her problems on others, including her son.

But the picture would fail if it weren’t for newcomer Shaffer, who not only shows the right moves as a grappler, but cuts a perfectly tuned figure as a teen who, despite his rebellious appearance, shows a more mature streak than most of the adults he has to deal with—except when people lie to him and his temper flairs. His relationship with young Foley and with David Thompson, as a gawky fellow-wrestler, are especially well-done. (And Thompson has a funny match scene of his own.)

Technically “Win Win” isn’t particularly attractive, with a grungy indie look. And like McCarthy’s other films, it winds down rather than revving up at the close. But if it doesn’t score a pin, it comes out a winner on points.