Angular momentum decomposition of entangled photons with an arbitrary pump