Unhappy [Q] After flashing stock samsung rom, i have been stuck on emergency calls only,help?

Hi,
After flashing stock s3 rom my sim card is not being detected. i know the sim card works because i tried it on another phone and i have a feeling my efs file has been made corrupt as my imei has been completely changes to 0049xxxx. Also i cannot connect to any wifi network but theyre being found . ive looked everywhere and found no answer. Please help me on how i can fix it.