//
// EditorSoundBrowserLayer::onClose from 0xcc8e7c to 0xcc8f3c (192 bytes)
//
// 2 xrefs:
// > ??> @ 0xc65c8
// > ??> @ 0x14fdda8
//
// 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:22 +0000
//
__int64 __fastcall EditorSoundBrowserLayer::onClose(EditorSoundBrowserLayer *this, cocos2d::CCObject *a2)
{
GameLevelManager *v4; // x0
FLAlertLayer *v5; // x0
char *v6; // x1
size_t v7; // x2
__int64 v8; // x0
v4 = (GameLevelManager *)GameLevelManager::sharedState(this);
if ( v4
&& *(EditorSoundBrowserLayer **)(GameLevelManager::sharedState(v4) + 1328) == (EditorSoundBrowserLayer *)((char *)this + 1016) )
{
*(_QWORD *)(GameLevelManager::sharedState((EditorSoundBrowserLayer *)((char *)this + 1016)) + 1328) = 0;
}
v5 = *((FLAlertLayer **)this + 149);
if ( v5 )
FLAlertLayer::requestRebuild(v5);
if ( !*((_BYTE *)this + 1188) )
{
dword_154850C = *((_DWORD *)this + 262);
if ( &qword_155F230 != (__int64 *)((char *)this + 1120) )
{
if ( (*((_BYTE *)this + 1120) & 1) != 0 )
{
v6 = *((char **)this + 142);
v7 = *((_QWORD *)this + 141);
}
else
{
v6 = (char *)this + 1121;
v7 = *((_BYTE *)this + 1120) >> 1;
}
std::string::assign(&qword_155F230, v6, v7);
}
}
v8 = *((_QWORD *)this + 132);
if ( v8 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 536LL))(v8);
*((_QWORD *)this + 132) = 0;
}
return SetupTriggerPopup::onClose((GameObject **)this, a2);
}