//
// sub_752D7C from 0x752d7c to 0x752ff4 (632 bytes)
//
// 3 xrefs:
// > RandTriggerGameObject::customObjectSetup @ 0x770e40
// > SequenceTriggerGameObject::customObjectSetup @ 0x771040
// > SpawnTriggerGameObject::customObjectSetup @ 0x7713e4
//
// 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
//
cocos2d::CCArray *__fastcall sub_752D7C(_QWORD *a1)
{
unsigned __int64 v2; // x19
cocos2d::CCArray *v3; // x28
__int64 v4; // x20
__int64 v5; // x3
__int64 v6; // x25
const std::string *v7; // x1
cocos2d::CCObject *v8; // x0
void *v9; // x0
char *v10; // x0
unsigned int *v11; // x1
int v12; // w2
unsigned int *v13; // x1
int v14; // w2
char *v16; // [xsp+88h] [xbp+88h] BYREF
__int64 v17; // [xsp+90h] [xbp+90h] BYREF
v2 = 0;
v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(_stack_chk_guard);
v4 = sub_D168E0((int)a1, &byte_EEFB80, 0, 1u);
v5 = v4;
v6 = *(_QWORD *)(*a1 - 24LL);
while ( 1 )
{
sub_D14F84(&v16, a1, v2, v5);
if ( v6 != v2 || *((_QWORD *)v16 - 3) )
{
sub_D153B8((int)&v17, v16);
v8 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v17, v7);
cocos2d::CCArray::addObject(v3, v8);
v9 = (void *)(v17 - 24);
if ( (__int64 *)(v17 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v13 = (unsigned int *)(v17 - 8);
do
v14 = __ldaxr(v13);
while ( __stlxr(v14 - 1, v13) );
}
else
{
v14 = *(_DWORD *)(v17 - 8);
*(_DWORD *)(v17 - 8) = v14 - 1;
}
if ( v14 <= 0 )
break;
}
}
if ( v4 == -1 )
goto LABEL_19;
LABEL_7:
v2 = v4 + 1;
v4 = sub_D168E0((int)a1, &byte_EEFB80, (int)v4 + 1, 1u);
v10 = v16 - 24;
if ( v16 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v16 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *((_DWORD *)v16 - 2);
*((_DWORD *)v16 - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v10);
}
v5 = v4 - v2;
if ( *(_QWORD *)(*a1 - 24LL) < v2 )
sub_D13C5C(
"%s: __pos (which is %zu) > this->size() (which is %zu)",
"basic_string::substr",
v2,
*(_QWORD *)(*a1 - 24LL));
}
operator delete(v9);
if ( v4 != -1 )
goto LABEL_7;
LABEL_19:
if ( v16 - 24 != (char *)&qword_124B6B0 )
sub_74B3A8(v16 - 24);
return v3;
}