We use the functional renormalization approach for quantum spin systems developed by Krieg and Kopietz [Phys. Rev. B 99, 060403(R) (2019)] to calculate the spin-spin correlation function G(k, ω) of quantum Heisenberg magnets at infinite temperature. For small wavevectors k and frequencies ω we find that G(k, ω) assumes the diffusive form predicted by hydrodynamics. Our result for the spin-diffusion coefficient D is somewhat smaller than previous theoretical predictions based on the extrapolation of the short-time expansion, but is still about 30% larger than the measured high-temperature value of D in the Heisenberg ferromagnet Rb2CuBr4 • 2H2O. In reduced dimensions d ≤ 2 we find superdiffusion characterized by a frequency-dependent complex spindiffusion coefficient D(ω) which diverges logarithmically in d = 2, and as a power-law D(ω) ∝ ω −1/3 in d = 1. Our result in one dimension implies scaling with dynamical exponent z = 3/2, in agreement with recent calculations for integrable spin chains. Our approach is not restricted to the hydrodynamic regime and allows us to calculate the dynamic structure factor S(k, ω) for all wavevectors. We show how the short-wavelength behavior of S(k, ω) at high temperatures reflects the relative sign and strength of competing exchange interactions.