- Код: Выделить всё
int __fastcall sub_524B70(int a1, int a2, char a3)
{
int v3; // esi
char v4; // cl
char v5; // dl
signed int v6; // edi
_DWORD *v7; // ebx
int v8; // eax
char *v9; // ecx
int v10; // eax
signed __int64 v11; // rax
int v12; // ecx
signed int v13; // eax
int v14; // ecx
signed int v15; // eax
signed int v16; // eax
signed int v17; // eax
unsigned int v18; // eax
signed int v19; // eax
char v20; // al
signed int v21; // eax
int v22; // ecx
signed int v23; // eax
signed int v24; // eax
int v26; // [esp+Ch] [ebp-14h]
signed int v27; // [esp+14h] [ebp-Ch]
signed int v28; // [esp+18h] [ebp-8h]
char v29; // [esp+1Fh] [ebp-1h]
signed int v30; // [esp+28h] [ebp+8h]
v3 = a1;
v26 = a2;
v4 = *(_BYTE *)(a1 + a2 + 201);
v29 = v4;
if ( v4 != 3 && (v4 || *(_DWORD *)(v3 + 257) != 8) )
{
v5 = a3;
v6 = 1000;
v27 = 1000;
v28 = 500;
if ( a3 )
{
v7 = (_DWORD *)(v3 + 173);
v30 = 7;
do
{
v8 = *(v7 - 7);
if ( v8 != -1 )
{
v9 = (char *)off_6747B0 + 116 * v8;
v10 = *v7 * *((_DWORD *)v9 + 16);
v6 += v10;
if ( v9[16] & 4 )
v28 += v10;
v4 = v29;
}
++v7;
--v30;
}
while ( v30 );
v27 = v6;
}
switch ( v26 )
{
case 0:
return (signed __int64)((double)v27 * dbl_6818B0[v4] / 4.0);
case 1:
v12 = v28 * dword_640390[v4];
goto LABEL_81;
case 2:
LODWORD(v11) = v6 / 10;
return v11;
case 3:
case 12:
case 21:
LODWORD(v11) = v6 / 20;
return v11;
case 4:
LODWORD(v11) = v6 / 100;
return v11;
case 5:
return (signed __int64)((double)v27 * dbl_6818C8 / 2.0);
case 6:
case 9:
LODWORD(v11) = v6 / 50;
return v11;
case 7:
if ( v5 )
{
LOBYTE(v13) = *(_BYTE *)(v3 + 1144);
v14 = *(_DWORD *)(v3 + 1150);
if ( (char)v13 <= 99 )
{
v13 = (char)v13;
if ( (char)v13 <= 0 )
v13 = 1;
LODWORD(v11) = v14 * v13 / 2;
}
else
{
LODWORD(v11) = 99 * v14 / 2;
}
}
else
{
LOBYTE(v15) = *(_BYTE *)(v3 + 1144);
if ( (char)v15 <= 99 )
{
v15 = (char)v15;
if ( (char)v15 <= 0 )
v15 = 1;
LODWORD(v11) = 25 * v15;
}
else
{
LODWORD(v11) = 2475;
}
}
return v11;
case 8:
if ( v5 )
LODWORD(v11) = *(_DWORD *)(v3 + 1158) / 10;
else
LODWORD(v11) = 1;
return v11;
case 10:
LODWORD(v11) = v6 / 8;
return v11;
case 11:
if ( !*(_BYTE *)(v3 + 208) )
goto LABEL_108;
if ( v5 )
LODWORD(v11) = *(_DWORD *)(v3 + 1150) / 5;
else
LODWORD(v11) = 2;
return v11;
case 13:
if ( v5 )
v11 = (signed __int64)((double)dword_64039C[v4]
* COERCE_DOUBLE(
__PAIR__(
dword_692A34[38 * *(char *)(v3 + 34)],
dword_692A30[38 * *(char *)(v3 + 34)])));
else
LODWORD(v11) = dword_64039C[v4];
return v11;
case 14:
if ( v5 )
{
LODWORD(v11) = sub_525200(v3, 14);
return v11;
}
if ( *(_BYTE *)(v3 + 208) )
goto LABEL_44;
goto LABEL_108;
case 15:
if ( v5 )
{
LODWORD(v11) = sub_525200(v3, 15);
return v11;
}
if ( *(_BYTE *)(v3 + 208) )
goto LABEL_44;
LODWORD(v11) = 25;
return v11;
case 16:
if ( v5 )
{
LODWORD(v11) = sub_525200(v3, 16);
return v11;
}
if ( *(_BYTE *)(v3 + 208) )
goto LABEL_44;
LODWORD(v11) = 3;
return v11;
case 17:
if ( v5 )
{
LODWORD(v11) = sub_525200(v3, 17);
}
else if ( *(_BYTE *)(v3 + 208) )
{
LABEL_44:
LOBYTE(v16) = *(_BYTE *)(v3 + 1144);
if ( (char)v16 <= 99 )
goto LABEL_90;
LODWORD(v11) = 990;
}
else
{
LODWORD(v11) = 30;
}
break;
case 18:
if ( !*(_BYTE *)(v3 + 208) )
goto LABEL_108;
if ( v5 )
{
LOBYTE(v17) = *(_BYTE *)(v3 + 1144);
if ( (char)v17 <= 99 )
{
v17 = (char)v17;
if ( (char)v17 <= 0 )
v17 = 1;
}
else
{
v17 = 99;
}
v18 = (signed int)((unsigned __int64)(1717986919i64 * *(_DWORD *)(v3 + 1150) * v17) >> 32) >> 2;
LODWORD(v11) = (v18 >> 31) + v18;
}
else
{
LOBYTE(v19) = *(_BYTE *)(v3 + 1144);
if ( (char)v19 <= 99 )
{
v19 = (char)v19;
if ( (char)v19 <= 0 )
v19 = 1;
LODWORD(v11) = 5 * v19;
}
else
{
LODWORD(v11) = 495;
}
}
return v11;
case 19:
LODWORD(v11) = v6 / 50;
return v11;
case 20:
if ( v5 && !(unsigned __int8)sub_4D9460(4) )
goto LABEL_108;
v20 = *(_BYTE *)(v3 + 1142);
if ( v20 <= 99 )
{
if ( v20 <= 0 )
LODWORD(v11) = 0;
else
LODWORD(v11) = 10 * v20;
}
else
{
LODWORD(v11) = 990;
}
return v11;
case 22:
LODWORD(v11) = 7 * v6 / 100;
return v11;
case 23:
v12 = 7 * v6;
LABEL_81:
LODWORD(v11) = v12 / 100;
return v11;
case 24:
if ( v5 )
{
LOBYTE(v21) = *(_BYTE *)(v3 + 1145);
v22 = *(_DWORD *)(v3 + 1158);
if ( (char)v21 <= 99 )
{
v21 = (char)v21;
if ( (char)v21 <= 0 )
v21 = 1;
LODWORD(v11) = v22 * v21 / 4;
}
else
{
LODWORD(v11) = 99 * v22 / 4;
}
}
else
{
LOBYTE(v16) = *(_BYTE *)(v3 + 1145);
if ( (char)v16 <= 99 )
{
LABEL_90:
v16 = (char)v16;
if ( (char)v16 <= 0 )
v16 = 1;
LODWORD(v11) = 10 * v16;
}
else
{
LODWORD(v11) = 990;
}
}
break;
case 25:
if ( v5 )
{
LOBYTE(v23) = *(_BYTE *)(v3 + 1144);
if ( (char)v23 <= 99 )
{
v23 = (char)v23;
if ( (char)v23 <= 0 )
v23 = 1;
}
else
{
v23 = 99;
}
LODWORD(v11) = *(_DWORD *)(v3 + 1150) * v23 / 20;
}
else
{
LOBYTE(v24) = *(_BYTE *)(v3 + 1144);
if ( (char)v24 <= 99 )
{
v24 = (char)v24;
if ( (char)v24 <= 0 )
v24 = 1;
LODWORD(v11) = 2 * v24;
}
else
{
LODWORD(v11) = 198;
}
}
return v11;
case 26:
LODWORD(v11) = v6 / 40;
return v11;
case 27:
if ( v5 && !(unsigned __int8)sub_4D9460(6) )
goto LABEL_108;
LODWORD(v11) = 250;
return v11;
default:
goto LABEL_108;
}
}
else
{
LABEL_108:
LODWORD(v11) = 0;
}
return v11;
}