  The stellar initial mass function (IMF) is fundamental for many areas of
astrophysics, but its origin remains poorly understood. It may be inherited
from the core mass function (CMF) or arise as a result of more chaotic,
competitive accretion. Dense, gravitationally bound cores are seen in molecular
clouds and some observations have suggested that the CMF is similar in shape to
the IMF, though translated to higher masses by a factor of $\sim3$. Here we
measure the CMF in 28 dense clumps within 3.5 kpc that are likely to be central
regions of massive protoclusters, observed via $1.3\:{\rm{mm}}$ dust continuum
emission by the ALMAGAL project. We identify 222 cores using the dendrogram
algorithm with masses ranging from 0.04 to $252\:M_{\odot}$. We apply
completeness corrections for flux and number recovery, estimated from core
insertion and recovery experiments. At higher masses, the final derived CMF is
well described by a single power law of the form
$dN/d\:{\textrm{log}}\:M\propto\:M^{-\alpha}$ with $\alpha\simeq0.94\pm0.08$.
However, we find evidence of a break in this power-law behavior between $\sim5$
and $15\:M_{\odot}$, which is, to our knowledge, the first time such a break
has been found in distant ($\gtrsim 1$~kpc) regions by ALMA. We compare this
massive protocluster CMF with those derived using the same methods in the G286
protocluster and a sample of Infrared Dark Clouds. The massive protocluster CMF
is significantly different, i.e., containing more massive cores, which is a
potential indication of the role of environment on the CMF and IMF.
