//
// sub_1003538A4 from 0x1003538a4 to 0x100353924 (128 bytes)
//
// 2 xrefs:
// > sub_10024A428 @ 0x10024a42c
// > sub_10024A46C @ 0x10024a48c
//
// 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
//
void __fastcall sub_1003538A4(__int64 a1, cocos2d::CCObject *a2, unsigned int a3)
{
sub_1003535BC((_DWORD *)a1, 1);
if ( *(_DWORD *)a1 != a3 )
memmove(
(void *)(*(_QWORD *)(a1 + 16) + 8LL * (a3 + 1)),
(const void *)(*(_QWORD *)(a1 + 16) + 8LL * a3),
8LL * (*(_DWORD *)a1 - a3));
cocos2d::CCObject::retain(a2);
*(_QWORD *)(*(_QWORD *)(a1 + 16) + 8LL * a3) = a2;
++*(_DWORD *)a1;
}