//
// EditorSoundConfigInfoLayer::onLocalDelete from 0xccd58c to 0xccd700 (372 bytes)
//
// 3 xrefs:
// > ??> @ 0xfa108
// > EditorSoundConfigInfoLayer::init @ 0xcd1ad8
// > ??> @ 0x15479b0
//
// 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::onLocalDelete(EditorSoundConfigInfoLayer *this, cocos2d::CCObject *a2)
{
EditorSFXManager *v3; // x0
EditorSFXManager *v4; // x0
EditorSFXManager *v5; // x0
const char *v6; // x1
size_t v7; // x21
unsigned __int64 v8; // x0
__int64 v9; // x19
__int64 v10; // x19
const char *v12; // [xsp+38h] [xbp+38h]
_QWORD v13[2]; // [xsp+40h] [xbp+40h] BYREF
void *v14; // [xsp+50h] [xbp+50h]
v3 = *((EditorSFXManager **)this + 136);
if ( v3 )
{
if ( *((_DWORD *)this + 274) == 2 && (v3 = (EditorSFXManager *)*((unsigned int *)v3 + 80), (int)v3 > 0) )
{
v6 = "Delete this sound pack from your device?";
}
else
{
v4 = (EditorSFXManager *)EditorSFXManager::sharedState(v3);
if ( v4
&& (v5 = (EditorSFXManager *)EditorSFXManager::sharedState(v4),
EditorSFXManager::getFavoriteConfig(v5, *(_DWORD *)(*((_QWORD *)this + 136) + 316LL))) )
{
v6 = "Remove this sound pack from your Favorites?";
}
else
{
v6 = "Discard the downloaded data and close?";
}
}
v12 = v6;
v7 = strlen(v6);
v8 = (v7 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v9 = v8 | 1;
v13[1] = v7;
v14 = (void *)operator new(v8);
v13[0] = v9;
*((_BYTE *)memcpy(v14, v12, v7) + v7) = 0;
v10 = FLAlertLayer::create(
(__int64)this + 1032,
(cocos2d::CCLabelBMFont *)"Delete Sound Pack",
(char *)v13,
(ButtonSprite *)"Cancel",
(ButtonSprite *)"Delete",
380.0);
if ( (v13[0] & 1) != 0 )
operator delete(v14);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 72LL))(v10, 7004);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 1312LL))(v10);
}
return _stack_chk_guard;
}