//
// EditorSoundConfigInfoLayer::onClose from 0xcccc08 to 0xcccd0c (260 bytes)
//
// 2 xrefs:
// > ??> @ 0x58bd0
// > ??> @ 0x14fedc8
//
// 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:25 +0000
//
__int64 __fastcall EditorSoundConfigInfoLayer::onClose(EditorSoundConfigInfoLayer *this, cocos2d::CCObject *a2)
{
GameLevelManager *v4; // x0
EditorSoundConfigInfoLayer *v5; // x1
GameLevelManager *v6; // x0
EditorSoundConfigInfoLayer *v7; // x1
GameLevelManager *v8; // x0
EditorSoundConfigInfoLayer *v9; // x1
cocos2d::CCArray **v10; // x0
__int64 v11; // x0
cocos2d::CCNode **v12; // x0
EditorSoundBrowserLayer *v13; // x0
v4 = (GameLevelManager *)GameLevelManager::sharedState(this);
if ( v4 )
{
v5 = *(EditorSoundConfigInfoLayer **)(GameLevelManager::sharedState(v4) + 1336);
v6 = (EditorSoundConfigInfoLayer *)((char *)this + 1016);
if ( v5 == (EditorSoundConfigInfoLayer *)((char *)this + 1016) )
{
v6 = (GameLevelManager *)GameLevelManager::sharedState(v6);
*((_QWORD *)v6 + 167) = 0;
}
v7 = *(EditorSoundConfigInfoLayer **)(GameLevelManager::sharedState(v6) + 1344);
v8 = (EditorSoundConfigInfoLayer *)((char *)this + 1024);
if ( v7 == (EditorSoundConfigInfoLayer *)((char *)this + 1024) )
{
v8 = (GameLevelManager *)GameLevelManager::sharedState(v8);
*((_QWORD *)v8 + 168) = 0;
}
v9 = *(EditorSoundConfigInfoLayer **)(GameLevelManager::sharedState(v8) + 1360);
v4 = (EditorSoundConfigInfoLayer *)((char *)this + 1064);
if ( v9 == (EditorSoundConfigInfoLayer *)((char *)this + 1064) )
{
v4 = (GameLevelManager *)GameLevelManager::sharedState(v4);
*((_QWORD *)v4 + 170) = 0;
}
}
v10 = (cocos2d::CCArray **)MusicDownloadManager::sharedState(v4);
MusicDownloadManager::removeMusicDownloadDelegate(v10, (EditorSoundConfigInfoLayer *)((char *)this + 1080));
v11 = *((_QWORD *)this + 154);
if ( v11 )
{
*(_QWORD *)(v11 + 584) = 0;
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 154) + 1160LL))(*((_QWORD *)this + 154), 0);
*((_QWORD *)this + 154) = 0;
}
v12 = *((cocos2d::CCNode ***)this + 139);
if ( v12 )
LoadingCircle::fadeAndRemove(v12);
v13 = *((EditorSoundBrowserLayer **)this + 138);
*((_QWORD *)this + 139) = 0;
if ( !v13 || (unsigned int)(*((_DWORD *)this + 274) - 1) > 1 )
return SetupTriggerPopup::onClose((GameObject **)this, a2);
EditorSoundBrowserLayer::onConfigListChanged(v13);
return SetupTriggerPopup::onClose((GameObject **)this, a2);
}