//
// EditorSFXManager::addFavoriteConfig from 0xcbfbd8 to 0xcbfc84 (172 bytes)
//
// 2 xrefs:
// > EditorSoundConfigInfoLayer::onFavorite @ 0xccdff4
// > ??> @ 0xce8a8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:06:16 +0000
//
__int64 __fastcall EditorSFXManager::addFavoriteConfig(__int64 this, GJEditorSoundConfig *a2)
{
__int64 v2; // x20
cocos2d::CCArray *v3; // x0
unsigned int i; // w19
__int64 v6; // x0
cocos2d::CCObject *v7; // x0
if ( a2 )
{
v2 = this;
v3 = *(cocos2d::CCArray **)(this + 144);
if ( !v3 )
{
v7 = (cocos2d::CCObject *)cocos2d::CCArray::create(nullptr);
*(_QWORD *)(v2 + 144) = v7;
cocos2d::CCObject::retain(v7);
v3 = *(cocos2d::CCArray **)(v2 + 144);
}
for ( i = 0; i < (unsigned int)cocos2d::CCArray::count(v3); ++i )
{
v6 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v2 + 144), i);
if ( v6 && *(_DWORD *)(v6 + 316) == *((_DWORD *)a2 + 79) )
{
cocos2d::CCArray::removeObjectAtIndex(*(cocos2d::CCArray **)(v2 + 144), i, 1);
return cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v2 + 144), a2);
}
v3 = *(cocos2d::CCArray **)(v2 + 144);
}
return cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v2 + 144), a2);
}
return this;
}