It seems the more turmoil and dysfunction there is in Washington, the higher odds Wall Street gives tax legislation.

Last week may have been one of the worst of the Trump presidency with President Donald Trump coming under a firestorm of criticism for his reaction to the deadly protest in Charlottesville, Virginia. Corporate CEOs abandoned him, quitting his advisory councils and there was speculation respected aides and Cabinet members would leave him.

Out of the chaos has come a view about what might get done in Washington this year — and that's corporate and individual tax legislation, according to notes from multiple Wall Street strategists. A tax code overhaul was a cornerstone of Trump's policy agenda, and a major goal of congressional Republicans, but optimism for a sweeping plan has faded.

Yet, a number of analysts say it may be the one thing that Republicans are able to get done, as they head into the 2018 elections with a weakened president and rising concerns that they could lose their House majority.

"Tax reform is not going to happen, but tax cuts are going to happen," said Tobias Levkovich, chief equity strategist at Citigroup. Instead of slashing the corporate tax rate to the 15 or 20 percent proposed by the president and House Republicans, he said the rate might be more like 25 percent, from the current 35 percent. The average S&P 500 company pays just a little more — about a 27 percent average tax rate — but the tax cut would still be a positive for Republicans, Levkovich said.

That type of plan would eliminate the need to find agreement on controversial revenue-generating plans, like the border adjustment tax. The individual tax rate may be cut a few percent, but Levkovich said Republicans will shy away from eliminating popular deductions like those for mortgage interest, charitable giving, or state and local property taxes.

The threat for Republicans if they don't act is looking increasingly real.

Strategas Research, in a recent note, said if the election was held now, the House Republicans and possibly Senate would be at risk of losing their majority. "This should force Republicans to seek legislative accomplishments, which goes against the consensus that Trump's troubles will lead to no tax reform," according to a Strategas note.

Strategas said its analysis suggests that 90 percent of the swing in House seats can be determined by the generic ballot question, which is a poll that asks voters which party they would like to see run Congress. "The latest generic ballot data suggests the Republicans would lose 30 seats in the House, which would give Democrats control of the chamber," according to Strategas. The firm also notes that with the election 15 months away, things could still reverse and go in the GOP's favor.

Source: Strategas Research Partners

Even with the tough task of agreeing on a budget and raising the debt ceiling next month, Republicans in Congress are more likely to push to find agreement on tax reform.

The current dour mood about Congress now contrasts sharply with the heady first couple of months after the election, with investors believing that the president along with an all-Republican Congress could quickly push through legislation making his economic agenda law. But Congress got bogged down trying to replace Obamacare with a new health-care bill, and the expected tax revenue that would have come from that did not materialize.

The so-called Trump trade has faded with the trades that investors made to bet against the Mexican peso, and in favor of small caps and for companies with high taxes, have virtually reversed. "Those kind of things all rolled over way earlier," Levkovich said.

While analysts do see a better chance for tax cuts, they differ in how it could be structured.

"Presidential difficulties may be a catalyst for Republican agreement on tax reform, with some bipartisan aspects as a means of survival in front of the 2018 midterms," wrote Stifel equity strategist Barry Bannister. "Congressional Republicans recognize that, as well as a fractious party and an administration that poses a risk to them, so they may now push for reconciliation with dynamic scoring to cut taxes, offset ACA's [Obamacare] tax burden and stimulate growth before the 2018 midterm."

David Kotok, chairman of the Cumberland Group, said in a note that the House could pass an infrastructure bill, and fund it with repatriation dollars. That would require a change to the way foreign profits are taxed, which could be tied to a repatriation of the profits companies are holding overseas. "They can send it to the Senate as a clean bill without muddying the process. ... This bill would allow the House Republican majority to demonstrate leadership that is independent of the president," he wrote in a note.

They also see the drivers of the tax changes coming from Congress, more than the White House. Gary Cohn, the White House's chief economic advisor, last week promised that tax reform could come between now and Thanksgiving. Cohn was rumored to be leaving the administration last week, and that caused a dip in stocks even though the administration denied it.

By the end of last week, one controversial figure, Steve Bannon did leave the White House, and Treasury Secretary Steven Mnuchin, also working on taxes, issued a statement on why he was staying and that the president was misunderstood. Trump was criticized for not condemning white nationalists, who were involved in a march that turned violent.

"In our view, tax is not a Cohn issue. It is a congressional issue, particularly for the Republicans. Sure, President Trump and Cohn want to get tax done but ultimately it comes down to whether the Republicans can galvanize their party to having a single view they can all embrace. Does it hurt at the margin if Cohn leaves? Maybe. However, it might also galvanize the Republicans to distance themselves from the White House leaving them do their own tax plan," wrote Morgan Stanley equity analysts.

The analysts said as the GOP House representatives distance themselves from the president, they could be pressured to act on taxes and pro-growth items ahead of the midterms.

"There is a very good case to be made that the probability of tax [cuts] may have gone up, not down, with last week's events," wrote Morgan Stanley equity analysts.

But not all agree that Congress will be able to pass reform, and it could be a tough task. In September, Congress could get into a battle over the budget and raising the U.S. debt ceiling.

"If there are going to be tax cuts, how are they going to show a balanced budget to make the Freedom Caucus happy?" said Marc Chandler, Brown Brothers Harriman's chief currency strategist, of the fiscally conservative Republican caucus.

Chandler said the Republicans are desperate and before the election they want to show they're not a "do nothing congress." Chandler said the White House will have to do a lot of maneuvering to get Congress to approve a tax plan that may not be revenue neutral.

"I'm not sure we have a White House with that skill set," he said.