We explore maximal unitarity for nonplanar two-loop integrals with up to four
massive external legs. In this framework, the amplitude is reduced to a basis
of master integrals whose coefficients are extracted from maximal cuts. The
hepta-cut of the nonplanar double box defines a nodal algebraic curve
associated with a multiply pinched genus-3 Riemann surface. All possible
configurations of external masses are covered by two distinct topological
pictures in which the curve decomposes into either six or eight Riemann
spheres. The procedure relies on consistency equations based on vanishing of
integrals of total derivatives and Levi-Civita contractions. Our analysis
indicates that these constraints are governed by the global structure of the
maximal cut. Lastly, we present an algorithm for computing generalized cuts of
massive integrals with higher powers of propagators based on the Bezoutian
matrix method.Comment: 54 pages, 9 figures, v2: journal versio