  Given a semigroup $S$ generated by its squares equipped with an involutive
automorphism $\sigma$ and a multiplicative function $\mu:S\to\mathbb{C}$ such
that $\mu(x\sigma(x))=1$ for all $x\in S$, we determine the complex-valued
solutions of the following functional equation.
