1. How to add an equation
This is just code, you decide what calculation you need to use and add it to your program. Where? Only you will know the answer to that. Do you actually need a calculation or would a GUID do the job?
2. How to fetch Hardware ID
Look at these links from Google:
https://www.google.com/search?q=c%23%20wmi[
^]
3. How to save serial as HKEY
See the
Registry class[
^]
All of which I found via Google.