//
// EditorSoundConfigInfoLayer::deleteEditorSoundFinished from 0x140198f30 to 0x140199154 (548 bytes)
//
// 2 xrefs:
// > ??> @ 0x14074e098
// > ??> @ 0x14091961c
//
// 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:46 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall EditorSoundConfigInfoLayer::deleteEditorSoundFinished(__int64 a1, int a2)
{
__int64 result; // rax
__int64 v5; // rax
struct cocos2d::CCObject *MyConfigForSoundID; // rax
struct cocos2d::CCObject *v7; // rcx
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // rcx
__int64 v11; // rax
cocos2d::CCTouchDispatcher *v12; // rax
__int64 v13; // rcx
__int64 v14; // rax
cocos2d::CCObject *v15; // rbx
_BYTE v16[32]; // [rsp+50h] [rbp-78h] BYREF
__int128 v17; // [rsp+70h] [rbp-58h] BYREF
__int64 v18; // [rsp+80h] [rbp-48h]
__int64 v19; // [rsp+88h] [rbp-40h]
result = *(_QWORD *)(a1 + 64);
if ( !result || a2 == *(_DWORD *)(result + 320) )
{
v5 = EditorSFXManager::sharedState();
MyConfigForSoundID = EditorSFXManager::getMyConfigForSoundID(v5, a2);
v7 = MyConfigForSoundID;
if ( MyConfigForSoundID )
{
*((_DWORD *)MyConfigForSoundID + 80) = 0;
*((_QWORD *)MyConfigForSoundID + 46) = 0;
*((_DWORD *)MyConfigForSoundID + 84) = 0;
*(_QWORD *)((char *)MyConfigForSoundID + 348) = 0;
*((_BYTE *)MyConfigForSoundID + 376) = 0;
*((_DWORD *)MyConfigForSoundID + 91) = 0;
*((_BYTE *)MyConfigForSoundID + 545) = 0;
}
v8 = *(_QWORD *)(a1 + 64);
if ( v8 && (struct cocos2d::CCObject *)v8 != v7 && *(_BYTE *)(v8 + 328) )
{
*(_DWORD *)(v8 + 320) = 0;
*(_QWORD *)(v8 + 368) = 0;
*(_DWORD *)(v8 + 336) = 0;
*(_QWORD *)(v8 + 348) = 0;
*(_BYTE *)(v8 + 376) = 0;
*(_DWORD *)(v8 + 364) = 0;
*(_BYTE *)(v8 + 545) = 0;
}
v9 = EditorSFXManager::sharedState();
EditorSFXManager::removeFavoriteConfig(v9, a2);
v11 = cocos2d::CCDirector::sharedDirector(v10);
v12 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 144LL))(v11);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v12, (struct cocos2d::CCObject *)(a1 - 1008));
v13 = *(_QWORD *)(a1 + 80);
if ( v13 )
cocos2d::CCNode::scheduleOnce(v13, FLAlertLayer::rebuildContentDeferred);
v17 = 0;
*(_QWORD *)&v17 = sub_14003D460(0x30u);
v18 = 35;
v19 = 47;
strcpy((char *)v17, "Sound pack removed from the server.");
v14 = sub_14003F4F0((__int64)v16, (__int64)&v17);
v15 = FLAlertLayer::create(0, (int)"Deleted", v14, (__int64)"OK", 0, 1132068864, 0, 0, 1065353216);
sub_14003D310((__int64)&v17);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v15 + 1064LL))(v15);
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 - 1008) + 1104LL))(a1 - 1008, 0);
}
return result;
}