We study the degeneracy of quarter BPS dyons in N=4 type II compactifications of string theory. We find that the genus-two Siegel modular forms generating the degeneracies of the quarter BPS dyons in the type II theories can be expressed in terms of the genus-two Siegel modular forms generating the degeneracies of quarter BPS dyons in the CHL theories and the heterotic string. This helps us in understanding the algebra structure underlying the degeneracy of the quarter BPS states. The Conway group, Co 0, plays a role similar to Mathieu group, M 24, in the CHL models with eta quotients appearing in the place of eta products. We construct BKM Lie superalgebra structures for the ZN (for N=2, 3, 4) orbifolds of the type II string compactified on a six-torus. © 2012 Elsevier B.V.