On Monday, official data showed that China's foreign exchange reserves in July hit $3.081 trillion, the highest in nine months. The figure was up $24 billion from the previous month. That will be welcome news to Beijing after a ton of money flew out of China last year: Capital outflows hit a record $725 billion, according to the Institute of International Finance.

China's giant cash pile is increasing — and it's a sign that the government's industry-spanning crackdown on money fleeing the country is working.

Chinese Paramilitary police officers salute each other as they stand guard below a portrait of the late leader Mao Zedong in Tiananmen Square in Beijing, China.

Given a slowing economy at home and a volatile yuan, investors were looking for greater returns elsewhere — in everything from real estate to fine art — but all that cash flight put even more downward pressure on the yuan. So, Beijing has tried to counter that by tapping its foreign currency war chest to buy back yuan — a common strategy for countries.

The rise in the July number now indicates the government has stopped draining its "rainy day" reserve fund to balance things out.

"The improvement in China's foreign exchange reserves in July reflects the ramping up of efforts by Chinese authorities to curb capital outflows," said IHS Markit Asia Pacific economist Rajiv Biswas. The government has been "clamping down on corporate outbound merger and acquisition deals, as well as tougher regulations on private individual remittances for foreign property purchases."

China's capital crackdown has had a widespread impact at home and abroad, and some areas are looking up. The yuan, for instance, has strengthened 3.4 percent against the dollar so far this year.

But for the Chinese firms that spent a record $200 billion in outbound deals last year, things aren't quite as rosy. Regulators are looking into bank loans used to finance the buys. They're also reviewing the overseas purchases, and there's a chance the government may ask firms to dispose of some assets.

Some firms are trying to get ahead of the continued crackdown. Conglomerate Dalian Wanda has already sold some off nearly $10 billion of its domestic properties, and is reportedly looking to offload some of its assets in Australia.

On the whole, Chinese companies are buying less — outbound mergers and acquisitions dropped 43 percent to $74 billion in the first half this year, according to financial markets platform Dealogic.

And after years of Chinese firms and individuals snapping up properties overseas, pushing real estate prices to new highs, buyers are finally pulling back. China's overseas direct property investment fell 82 percent in the first six months this year. Analysts forecast the downward trend will continue, leading to a "material slowdown," with transaction volume and prices expected to come under pressure, according to a Morgan Stanley report.

For Beijing, the risks remain. If the dollar strengthens and the yuan weakens, for instance, that may prompt investors to take their money again out of China to find more value abroad. And there's a big question of how leveraged companies became with the billions they spent investing overseas, which could pose real risks to the financial system.

But, for now, there are signs the government curbs have worked to slow the flow of money going abroad. And Beijing, for its part, doesn't look like it will step down on oversight anytime soon.

Starting on August 21, Chinese banks will be required to report daily to the government ATM withdrawals and domestic bank card spending overseas of more than 1,000 yuan (about $150).