In what could be a big sale out of the Cannes Film Festival, STX Entertainment is nearing a $9 million deal to buy U.S. and China rights to the poker drama “Molly’s Game,” Variety has confirmed.

The movie will mark Aaron Sorkin’s directorial debut, and stars Idris Elba and Jessica Chastain as the title character. The script, which Sorkin is writing, is based on the 2004 memoir by underground poker ringleader Molly Bloom titled “Molly’s Game: From Hollywood’s Elite to Wall Street’s Billionaire Boys Club, My High-Stakes Adventure in the World of Underground Poker.”

Sorkin was in Cannes on Thursday to personally pitch the project to buyers. Mark Gordon and Amy Pascal are producing.

CAA and WME are handling the domestic sale.

Deadline first broke news of the negotiations.