//
// EditorSFXManager::releaseBinding from 0xcbf4cc to 0xcbf558 (140 bytes)
//
// 4 xrefs:
// > EditorSFXManager::clearAll @ 0xcc00b8
// > EditorSFXManager::clearAction @ 0xcc3f78
// > EditorSFXManager::removeSoundAt @ 0xcc518c
// > ??> @ 0xa9978
//
// 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:16 +0000
//
void __fastcall EditorSFXManager::releaseBinding(int a1, void *a2)
{
char *v3; // x0
char *v4; // x2
if ( a2 )
{
if ( *(_QWORD *)a2 )
{
cocos2d::CCObject::release(*(cocos2d::CCObject **)a2);
*(_QWORD *)a2 = 0;
}
v3 = *((char **)a2 + 5);
if ( v3 )
{
v4 = *((char **)a2 + 6);
if ( v3 != v4 )
*((_QWORD *)a2 + 6) = &v4[4 * ~((unsigned __int64)(v4 - 4 - v3) >> 2)];
operator delete(v3);
}
if ( (*((_BYTE *)a2 + 16) & 1) != 0 )
operator delete(*((void **)a2 + 4));
operator delete(a2);
}
}