//
// SetupSFXPopup::onPlusButton from 0x140448e00 to 0x140449210 (1040 bytes)
//
// 2 xrefs:
// > ??> @ 0x1405ef7a8
// > ??> @ 0x1406da6c4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=5
void SetupSFXPopup::onPlusButton(SetupSFXPopup *a1, cocos2d::CCObject *a2)
{
int v3; // eax
__int64 v4; // r8
int v5; // eax
cocos2d::CCArray *m_gameObjects; // rbx
SFXTriggerGameObject *m_gameObject; // rdi
SetupReverbPopup *v8; // rsi
void (__fastcall *show)(SetupTriggerPopup *__hidden); // rdx
__int64 v10; // r8
__int64 v11; // rax
__int64 v12; // rsi
unsigned __int8 *v13; // rdi
unsigned __int8 *k; // rbx
__int64 v15; // rax
unsigned int *v16; // rbx
__int64 v17; // rax
__int64 *v18; // rbx
__int64 *m; // rdi
__int64 v20; // rax
int v21; // ecx
int v22; // ebx
int v23; // edx
__int64 v24; // r8
__int64 v25; // rax
__int64 v26; // rsi
unsigned __int8 *v27; // rdi
unsigned __int8 *i; // rbx
__int64 v29; // rax
unsigned int *v30; // rbx
__int64 v31; // rax
__int64 *v32; // rbx
__int64 *j; // rdi
__int64 v34; // rcx
int v35; // eax
_BYTE v36[16]; // [rsp+20h] [rbp-49h] BYREF
__int64 v37; // [rsp+30h] [rbp-39h] BYREF
void *v38[2]; // [rsp+38h] [rbp-31h] BYREF
_BYTE v39[40]; // [rsp+48h] [rbp-21h] BYREF
char v40[8]; // [rsp+70h] [rbp+7h] BYREF
void *v41[2]; // [rsp+78h] [rbp+Fh] BYREF
_BYTE v42[40]; // [rsp+88h] [rbp+1Fh] BYREF
SetupReverbPopup *v43; // [rsp+D8h] [rbp+6Fh] BYREF
v3 = a2->getTag(a2);
if ( !v3 )
{
LODWORD(v43) = 0;
sub_14005E660((__int64)v40, &v43, v4);
v25 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v43 = (SetupReverbPopup *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v43);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v25 = qword_1406C2ED8;
}
v26 = *(_QWORD *)(v25 + 528);
LODWORD(v43) = 0;
sub_14005E660((__int64)&v37, &v43, v24);
v27 = (unsigned __int8 *)v41[0];
for ( i = *(unsigned __int8 **)v41[0]; i != v27; i = *(unsigned __int8 **)i )
sub_140060D70((__int64)&v37, (__int64)v36, i + 16);
v29 = *(_QWORD *)(v26 + 3512);
if ( v29 )
{
v30 = *(unsigned int **)(v29 + 56);
v31 = *v30;
if ( (_DWORD)v31 )
{
v32 = *((__int64 **)v30 + 2);
for ( j = &v32[v31 - 1]; v32 <= j; ++v32 )
{
v34 = *v32;
if ( !*v32 )
break;
if ( *(_DWORD *)(v34 + 1036) == 3602 )
{
if ( *(_BYTE *)(v34 + 1929) )
{
v35 = *(_DWORD *)(v34 + 1932);
if ( v35 <= 0 )
v35 = -*(_DWORD *)(v34 + 924);
LODWORD(v43) = v35;
if ( v35 > 0 )
sub_140060D70((__int64)&v37, (__int64)v36, (unsigned __int8 *)&v43);
}
else
{
LODWORD(v43) = 0;
}
}
}
}
}
v22 = sub_1402D1460(1, 1000, &v37);
sub_14005D100((__int64)v39);
sub_14005D870(v38);
sub_14005D100((__int64)v42);
sub_14005D870(v41);
v23 = 416;
goto LABEL_41;
}
v5 = v3 - 1;
if ( !v5 )
{
LODWORD(v43) = 0;
sub_14005E660((__int64)v40, &v43, v4);
v11 = qword_1406C2ED8;
if ( !qword_1406C2ED8 )
{
v43 = (SetupReverbPopup *)operator new(0x668u);
qword_1406C2ED8 = sub_14017AB00((__int64)v43);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);
v11 = qword_1406C2ED8;
}
v12 = *(_QWORD *)(v11 + 528);
LODWORD(v43) = 0;
sub_14005E660((__int64)&v37, &v43, v10);
v13 = (unsigned __int8 *)v41[0];
for ( k = *(unsigned __int8 **)v41[0]; k != v13; k = *(unsigned __int8 **)k )
sub_140060D70((__int64)&v37, (__int64)v36, k + 16);
v15 = *(_QWORD *)(v12 + 3512);
if ( v15 )
{
v16 = *(unsigned int **)(v15 + 56);
v17 = *v16;
if ( (_DWORD)v17 )
{
v18 = *((__int64 **)v16 + 2);
for ( m = &v18[v17 - 1]; v18 <= m; ++v18 )
{
v20 = *v18;
if ( !*v18 )
break;
v21 = *(_DWORD *)(v20 + 1036);
if ( (v21 == 3602 || v21 == 3603) && *(int *)(v20 + 1972) > 0 )
sub_140060D70((__int64)&v37, (__int64)v36, (unsigned __int8 *)(v20 + 1972));
}
}
}
v22 = sub_1402D1460(1, 1000, &v37);
sub_14005D100((__int64)v39);
sub_14005D870(v38);
sub_14005D100((__int64)v42);
sub_14005D870(v41);
v23 = 455;
LABEL_41:
SetupTriggerPopup::updateValue(a1, v23, (float)v22);
return;
}
if ( v5 == 1 )
{
m_gameObjects = a1->m_gameObjects;
m_gameObject = (SFXTriggerGameObject *)a1->m_gameObject;
v8 = (SetupReverbPopup *)operator new(0x3B0u);
v43 = v8;
SetupTriggerPopup::SetupTriggerPopup(v8);
v8->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (SetupReverbPopup_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::TextInputDelegate::__vftable = (TextInputDelegate_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::ConfigureValuePopupDelegate::__vftable = (ConfigureValuePopupDelegate_vtbl *)&SetupReverbPopup::`vftable';
v8->SetupTriggerPopup::SliderDelegate::__vftable = (SliderDelegate_vtbl *)&SetupReverbPopup::`vftable';
if ( SetupReverbPopup::init(v8, m_gameObject, m_gameObjects) )
{
cocos2d::CCObject::autorelease(v8);
}
else
{
((void (__fastcall *)(SetupReverbPopup *, __int64))v8->~SetupReverbPopup)(v8, 1);
v8 = nullptr;
}
show = v8->show;
if ( (char *)show == (char *)CollisionBlockPopup::show )
CollisionBlockPopup::show((__int64)v8);
else
show(v8);
}
}