  We study the dependence on the charm quark mass of the leading-order
low-energy constants of the $\Delta S=1$ effective Hamiltonian, with the aim of
elucidating the role of the charm mass scale in the $\Delta I=1/2$ rule for
$K\to\pi\pi$ decay. To that purpose, finite-volume Chiral Perturbation Theory
predictions are matched to QCD simulations, performed in the quenched
approximation with overlap fermions and $m_u=m_d=m_s$. Light quark masses range
between a few MeV up to around one third of the physical strange mass, while
charm masses range between $m_u$ and a few hundred MeV. Novel variance
reduction techniques are used to obtain a signal for penguin contractions in
correlation functions involving four-fermion operators. The important role
played by the subtractions required to construct renormalised amplitudes for
$m_c \neq m_u$ is discussed in detail. We find evidence that the moderate
enhancement of the $\Delta I=1/2$ amplitude previously found in the GIM limit
$m_c=m_u$ increases only slightly as $m_c$ abandons the light quark regime.
Hints of a stronger enhancement for even higher values of $m_c$ are also found,
but their confirmation requires a better understanding of the subtraction
terms.
