
Hi,
I'm sure the following code:
int __cdecl sort_balls()
{
unsigned int v0; // ebx@1
int v1; // edi@1
int result; // eax@1
unsigned int v3; // ebx@5
int v4; // edx@5
__int32 v5; // edx@17
unsigned int v6; // eax@17
int s[66]; // [sp+4h] [bp-108h]@1
v0 = 0;
memset(s, 0, 0xF4u);
memset(s, 999, 0xF4u);
v1 = 0;
result = game_int;
do
{
if ( !result )
{
LABEL_17:
v5 = random() % 60;
v6 = 0;
do
{
if ( v5 == s[v6] )
goto LABEL_17;
++v6;
}
while ( v6 <= v0 );
s[v0] = v5;
result = game_int;
}
++v0;
*(_DWORD *)(v1 + 135362116) = 330;
*(_DWORD *)(v1 + 135362120) = 12;
*(_DWORD *)(v1 + 135362132) = 330;
*(_DWORD *)(v1 + 135362136) = 12;
*(_DWORD *)(v1 + 135362124) = 0;
*(_DWORD *)(v1 + 135362128) = 0;
v1 += 28;
}
while ( v0 <= 59 );
*(_DWORD *)&ball[908] = 154;
if ( !result )
{
v3 = 0;
v4 = (int)ball;
do
{
result = s[v3];
if ( (unsigned int)result > 14 )
{
if ( (unsigned int)result > 29 )
{
if ( (unsigned int)result > 44 )
{
if ( (unsigned int)result > 59 )
goto LABEL_9;
result = *(_DWORD *)&cart[4 * result + 1264];
}
else
{
result = *(_DWORD *)&cart[4 * result + 844];
}
}
else
{
result = *(_DWORD *)&cart[4 * result + 424];
}
}
else
{
result = *(_DWORD *)&cart[4 * result + 4];
}
*(_DWORD *)v4 = result;
LABEL_9:
++v3;
v4 += 28;
}
while ( v3 <= 0x3B );
}
return result;
}
I do not know what exactly "* (* _DWORD)" means. If a structure is and if it is how to improve this part of the code.
Thanks for the help, I'm starting this world. =)