//
// EditorSoundsLayer::onBrowse from 0xcd5d68 to 0xcd5e40 (216 bytes)
//
// 3 xrefs:
// > ??> @ 0xd1b90
// > EditorSoundsLayer::init @ 0xcd7120
// > ??> @ 0x1546360
//
// 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:30 +0000
//
__int64 __fastcall EditorSoundsLayer::onBrowse(EditorSoundsLayer *this, cocos2d::CCObject *a2)
{
GameManager *v3; // x0
GameManager *v4; // x0
__int64 v5; // x0
__int64 v6; // x20
GameManager *v8; // x0
_QWORD v9[2]; // [xsp+20h] [xbp+20h] BYREF
void *v10; // [xsp+30h] [xbp+30h]
v3 = (GameManager *)GameManager::sharedState(_stack_chk_guard);
v4 = (GameManager *)(unsigned __int8)GameManager::offlineModeEnabled(v3);
if ( (_BYTE)v4 )
{
v8 = (GameManager *)GameManager::sharedState(v4);
GameManager::showParentalRestrictedAlert(v8);
}
else
{
v5 = *((_QWORD *)this + 137);
if ( v5 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v5 + 1160LL))(v5, 0);
v9[0] = 0;
v9[1] = 0;
v10 = nullptr;
v6 = EditorSoundBrowserLayer::create((char *)v9, (__int64)this);
if ( (v9[0] & 1) != 0 )
operator delete(v10);
if ( v6 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 1312LL))(v6);
}
return _stack_chk_guard;
}