If you got your renewal H1-B receite and you continue in the same company,you can legally work in this company even if your H-1b is pending.You still is H1-B status after your H1-B get approved