Starting at 3-loop order, the massive Wilson coefficients for deep-inelastic scattering and the massive operator matrix elements describing the variable flavor number scheme receive contributions of Feynman diagrams carrying quark lines with two different masses. In the case of the charm and bottom quarks, the usual decoupling of one heavy mass at a time no longer holds, since the ratio of the respective masses, η = m 2 c /m 2 b ∼ 1/10, is not small enough. Therefore, the usual variable flavor number scheme (VFNS) has to be generalized. The renormalization procedure in the two-mass case is different from the single mass case derived in [1]. We present the moments N = 2, 4 and 6 for all contributing operator matrix elements, expanding in the ratio η. We calculate the analytic results for general values of the Mellin variable N in the flavor non-singlet case, as well as for transversity and the matrix element A(3) gq . We also calculate the two-mass scalar integrals of all topologies contributing to the gluonic operator matrix element A gg . As it turns out, the expansion in η is usually inapplicable for general values of N . We therefore derive the result for general values of the mass ratio. From the single pole terms we derive, now in a two-mass calculation, the corresponding contributions to the 3-loop anomalous dimensions. We introduce a new general class of iterated integrals and study their relations and present special values. The corresponding functions are implemented in computer-algebraic form.(2),NS qq,Q (N F + 2) δ 2 +Ĉ(2),NS q,(2,L) (N F ) 5 The sum in Eq. (2.19) is over the words w given by the different orderings of the Lorentz indices. For example, for M = 3 one obtains, Sf µ1,µ2,µ3 = 1 6 (f µ1,µ2,µ3 + f µ1,µ3,µ2 + f µ2,µ1,µ3 + f µ2,µ3,µ1 + f µ3,µ1,µ2 + f µ3,µ2,µ1 ).