  The baryon content of high-density regions in the universe is relevant to two
critical unanswered questions: the workings of nurture effects on galaxies and
the whereabouts of the missing baryons. In this paper, we analyze the
distribution of dark matter and semianalytical galaxies in the Millennium
Simulation to investigate these problems. Applying the same density field
reconstruction schemes as used for the overall matter distribution to the
matter locked in halos we study the mass contribution of halos to the total
mass budget at various background field densities, i.e., the conditional halo
mass function. In this context, we present a simple fitting formula for the
cumulative mass function accurate to ~ 5% for halo masses between 10^{10} and
10^{15}Msol/h. We find that in dense environments the halo mass function
becomes top heavy and present corresponding fitting formulae for different
redshifts. We demonstrate that the major fraction of matter in high-density
fields is associated with galaxy groups. Since current X-ray surveys are able
to nearly recover the universal baryon fraction within groups, our results
indicate that the major part of the so-far undetected warm-hot intergalactic
medium resides in low-density regions at low temperatures. Similarly, we show
that the differences in galaxy mass functions with environment seen in observed
and simulated data stem predominantly from differences in the mass distribution
of halos. In particular, the hump in the galaxy mass function is associated
with the central group galaxies, and the bimodality observed in the galaxy mass
function is therefore interpreted as that of central galaxies versus
satellites.
