It wasn't much really. I smelt bullshit a-comin' and engineered myself some leverage using some of her own stupidity against her, and slyly protected my assets while playing nice and before she knew that I knew. I manipulated her approach by injecting selected bits of information about what I might or might not know into the grapevine that I knew would reach her eventually; I always treated her in a very civil manner even when she wasn't being civil. A PsyOp basically. Mind you, this was all so I could come away vaguely "even", and it was still an expensive problem.
Before it came to a head, I nonchalantly decided to put all my investment money into long-term non-liquid investments (smartly selected startup ventures) and then decided to help build those companies to "protect my investment" for a pittance salary that was far less than what she was making. I was going to do some of that venture stuff anyway, but when I saw how the other situation was playing out, I went whole hog. She wasn't thrilled with the idea but didn't say anything. When the divorce actually came up, I was no longer a particularly tempting target asset-wise and I got off writing a modest check that took most of whatever remained of my liquid assets (not much).
That and her awareness inferred through the grapevine that I might have some dirt she REALLY did not want to come out, and she "let me slide" for some cold cash rather than dragging it into court. So in short, I smelled it in the wind and preemptively mounted a very smart defense.