//
// EditorSoundConfigInfoLayer::onLocalDelete from 0x140195420 to 0x1401955e0 (448 bytes)
//
// 2 xrefs:
// > EditorSoundConfigInfoLayer::init @ 0x140193d2f
// > ??> @ 0x140919400
//
// This function is hookable on this platform (idp: pc, 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 11:27:45 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall EditorSoundConfigInfoLayer::onLocalDelete(__int64 a1)
{
__int64 result; // rax
const char *v3; // rdx
int v4; // ebp
__int64 v5; // rdi
cocos2d::CCArray *v6; // rcx
unsigned int v7; // ebx
struct cocos2d::CCObject *v8; // rax
int v9; // eax
int v10; // ebx
size_t v11; // r8
__int64 v12; // rax
cocos2d::CCObject *v13; // rbx
__int128 v14; // [rsp+50h] [rbp-58h] BYREF
__int64 v15; // [rsp+60h] [rbp-48h]
__int64 v16; // [rsp+68h] [rbp-40h]
_BYTE v17[32]; // [rsp+70h] [rbp-38h] BYREF
result = *(_QWORD *)(a1 + 1072);
if ( result )
{
if ( *(_DWORD *)(a1 + 1080) == 2 && *(int *)(result + 324) > 0 )
{
v3 = "Delete this sound pack from your device?";
}
else
{
if ( EditorSFXManager::sharedState()
&& (v4 = *(_DWORD *)(*(_QWORD *)(a1 + 1072) + 320LL),
v5 = EditorSFXManager::sharedState(),
(v6 = *(cocos2d::CCArray **)(v5 + 208)) != nullptr)
&& (v7 = 0, cocos2d::CCArray::count(v6)) )
{
while ( 1 )
{
v8 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v5 + 208), v7);
if ( v8 )
{
if ( *((_DWORD *)v8 + 80) == v4 )
break;
}
if ( ++v7 >= cocos2d::CCArray::count(*(cocos2d::CCArray **)(v5 + 208)) )
goto LABEL_11;
}
v9 = 1;
}
else
{
LABEL_11:
v9 = 0;
}
v3 = "Discard the downloaded data and close?";
if ( v9 )
v3 = "Remove this sound pack from your Favorites?";
}
v10 = a1 + 1016;
if ( !a1 )
v10 = 0;
v14 = 0;
v15 = 0;
v16 = 0;
v11 = -1;
do
++v11;
while ( v3[v11] );
sub_14003D230(&v14, v3, v11);
v12 = sub_14003F4F0((__int64)v17, (__int64)&v14);
v13 = FLAlertLayer::create(
v10,
(int)&xmmword_140720410,
v12,
(__int64)"Cancel",
(__int64)"Delete",
1136525312,
0,
0,
1065353216);
sub_14003D310((__int64)&v14);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v13 + 64LL))(v13, 7004);
return (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v13 + 1064LL))(v13);
}
return result;
}