The former New York City mayor, 2008 presidential candidate and longtime pal of President Donald Trump has been on the job as a legal adviser to the President for exactly two weeks.

But, in that fortnight, he has managed to repeatedly inject himself directly into the center of the news cycle -- the latest example being his revelation on Wednesday night that Trump reimbursed Michael Cohen for the $130,000 hush payment made to porn star Stormy Daniels.

Giuliani has also taken the lead on laying out the preconditions that he says would be necessary for Trump to sit down with special counsel Bob Mueller and emerged as the top attack dog against former FBI Director James Comey. And he even revealed on Thursday morning that the Trump administration had successfully negotiated the release of three US prisoners from North Korea -- even though the releases have not been formally announced.

It's a remarkably fast rise for someone who was discarded to the ash heap of history following his lackluster national bid a decade ago. Giuliani was seen as one of the front-runners in the race, only to quit without winning a single state. Then Donald Trump started running for president -- and looking like he might actually win.

Suddenly, "America's Mayor" was back! Giuliani was one of Trump's highest-profile supporters during the 2016 campaign and, due to his handling of the aftermath of the 2001 terrorist attacks as mayor of New York City, remained an icon among the very conservatives Trump was trying to court.

And Giuliani very much leaned into his role as a surrogate; he defended Trump's refusal to release his taxes and called it "genius" if the GOP nominee had not paid any taxes at all. He played an active role in trying to drive the narrative that Hillary Clinton was suffering from sort of secret -- and major -- health problems.

The re-emergence of Giuliani comes as Trump is beset by problems on all sides -- politically, legally -- and left without any truly close allies and friends within the White House. That he is turning to Giuliani, someone Trump has known for decades and feels as though understands him as a fellow New Yorker and a street brawler by approach, makes total sense. When Trump feels backed into a corner, he, like all of us, reverts back to the people he knows best.

As the last 24 hours have shown, however, an empowered Giuliani scheming with Trump -- and with little consultation with, or heads up to, senior White House aides -- is very, very problematic.

Giuliani's revelation about Trump's reimbursement for Cohen's payment to Daniels seems to directly contradict the story surrounding the payment told by the White House for months. But, according to Giuliani, this is all part of the plan he and Trump cooked up.

Speaking with The Washington Post's Bob Costa after his interview with Sean Hannity on Wednesday night, Giuliani insisted that Trump was "well-aware that at some point when I saw the opportunity, I was going to get this over with."

Two White House officials told CNN's Dana Bash and Kaitlan Collins that managing the Daniels situation is now out of their control. Others pointed out how Giuliani and Trump have their own conversations before Giuliani goes on cable news.

And it's not just the Stormy Daniels situation where Trump and Giuliani appear to be operating independently from most of the White House senior staff. Giuliani is now publicly negotiating with Mueller over whether or not Trump will sit for an interview while simultaneously savaging the broader investigation and Comey's role in all of it. Giuliani also appears to be neck-deep in the release -- potential release? -- of the North Korean prisoners for some reason.

The point here is that you now have a personal friend of the President's -- with a demonstrated penchant for the limelight -- now acting as a sort of rogue adviser on all sorts of matters. That might suit Trump just fine. But if the past 24 hours is any indication, it's not a recipe for avoiding controversy.