//
// EditorPauseLayer::onDownloadAudio from 0x8b6470 to 0x8b657c (268 bytes)
//
// 3 xrefs:
// > ??> @ 0xf1960
// > EditorPauseLayer::customSetup @ 0x8b5a74
// > ??> @ 0x15474e8
//
// 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 12:56:25 +0000
//
__int64 __fastcall EditorPauseLayer::onDownloadAudio(EditorPauseLayer *this, cocos2d::CCObject *a2)
{
LevelEditorLayer *v3; // x0
__int64 v4; // x20
__int64 v5; // x0
bool v7; // [xsp+47h] [xbp+47h] BYREF
__int64 v8[3]; // [xsp+48h] [xbp+48h] BYREF
__int64 v9[3]; // [xsp+60h] [xbp+60h] BYREF
v3 = *((LevelEditorLayer **)this + 72);
v4 = *((_QWORD *)v3 + 242);
if ( v4 )
{
v7 = 0;
LevelEditorLayer::getSongIDs(v3, &v7, v8);
LevelEditorLayer::getSFXIDs(*((LevelEditorLayer **)this + 72), v9);
v5 = AudioAssetsPopup::create(*(unsigned int *)(v4 + 608), *(unsigned int *)(v4 + 604), v8, v9);
if ( v5 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 1312LL))(v5);
if ( (v9[0] & 1) != 0 )
{
operator delete((void *)v9[2]);
if ( (v8[0] & 1) == 0 )
return _stack_chk_guard;
}
else if ( (v8[0] & 1) == 0 )
{
return _stack_chk_guard;
}
operator delete((void *)v8[2]);
}
return _stack_chk_guard;
}