加密解密-TraceMe—注册机

今天早上起来的有点早啊!写了个TraceMe的注册机O(∩_∩)O~


unsigned char Table[8] = {0xC, 0xA, 0x13, 0x9,0xC,0xB,0xA,0x8};
 unsigned long GenRegCode(CHAR * name, int len)
{
	CString temp;
	int i, j;
	unsigned long ID =0;
	for(i=3,j=0; i7)
			j=0;
		ID+=name[i]*Table[j];
	}
	return ID;
}
void CTraceMeDlg::OnRegist() 
{
	// TODO: Add your control notification handler code here
	CString str1;
	CString test;
	unsigned long str2;
	char* buf;
	GetDlgItemText(IDC_Name,str1);
	buf = (LPSTR)(LPCTSTR)str1;
	str2 = GenRegCode(buf,strlen(str1));
	test.Format("%ld",str2);
	SetDlgItemText(IDC_ID, test);
}



你可能感兴趣的:(汇编,爆破)