Muti-loop scattering amplitudes for multi-particle processes start to play an increasingly important role in future collider physics analyses. We review the recent progress in calculating the virtual two-loop corrections for five-particle processes. We concentrate on the analytic calculation of the relevant master integrals representing nonplanar corrections in any 4D gauge theory including the massless QCD, Yang-Mills theory, N=4 super-Yang-Mills theory. We apply the modern mathematical techniques for evaluating multi-loop Feynman integrals which include the iterated integrals, symbol alphabets, analysis of the leading singularities, the canonical form of the differential equation. We identify the space of the pentagon functions representing the five-point Feynman integrals with on-shell legs. Using this knowledge, we apply the bootstrap approach relying on the Mellin-Barnes representation to find a number of nontrivial two-loop integrals. Then we evaluate all master integrals belonging to one of the two nonplanar topologies using the method of differential equations. We also explain how some of these integrals can be evaluated using the anomalous superconformal Ward identities. Finally, we discuss the application of these results to the five-point two-loop nonplanar amplitude in N=4 super-Yang-Mills theory.