//
// EditorSFXActionConfigLayer::onEditSound from 0x140184b30 to 0x140184bc7 (151 bytes)
//
// 2 xrefs:
// > EditorSFXActionConfigLayer::refreshRows @ 0x14018453b
// > ??> @ 0x140918d64
//
// 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:38 +0000
//
int __fastcall EditorSFXActionConfigLayer::onEditSound(__int64 a1, __int64 a2)
{
int v3; // eax
signed int v4; // edi
__int64 v5; // rax
cocos2d::CCArray **Binding; // rax
cocos2d::CCArray *v7; // rbx
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);
LODWORD(a1) = *(_DWORD *)(a1 + 1008);
v4 = (v3 - 1000) / 8;
v5 = EditorSFXManager::sharedState();
Binding = (cocos2d::CCArray **)EditorSFXManager::findBinding(v5, (unsigned int)a1);
if ( Binding )
{
v7 = *Binding;
if ( *Binding )
{
if ( v4 >= 0 )
{
LODWORD(Binding) = cocos2d::CCArray::count(*Binding);
if ( v4 < (int)Binding )
{
Binding = (cocos2d::CCArray **)cocos2d::CCArray::objectAtIndex(v7, v4);
if ( Binding )
{
Binding = (cocos2d::CCArray **)SetupSFXPopup::create(Binding, 0, 1);
if ( Binding )
LODWORD(Binding) = (*((__int64 (__fastcall **)(cocos2d::CCArray **))*Binding + 133))(Binding);
}
}
}
}
}
return (int)Binding;
}