//
// sub_CCC54 from 0xccc54 to 0xccd64 (272 bytes)
//
// 2 xrefs:
// > sub_6B00C @ 0x6b404
// > ??> @ 0x10f838
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_CCC54(__int64 *a1, int *a2, __int64 a3)
{
__int64 v3; // x30
__int64 result; // x0
__int64 v6; // x8
__int64 v7; // x9
int v8; // w13
__int64 v9; // x10
__int64 v10; // x11
__int64 *v11; // x12
__int64 v12; // x14
__int64 v13; // x14
__int64 v14; // x14
__int64 v15; // x14
float v16; // s0
__int64 v17; // x0
int v18; // s1
int v19; // s2
int v20; // s3
result = 31;
if ( a1 && a2 && a3 )
{
v6 = *a1;
if ( v6 && *a2 >= 1 )
{
v7 = *(_QWORD *)(v6 + 168);
if ( v7 )
{
v8 = *(_DWORD *)(v7 + 69104);
v9 = 0;
v10 = a3 + 24;
if ( *a2 < v8 )
v8 = *a2;
v11 = (__int64 *)(v7 + 68256);
*a2 = v8;
while ( v9 < v8 )
{
v12 = *(v11 - 6);
*(_DWORD *)(v10 - 16) = *((_DWORD *)v11 - 10);
*(_QWORD *)(v10 - 24) = v12;
v13 = *(v11 - 3);
*(_DWORD *)(v10 - 4) = *((_DWORD *)v11 - 4);
*(_QWORD *)(v10 - 12) = v13;
v14 = v11[3];
*(_DWORD *)(v10 + 8) = *((_DWORD *)v11 + 8);
*(_QWORD *)v10 = v14;
v15 = *v11;
*(_DWORD *)(v10 + 20) = *((_DWORD *)v11 + 2);
*(_QWORD *)(v10 + 12) = v15;
if ( (*(_BYTE *)(v7 + 120) & 4) != 0 && **(_DWORD **)(v6 + 232) >= 0x6Du )
{
v16 = sub_CD46C(v3, *(float *)(v10 - 16), *(float *)(v10 - 4), *(float *)(v10 + 8), *(float *)(v10 + 20));
v3 = v17;
*(float *)(v10 - 16) = v16;
*(_DWORD *)(v10 - 4) = v18;
*(_DWORD *)(v10 + 8) = v19;
*(_DWORD *)(v10 + 20) = v20;
}
v8 = *a2;
++v9;
v10 += 48;
v11 += 14;
}
return 0;
}
else
{
return 28;
}
}
else
{
return 31;
}
}
return result;
}