往IDA一丢,基本逻辑就看的差不多了
[C] 纯文本查看 复制代码 DWORD __stdcall ThreadFunc2(LPVOID a1)
{
char *v1; // eax
int v2; // ebx
int i; // eax
int v4; // eax
int v5; // ebp
bool v6; // zf
int v7; // ebx
int v8; // ebx
int b; // [esp+28h] [ebp-264h]
HANDLE hThread4; // [esp+2Ch] [ebp-260h]
int qq[15]; // [esp+38h] [ebp-254h]
char *q[100]; // [esp+74h] [ebp-218h] BYREF
char s[100]; // [esp+204h] [ebp-88h] BYREF
int zxzx; // [esp+268h] [ebp-24h] BYREF
DWORD threadId4[8]; // [esp+26Ch] [ebp-20h] BYREF
hThread4 = CreateThread(0, 0, ThreadFunc4, 0, 0, threadId4);
starta1 = clock();
memset(q, 0, sizeof(q));
scanf("%s", s);
v1 = strtok(s, "-");
v2 = 0;
while ( v1 )
{
q[v2] = v1;
qq[v2++] = 0;
v1 = strtok(0, "-");
}
for ( i = v2; i >= 0; --i )
;
if ( v2 == 5 )
{
v4 = 100;
b = 20;
v5 = 20;
while ( 1 )
{
if ( !v5 )
{
if ( strcmp(q[1], "h") )
break;
if ( !qq[1] )
qq[1] = 1;
}
v8 = 50;
while ( v8 > 39 )
{
if ( v4 > 1 )
{
v4 -= 3;
}
else
{
if ( --v8 % 10 == 1 )
{
if ( strcmp(q[4], "p") )
goto loop5;
if ( !qq[4] )
qq[4] = 1;
}
if ( strcmp(q[3], "n") )
goto loop5;
if ( !qq[3] )
qq[3] = 1;
v4 = v8;
}
}
v6 = strcmp(q[2], "e") == 0;
v7 = !v6;
if ( !v6 )
break;
if ( !qq[2] )
qq[2] = 1;
while ( 1 )
{
while ( v5 > 19 )
v5 -= 30;
if ( v5 >= 0 )
break;
v5 += 5;
}
if ( b <= 5 )
{
while ( v7 <= 4 )
{
Sleep(0xAu);
++v7;
}
if ( !strcmp(q[0], "s") )
{
stopa1 = clock();
Sleep(0x1F4u);
WaitForSingleObject(hThread4, 0xFFFFFFFF);
GetExitCodeThread(hThread4, (LPDWORD)&zxzx);
if ( zxzx )
{
printf("%s%s%s%s%s password\n", "r", "i", "g", "h", "t");
return 0;
}
}
break;
}
--b;
v4 = 50;
}
}
loop5:
puts("wrong password");
return 0;
} |