how to make a keygen for this?
public static void SetLicence (string strKey)
{
string str = "";
string str2 = "";
string str3 = "";
string str4 = "";
if ((strKey != "") && (strKey.Length == 35))
{
StringBuilder builder = new StringBuilder();
for (int i = 0; i < strKey.Length; i++)
{
if ((strKey > 'F') && (strKey < '['))
{
builder.Append('0');
}
else
{
builder.Append(strKey);
}
}
strKey = builder.ToString();
str = strKey.Substring(0, 8 );
strKey = strKey.Replace(str + "-", "");
str2 = strKey.Substring(0, 8 );
strKey = strKey.Replace(str2 + "-", "");
str3 = strKey.Substring(0, 8 );
strKey = strKey.Replace(str3 + "-", "");
str4 = strKey;
long num2 = 0L;
num2 += Convert.ToInt32(str.Substring(0, 3), 16 );
num2 += Convert.ToInt32(str2.Substring(0, 3), 16 );
num2 += Convert.ToInt32(str3.Substring(0, 3), 16 );
if (num2 == Convert.ToInt32(str4, 16))
{
FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
string str5 = Convert.ToInt32(str.Substring(0, 6), 16).ToString();
if ((versionInfo.FileMajorPart.ToString("0") + versionInfo.FileMinorPart.ToString("00")) == str5.Substring(0, 3))
{
string code = "06BE902486721833";
long num3 = 0L;
for (int j = 0; j < code.Substring(6).Length; j++)
{
num3 += (long) code.Substring(6)[j];
}
if (Convert.ToInt32(str2, 16) == ((num3 * 999) % 2147483647))
{
MessageBox.Show("Good Work!!!!");
}
}
}
}
if (menmLicenseType == LicenseType.Demo)
{
MessageBox.Show("Try again!!!!");
}
}
// وشكرا على المساعدة//