Four months after the Cambridge Analytica scandal humbled Facebook and shaved tens of billions of dollars from its market value, the company's stock is once again trading at record highs.

But investors are about to learn whether Facebook (FB) is truly invincible.

Facebook reports its second quarter earnings results after the bell on Wednesday, providing the clearest glimpse yet into how its data debacle impacted user growth and ad sales.

News that the data firm Cambridge Analytica accessed information from as many as 87 million Facebook users without their permission broke in the final weeks of the first quarter. Any serious fallout is more likely to appear in Wednesday's results.

Daniel Ives, an analyst with GBH Insights, wrote in an investor note this week that the results will be a "pivotal barometer" to assess "any fundamental damage" to the company in the wake of what he calls "the darkest chapter in Facebook's 14-year history." So far, he says, the damage has been "very contained" and is "much better than feared."

Facebook endured grilling from lawmakers on both sides of the Atlantic and faces scrutiny from several federal agencies in the United States. Yet the company continues adding users across its portfolio of apps and remains a top destination for advertisers.

Related: Was your Facebook data shared with Cambridge Analytica? You can now find out

Wedbush analyst Michael Pachter expects Facebook to announce that it added 46 million daily users globally in the last quarter, only two million fewer than in the prior quarter. However, he expects Facebook to add just one million daily users in the United States and Canada.

Still, even sluggish growth could be considered a victory given the negative headlines and protests calling for users to delete Facebook. The company defied skeptics in April by reversing its first decline in daily users in the United States and Canada as the data scandal first came to light.

Meanwhile, the ad business shows no sign of slowing. The consensus among analysts is that Facebook will post revenue of $13.3 billion for the quarter, a surge of more than 40% from the same period a year ago. They attribute the increase to the company's formidable ad sales machine.

Facebook and Google remain by far the biggest platforms for marketers online. If anything, recent regulation may only add to that. During the quarter, a sweeping new data protection law took effect across the European Union. Big tech companies have more resources available to adapt to the policy shift.

Brian Wieser, an analyst with Pivotal Research, said in an investor note this month that early anecdotes suggest the General Data Protection Regulation is further "concentrating" advertising budgets with the "duopolists" of Facebook and Google (GOOGL). Earlier this week, Google's parent Alphabet reported a 26% increase in sales from the year prior despite the introduction of GDPR.

Facebook could also find a bright spot in Instagram, the photo-sharing service it acquired in 2012 for $1 billion. The app recently topped one billion active users and recently expanded into long-form videos, which offer tremendous potential for advertising.

Facebook doesn't break out financial data for Instagram, but Wieser says "consumption on Instagram is still growing." That should help in "mitigating" any drop in user engagement for the main Facebook app.