一个有意思的CM
这个CM是一个VC控制台程序,破解成功后附上截图。 :L火星人了 晕 爆破容易
算法懒得分析
int __cdecl main(int argc, const char **argv, const char *envp)
{
signed int Type; // eax@1
char *Output; // eax@2
char v6; // zf@5
char Char0; // @1
char InputData; // @1
char v9; // @1
__int16 v10; // @1
char v11; // @1
char v12; // @1
__int16 v13; // @1
char v14; // @1
Char0 = 0;
InputData = 0;
memset(&v9, 0, 0x1FCu);
v10 = 0;
v11 = 0;
memset(&v12, 0, 0xFFFCu);
v13 = 0;
v14 = 0;
puts("forgot's crackme 666\ninput code:");
scanf("%s", &InputData);
Type = Math((int)&Char0, (int)&InputData);
if ( Type )
{
if ( Type == 1 )
{
Output = "FUCKED";
}
else
{
v6 = Type == 2;
Output = "UNFINISHED";
if ( !v6 )
Output = (char *)&unk_40A044;
}
}
else
{
Output = "ESCAPED";
}
printf("you are %s\n", Output);
return system((int)"pause");
}
signed int __cdecl Math(int a1, int a2)
{
signed int v2; // edx@1
signed int v3; // ebp@1
int v4; // edi@1
signed int v5; // esi@1
int v6; // edi@3
signed int v7; // eax@14
char v8; // zf@15
char v9; // sf@15
unsigned __int8 v10; // of@15
char v11; // zf@22
char v12; // sf@22
unsigned __int8 v13; // of@22
unsigned int v15; // kr00_4@1
unsigned __int8 v16; // of@32
char v17; // sf@32
signed int v18; // @1
int v19; // @1
int v20; // @1
char v21; // @3
v18 = 1;
v15 = strlen((const char *)a2);
v5 = 4;
v2 = 3;
v4 = 0;
v3 = 0;
v19 = v15 - 1;
v20 = 0;
if ( (signed int)(v15 - 1) <= 0 )
return 2;
while ( 2 )
{
switch ( *(_BYTE *)(v4 + a2) & 0xF )
{
case 1:
v6 = v18;
if ( !(*(&v21 + 8 * v18 + v3) & 1) )
v6 = v18-- - 1;
goto LABEL_12;
case 2:
if ( !(*(&v21 + 8 * v18 + v3) & 2) )
++v18;
break;
case 4:
if ( !(*(&v21 + 8 * v18 + v3) & 4) )
--v3;
break;
case 8:
if ( !(*(&v21 + 8 * v18 + v3) & 8) )
++v3;
break;
default:
break;
}
v6 = v18;
LABEL_12:
if ( v3 == 4 && !v6 )
return 0;
v7 = 0;
while ( 1 )
{
v10 = __SETO__(v5, v3);
v8 = v5 == v3;
v9 = v5 < v3;
if ( v5 >= v3 )
break;
if ( *(&v21 + 8 * v2 + v5) & 8 )
{
v10 = __SETO__(v5, v3);
v8 = v5 == v3;
v9 = v5 < v3;
break;
}
++v5;
LABEL_29:
++v7;
if ( v7 >= 2 )
goto LABEL_30;
}
if ( !((unsigned __int8)(v9 ^ v10) | v8) && !(*(&v21 + 8 * v2 + v5) & 4) )
{
--v5;
goto LABEL_29;
}
v13 = __SETO__(v2, v6);
v11 = v2 == v6;
v12 = v2 < v6;
if ( v2 >= v6 )
goto LABEL_26;
if ( !(*(&v21 + 8 * v2 + v5) & 2) )
{
++v2;
goto LABEL_29;
}
v13 = __SETO__(v2, v6);
v11 = v2 == v6;
v12 = v2 < v6;
LABEL_26:
if ( !((unsigned __int8)(v12 ^ v13) | v11) && !(*(&v21 + 8 * v2 + v5) & 1) )
{
--v2;
goto LABEL_29;
}
LABEL_30:
if ( v3 != v5 || v6 != v2 )
{
v4 = v20 + 1;
v16 = __SETO__(v20 + 1, v19);
v17 = v20++ + 1 < v19;
if ( !(v17 ^ v16) )
return 2;
continue;
}
return 1;
}
}
:lol 原帖由 我是肉鸡 于 2009-1-9 18:05 发表 http://www.52pojie.cn/images/common/back.gif
11109
:lol
拜托!应该是 i am your fans 没玩过控制台的 不知道咋整 蛮不错的呀。。。 ............强大的Z
页:
[1]