Numerical simulation and theory of generation of electromagnetic waves in the presence of whistler turbulence