On the surface, Mylan's (NASDAQ:MYL) earnings report wasn't pretty. Revenue fell by 24%, and the company lost $0.13 per share. Dig a little deeper, though, and you'll see the generic-drug maker is far from a copycat of its struggling branded-drug-making counterparts.

On the revenue side, last year's number included the sale to Forest Labs (NYSE:FRX) of some of Mylan's royalty rights to blood-pressure drug Bystolic. Excluding that, revenue rose 5.2%, which isn't bad especially when you consider that Mylan's foreign sales had a serious currency headwind.

Interestingly, revenue from its branded-drug division, Dey, rose by 20% year over year. Mylan was going to sell Dey but didn't, probably because it couldn't find a buyer willing to pay enough. Looks like that was a pretty smart move.

The net loss for the quarter was attributable to a $121 million charge to settle a Department of Justice investigation over calculations of Medicaid drug rebates. The previously announced settlement isn't a great thing, but it's not the only drugmaker to have been stung by the DOJ, and things could have been a lot worse: Eli Lilly (NYSE:LLY) recently paid more than $1.4 billion to settle a lawsuit with the DOJ, and Pfizer (NYSE:PFE) topped that with a $2.3 billion charge. If you look just at earnings from operations, Mylan is looking healthy, with a solid 17% increase year over year.

The benefit from Mylan's larger size after acquiring Merck KGaA's generic-drug business is starting to show. The company may be at a slight disadvantage since it isn't as big as rivals Teva Pharmaceuticals (NASDAQ:TEVA) and Novartis (NYSE:NVS), but its smaller size also gives it a bit more room to run.

Pfizer is a Motley Fool Inside Value selection. Novartis is a Global Gains recommendation. Try any of our Foolish newsletter services free for 30 days.

Fool contributor Brian Orelli, Ph.D., doesn't own shares of any company mentioned in this article. The Fool has a disclosure policy.