//
// sub_724400 from 0x724400 to 0x7244f8 (248 bytes)
//
// 1 xrefs:
// > sub_73158C @ 0x7315f2
//
// 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
//
_DWORD *__fastcall sub_724400(int a1, _DWORD *a2)
{
_DWORD *result; // r0
int v4; // r3
unsigned int v5; // r2
int v6; // r2
int v7; // r3
int v8; // r3
_DWORD *v9; // r2
_DWORD *v10; // r2
_DWORD *v11; // r3
signed int v12; // r3
unsigned int v13; // r2
signed int v14; // r2
unsigned int v15; // r1
_DWORD v16[4]; // [sp+4h] [bp-10h] BYREF
result = sub_71EC08(v16, a1);
LABEL_2:
v4 = v16[0];
while ( v4 )
{
if ( *(_BYTE *)v4 )
{
if ( *(_BYTE *)v4 == 1 )
{
++*(_DWORD *)(*a2 + 4 * (*(_DWORD *)(v4 + 4) + 280));
}
else
{
v5 = *(unsigned __int16 *)(v4 + 2);
if ( v5 >= 0x200 )
{
v14 = v5 - 1;
v15 = __clz(v14) ^ 0x1F;
v6 = ((v14 >> (v15 - 1)) & 1) + 2 * v15;
}
else
{
v6 = byte_A037B0[2 * v5];
}
result = (_DWORD *)*a2;
++*(_DWORD *)(*a2 + 4 * (v6 + 256));
v7 = *(_DWORD *)(v4 + 4);
if ( v7 >= 512 )
{
v12 = v7 - 1;
v13 = __clz(v12) ^ 0x1F;
v8 = ((v12 >> (v13 - 1)) & 1) + 2 * v13;
}
else
{
v8 = byte_A037B0[2 * v7];
}
++a2[v8 + 769];
}
}
else
{
v9 = &a2[*(unsigned __int8 *)(v4 + 7)];
++v9[513];
v10 = &a2[*(unsigned __int8 *)(v4 + 6)];
++v10[1];
result = (_DWORD *)*(unsigned __int8 *)(v4 + 5);
++*(_DWORD *)(*a2 + 4 * (_DWORD)result);
v11 = &a2[*(unsigned __int8 *)(v4 + 4)];
++v11[257];
}
v4 = v16[0] + 8;
v16[0] = v4;
if ( v4 == v16[2] )
{
result = (_DWORD *)sub_71EC28((int)v16);
goto LABEL_2;
}
}
return result;
}