With Ben Affleck's Gone Girl hitting theaters this weekend and Batman v Superman: Dawn of Justice still in production, the actor is in talks to star in Warner Bros.' action-thriller The Accountant.

Gavin O'Connor (Warrior) is considered the studio's top choice to direct, although an official offer hasn't been made yet. The script was written by Bill Dubuque (The Judge), which follows a mild-mannered accountant who also moonlights as a deadly assassin.

The project has been floating in development for several years, with Warner Bros. first developing it as a directorial vehicle for Mel Gibson. Sony Pictures picked up the project, with Will Smith once attached to star, but it was put back into turnaround after the studio couldn't put together the right package to move forward. Sources indicate that Ben Affleck recently caught wind of the project and thought it would be a "nice change of pace" before he directs and stars in Live by Night, which begins production in July.

RELATED: Ben Affleck's The Accountant Wins Weekend Box Office with $24.7M

Kevin Scott Frakes, Lynette Howell, Raj Brinder Singh and Mark Williams are producing, although it isn't known exactly when shooting may begin.

Ben Affleck will return to Detroit to continue filming Batman v Superman: Dawn of Justice next week, after he finishes promoting Gone Girl.