//
// sub_1002373C8 from 0x1002373c8 to 0x100237508 (320 bytes)
//
// 2 xrefs:
// > sub_100236D7C @ 0x100236ec0
// > sub_1002373C8 @ 0x10023748c
//
// 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
//
_QWORD *__fastcall sub_1002373C8(const void *a1, void *a2)
{
cocos2d::CCString *v4; // x0
NSString *v5; // x20
_QWORD *result; // x0
_QWORD *v7; // x0
_QWORD *v8; // x21
unsigned int *v9; // x9
__int64 v10; // x8
_QWORD *v11; // x21
unsigned __int64 v12; // x22
_QWORD *v13; // x21
__int64 v14; // x0
__int64 v15; // x21
v4 = (cocos2d::CCString *)__dynamic_cast(
a1,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCString,
0);
if ( v4 )
{
v5 = +[NSString stringWithCString:encoding:](
&OBJC_CLASS___NSString,
"stringWithCString:encoding:",
cocos2d::CCString::getCString(v4),
4);
return objc_msgSend(a2, "addObject:", v5);
}
v7 = __dynamic_cast(
a1,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCArray,
0);
if ( v7 )
{
v8 = v7;
v5 = (NSString *)+[NSMutableArray array](&OBJC_CLASS___NSMutableArray, "array");
v9 = (unsigned int *)v8[7];
v10 = *v9;
if ( (_DWORD)v10 )
{
v11 = *((_QWORD **)v9 + 2);
v12 = (unsigned __int64)&v11[v10 - 1];
do
{
if ( !*v11 )
break;
sub_1002373C8(*v11++, v5);
}
while ( (unsigned __int64)v11 <= v12 );
}
return objc_msgSend(a2, "addObject:", v5);
}
result = __dynamic_cast(
a1,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCDictionary,
0);
if ( result )
{
v13 = result;
v5 = (NSString *)+[NSMutableDictionary dictionary](&OBJC_CLASS___NSMutableDictionary, "dictionary");
v14 = v13[7];
if ( v14 )
{
do
{
v15 = *(_QWORD *)(v14 + 288);
sub_100236D7C(v14, *(const void **)(v14 + 264), v5);
v14 = v15;
}
while ( v15 );
}
return objc_msgSend(a2, "addObject:", v5);
}
return result;
}