If a person in India working for Company A and say Company B has filed his H1B which got selected in the lottery and got the approval. Now while in India will that person be able to transfer his H1B to Company C based on the H1B approval? Or person has to wait for visa stamping and then give a try for transfer? Or the whole H1B transfer requires the person to be in US only and few pay cycles to be generated via Company B before try for the transfer?

Really appreciate the help.