If that restoration to factory settings also removed your license copy - then have it resent:
Resend avast License http://www.avast.com/resend-license-paid.php, you will need to enter the email that you used when purchasing the license, e.g. the one that the original email with the link was sent.