You'll clear departure immigration in KUL. There's a dedicated path for domestic - international transfers. Just follow the signs for C/G/H gates.
As a side note, that will be the second time you clear immigration during the trip. The first will be when departing KCH.