You said you kept your H1B job when you used EAD in another company. You are not allowed to get paid by another company other than your H1B sponsor.
On another note, your case is tricky. It may take some thinking to sort it out.
On another note, your case is tricky. It may take some thinking to sort it out.