=ARRAYFORMULA(QUERY(SUBSTITUTE(TRIM(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(
QUERY(TRANSPOSE(IF(IFERROR(SPLIT(C1:C, ";"))<>"", "♥"&A1:A&"♦"&B1:B&"♦"&
IFERROR(SPLIT(C1:C, ";"))&"♥"&D1:D, )),,999^99)),,999^99), "♥")), "♦")), D1, ),
"where Col1 is not null", 0))