//edx contains the number of chars in the imputted name //edi contains the inputted name mov ebx,4h xor eax,eax mov esi,186A0h mov ecx,edx xor edx,edx SERIAL_ROUTINE: movsx eax,byte ptr [edi+edx] imul eax,ebx lea esi,[esi+eax+2Bh] add edx,1 add ebx,4 cmp edx,ecx jl SERIAL_ROUTINE mov ebx,esi //ebx contains the final, real, serial converted: int nLen = GetWindowTextLength(GetDlgItem(hWnd, IDC_NAME))+1; LPSTR lpszName = new CHAR[nLen]; GetDlgItemText(hWnd, IDC_NAME, lpszName, nLen); nLen--; int nPos = 0, nSum = 0; while(nPos < nLen) nSum += (lpszName[nPos++] * (4 * (nPos + 1))) + 0x186CB // (0x186A0 + 0x2B)