再贴上注册机把,小弟第一次贴注册机,写的丑,多多包含。 (4千字)
//很久前以写的了,哪时候还有班上,现在我又下岗了。真怀恋有工作的时光#include<windows.h>
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<stdlib.h>
#include<time.h>
char *point,*point1,charstr[100],covert[100],input_no[100],char1;
DWORD number,i,first,second,third,random;
void main(void)
{ printf("SyGate 3.0 proxy registry http://www.sygate.com \n");
printf("crack by:machoman\n");
printf("please input number \n");
scanf("%s",charstr);
getchar();
strcpy(input_no,charstr);
/*********************************************************************************/
//这部分C是把输入的转换成对应的类BCD表示,如果输入'18181818'把它转换为一个DWORD的0x18181818
number=lstrlen(input_no);
if(number<8)
{printf("the input number can 't lower 8 NULL\n");
return;
}
point=&char1;
random=rand();
for(i=0;i<8;i++)
{
point=&input_no[i];
if(((*point)<0x30)|(((*point)>0x39)&&((*point)<0x41))|(((*point)>0x5a)&&((*point)<0x61))|
((*point)>0x66)|(((*point)>0x46)&&((*point)<0x61))|(input_no[0]>0x34))
{printf("input must area in 0-9,A-F and first character must lower 4");
return;
}
if(*point>=0x30&&*point<=0x39)
{*point=*point-0x30;
first=first<<4;
first=first|(*point);
}
else
if((*point)>=0x41&&(*point)<=0x46)
{*point=*point-0x37;
first=first<<4;
first=first|(*point);
}
else
if((*point)>=0x61&&(*point)<=0x66)
{*point=*point-0x57;
first=first<<4;
first=first|(*point);
}
point1=point1+1;
}
/*********************************************************************************/
//这部分汇编代码就是在程序中粘贴过来的,我懒!不想写成C了
_asm{ push eax
push ebx
push ecx
push edx
push esi
push edi
push ebp
mov ecx, first//(BCD)18181818
mov eax, ecx
xor eax, 0x245143
imul eax, ecx
imul eax, ecx
mov edx, eax
shl edx, 0x0B
sub edx, eax
lea edx, dword ptr [edx+4*edx]
lea edx, dword ptr [eax+4*edx]
lea edx, dword ptr [edx+2*edx]
lea esi, dword ptr [eax+2*edx+0x67A77]
mov eax, 0x7325A665
imul esi, ecx
mul ecx
imul esi, ecx
sub esi, 0x00001A6E
imul esi, ecx
shr edx, 0x11
mov eax, edx
shl eax, 0x08
add eax, edx
lea eax, dword ptr [eax+2*eax]
lea eax, dword ptr [esi+eax+0x11B1]
mov ecx, eax
mov edx, ecx
shr eax, 0x34
shr edx, 0x28
lea eax, dword ptr [eax+2*eax]
lea edx, dword ptr [edx+4*edx]
add eax, edx
mov edx, ecx
shr edx, 0x1C
shr ecx, 0xE
lea edi, dword ptr [edx+4*edx]
lea edx, dword ptr [edx+2*edi]
add eax, edx
add eax, ecx
and eax, 0xFFFFF//这个值就是后半部分serial no:的低4位,高4位可为随机数
mov second,eax
mov ecx, first//(BCD)18181818
mov eax, ecx
xor eax, 0x94920945
imul eax, ecx
imul eax, ecx
imul eax, ecx
imul eax, ecx
lea edx, dword ptr [8*eax+00000000]
sub edx, eax
lea edx, dword ptr [eax+4*edx]
lea esi, dword ptr [eax+8*edx+0x0000561]
mov eax, 0xC20F4DCF
mul ecx
imul esi, ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 0x11
mov edx, eax
shl edx, 04
add edx, eax
lea eax, dword ptr [edx+8*edx]
lea eax, dword ptr [eax+8*eax]
add esi, eax
imul esi, ecx
sub esi, 0x2B3821C
imul esi, ecx
shr ecx, 0x1E
xor ecx, 0xFAFAFAFA
lea eax, dword ptr [ecx+4*ecx]
lea eax, dword ptr [eax+4*eax]
lea eax, dword ptr [eax+4*eax]
lea edx, dword ptr [eax+4*eax]
shl edx, 04
sub edx, ecx
lea eax, dword ptr [esi+edx+0x0014E3]
mov third,eax//这里就是Registration:
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
pop eax
}
printf("output of registry key is:\n");
printf("Serial No:%x",first);
printf("-");
printf("%d0",random);
printf("%x\n",second);
printf("Registration:%x\n",third);
}
