int __stdcall sub_401090(HWND hWnd, int a2, int a3, int a4)
{
int v4; // eax
char Source[260]; // [esp+50h] [ebp-310h] BYREF
CHAR Text[5]; // [esp+154h] [ebp-20Ch] BYREF
char v8[252]; // [esp+159h] [ebp-207h] BYREF
__int16 v9; // [esp+255h] [ebp-10Bh]
char v10; // [esp+257h] [ebp-109h]
int Value; // [esp+258h] [ebp-108h]
CHAR String[260]; // [esp+25Ch] [ebp-104h] BYREF
memset(String, 0, sizeof(String));
Value = 0;
if ( a2 == 16 )
{
DestroyWindow(hWnd);
PostQuitMessage(0);
}
else if ( a2 == 273 )
{
if ( a3 == 1000 )
{
GetDlgItemTextA(hWnd, 1002, String, 260);
strlen(String);
if ( strlen(String) > 6 )
ExitProcess(0);
v4 = atoi(String);
Value = v4 + 1;
if ( v4 == 122 && String[3] == 120 && String[5] == 122 && String[4] == 121 )
{
strcpy(Text, "flag");
memset(v8, 0, sizeof(v8));
v9 = 0;
v10 = 0;
_itoa(Value, Source, 10);
strcat(Text, "{");
strcat(Text, Source);
strcat(Text, "_");
strcat(Text, "Buff3r_0v3rf|0w");
strcat(Text, "}");
MessageBoxA(0, Text, "well done", 0);
}
SetTimer(hWnd, 1u, 0x3E8u, TimerFunc);
}
if ( a3 == 1001 )
KillTimer(hWnd, 1u);
}
return 0;
}
flag的其他字符已经知道,现在要找到变量source的值,因为source是value的字符形式,而value=v4+1,v4=122,所以value=123,source='123'
flag=flag{123_Buff3r_0v3rf|0w}