这是我从IDA上抓下来的一段代码 :
int __cdecl main()
{
unsigned __int64 v0; // st7@5
char v2; // [sp+14h] [bp-74h]@1
unsigned __int64 v3; // [sp+54h] [bp-34h]@5
double v4; // [sp+5Ch] [bp-2Ch]@5
double v5; // [sp+64h] [bp-24h]@3
double v6; // [sp+6Ch] [bp-1Ch]@3
double v7; // [sp+74h] [bp-14h]@5
double v8; // [sp+7Ch] [bp-Ch]@3
int i; // [sp+84h] [bp-4h]@1
memset(&v2, -858993460, 0x74u);
for ( i = 1; i <= 10; ++i )
{
printf("enter a b c:");
scanf("%lf,%lf,%lf", &v8, &v6, &v5);
if ( v8 + v6 <= v5 || v8 - v6 >= v5 )
{
printf("a=%.2f,b=%.2f,c=%.2f\n", *(_QWORD *)&v8, *(_QWORD *)&v6, *(_QWORD *)&v5);
}
else
{
v4 = v8 + v6 + v5;
v7 = (v8 + v6 + v5) / 2.0;
*(double *)&v0 = sqrt((v7 - v8) * v7 * (v7 - v6) * (v7 - v5));
v3 = v0;
printf("m=%.2f,area=%.2f\n", *(_QWORD *)&v4, v0, v0 >> 32);
}
}
return _chkesp();
}