I couldn't say whether there was any actionable fraud , misrepresentation, or other violation of law which would make your mortgage "illegal" . In residential loan closings, there is a disclosure document called a "TIL" or Truth in Lending Disclosure. This document would show all the details of the loan including total amount due and payments on your LOAN, but it would not include escrows, so it is possible that your loan payment amount went down but that your escrows went up. Most HARP loans require escrow as an obligation under the mortgage which doesn't relate to the NOTE (the debt).
Banks can and sometime do recalculate escrows so I suspect that the actual cost of the ins and taxes increased. Also, I suspect that the Bank holding your old mortgage could have readjusted your escrow which might have made your total payment even higher if you had not refinaced.
However, there may have been a Truth in Lending. RESPA violation or fraud, but this would require further examination of the closing documents and correspondence, etc. to determine. Today, major Banks' lending policies are highly controlled to avoid this type of misunderstanding, but if you think there was misrepresentation or fraud, you should contact an attorney.