Original: Klaus spends all night reading about nuptial law, hoping to learn how they can foil Olaf's plans to take their fortune.
Simplified: Klaus spent the entire night reading about how they could stop Count Olaf's plan to get their money.