President Trump and Russia’s President Vladimir Putin talk during the family photo session at the APEC Summit in Danang, Vietnam, on Nov. 11. (Jorge Silva/Reuters)

Imagine for one moment you are Vladimir Putin. Sitting on the desk in front of you is a file labeled “Trump, Donald.” Inside is a stack of documents your spy agencies have collected that prove that Trump took part in embarrassing or illegal activities. There are some financial documents, audio transcripts of phone conversations, and perhaps photos of Trump while he was in Moscow. How do you decide whether to reveal them to the world?

Now imagine you are President Trump and you have been informed of that file on Putin’s desk. During a lull in executive time, you ponder if and when he plans to release its contents. How do you treat Russia when you know you are being blackmailed?

This scenario may seem like it came from a spy thriller, but some very serious people believe Russia may in fact possess kompromat — compromising material — on Trump and is using it to blackmail him. Otherwise, they ask, how can we explain the many instances in which Trump and his inner circle have sought Russia’s favor or accommodated its interests?

At the same time, Russia is not exactly popping champagne over Trump anymore. The administration’s preservation of Russian sanctions, provision of lethal weapons to Ukraine, and the shuttering of two Russian consulates show it is willing to take a tougher approach at times.

This mix of accommodating and hard-line policies raises an interesting question: If Russia is really blackmailing Trump, and he knows it, why does he think he can get away with ever disregarding Russia’s interests? How does Putin decide how much defiance of Russia’s interests he can tolerate before revealing Trump’s secrets? And how do Trump’s beliefs about Putin’s calculations affect how he deals with Russia? The tools of game theory can help us think through these questions.

First scenario: If the kompromat would seriously damage Trump

Let’s first assume that the material in the file is extremely damaging to Trump, say, smoking-gun evidence of Trump Organization money laundering that could get Trump impeached or land him in prison. At first glance, this would appear to give Russia enormous leverage.

However, from Putin’s perspective, deposing Trump would be a horrible outcome since he would be replaced by Vice President Pence, who would probably take a harder line on Russia. This would exclude any chance that the United States would drop sanctions anytime soon. From Putin’s perspective, then, the kompromat is useful only as long as he does not reveal it, while it becomes useless — and even counterproductive — as soon as he makes it public.

Working backward, if we assume that Trump knows what cards Putin holds and understands that their exposure would end up harming Russia’s interests, he would know the Kremlin’s blackmail threat is not credible. Consequently, Trump would have a free hand to take tough positions on Russia when it suits him, but only up to a point.

What point? The point at which Putin no longer prefers Trump to a President Pence. If, for some reason, Trump were to take an extremely hard line on Russia or make reckless moves that risked starting a nuclear war, then Pence might appear a better alternative. Now the kompromat could be wielded more convincingly, because it could be revealed.

Second scenario: If the kompromat would only mildly damage Trump

But let’s assume the material is only mildly damaging, say, video evidence of a tryst with Russian prostitutes or ethical breaches that could land Trump in minor legal jeopardy — developments that would be embarrassing or distracting but would not cause certain impeachment.

How would Putin regard a politically wounded Trump who still clings to power? Very favorably, if Russia’s aim is to sow discord in the United States.

If Trump were to think through the implications, he would see that Russia’s threat to follow through on blackmail would be credible, and he might think twice before pushing Russia too hard — or soften the blow of hard-line policies with encouraging words that signal to Putin that he may come through in the future.

Yet Russia might still hesitate to reveal the comprising information — assuming that damaging Trump would invite closer scrutiny from Congress and the public, and limit his chances to help Russia in the future.

What if Trump is compromised by domestic U.S. forces?

So how would Putin determine the right time to make his move if he had mildly damaging kompromat? When Trump is so constrained domestically that he no longer has a free hand in foreign policy and is more useful to Russia as a lame duck.

If the Mueller collusion probe — or the FBI’s investigation of Trump’s personal lawyer — turns up damaging evidence, Trump will be forced to rely more on supporters in Congress (who tend to be more hawkish on Russia), and will be less inclined to pursue a pro-Russian foreign policy.

The upshot is that increasing legal pressure will place Trump in a bind: Defy Putin and risk exposure, or help Putin and risk alienating his party.

So what does Trump’s behavior toward Russia tell us?

Is Trump’s behavior toward Russia more consistent with the existence of mild or severe kompromat? It depends on what his true preferences are. If he sincerely wants to be tough but is forced to play nice — the essence of the blackmail theory — then it is mild.

But if his true preferences are pro-Russian, then his vacillation between following his gut instincts and the wishes of his advisers could be explained by simple indecisiveness. Trump could get away with this because he knows Putin possesses kompromat so severe he would never use it.

But as the pressure builds at home, we may learn more. Trump’s future room for maneuvering on Russia will depend on how damaging the material is: greater if it is devastating, less if it is merely embarrassing.

Wild-card scenarios

Of course, other pressures could upend this analysis. For example, Putin may come under pressure from struggling Russian elites who demand that Putin call in his chit immediately. Trump may decide he is politically invincible and side with his hard-liners, come what may. And of course, Trump may not have thought through these scenarios carefully.

Other explanations for Trump’s behavior do not involve kompromat. Perhaps he seeks to avoid nuclear war or believes in the power of diplomacy, although he does not exhibit such consideration toward other countries. Or he might simply admire Putin’s style of leadership, or hope to pursue a major real estate deal in Russia after his presidency.

If Putin has called in the Kremlin’s game theorists to think through these possibilities, he will see that having kompromat is not enough. It must be wielded carefully. And even then, it is not that easy to blackmail a foreign leader.

Scott Radnitz is associate professor at the Jackson School of International Studies and director of the Ellison Center for Russian, East European and Central Asian Studies at the University of Washington in Seattle.