We present an approach for the simulation of time resolved photoelectron spectra based on the combination of the ab initio nonadiabatic molecular dynamics ”on the fly” with the Stieltjes imaging method utilizing discrete neutral states above the ionization limit for the approximate description of the ionization continuum. Our approach has been implemented in the framework of the time-dependent density functional theory and has been applied to interrogate the ultrafast internal conversion between the S2 and S1 states in pyrazine. The simulations reveal that, parallel to the S2→S1 internal conversion, a change in the dominant ionization process (S2→D1 versus S1→D0) occurs on the time scale of 20 fs such that no significant change in the photoelectron kinetic energy distribution is observed. The presented results are in full agreement with the experimental results presented in the accompanying paper [ Suzuki et al., J. Chem. Phys. 132, 174302 (2010) ] and provide an insight into the interplay between the nonradiative relaxation and the photoionization process in pyrazine as reflected in the time resolved photoelectron spectrum. Our approach represents a general tool for the investigation of ultrafast photoionization processes in complex systems and thus can be used to investigate the ultrafast femtochemistry of complex molecular systems including all degrees of freedom.