Following Wigert, various authors, including Ramanujan, Gronwall, Erdős, Ivić, Schwarz, Wirsing, and Shiu, determined the maximal order of several multiplicative functions, generalizing Wigert's result max n≤x log d(n) = log x log log x (log 2 + o (1)).On the contrary, for many multiplicative functions, the maximal order of iterations of the functions remains widely open. The case of the iterated divisor function was only solved recently, answering a question of Ramanujan from 1915. Here we determine the maximal order of log f (f (n)) for a class of multiplicative functions f . In particular, this class contains functions counting ideals of given norm in the ring of integers of an arbitrary, fixed quadratic number field. As a consequence, we determine such maximal orders for several multiplicative f arising as a normalized function counting representations by certain binary quadratic forms. Incidentally, for the non-multiplicative function r2 which counts how often a positive integer is represented as a sum of two squares, this entails the asymptotic formula max n≤x log r2(r2(n)) = √ log x log log x (c/ √ 2 + o(1)) with some explicitly given constant c > 0.