//
// SetupAudioTriggerPopup::addProxVolControls from 0x1004afd70 to 0x1004b05ba (2122 bytes)
//
// 2 xrefs:
// > SetupSFXPopup::init @ 0x1004b27bb
// > SetupSFXEditPopup::init @ 0x1004b4ada
//
// 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 12:30:59 +0000
//
__int64 __fastcall SetupAudioTriggerPopup::addProxVolControls(void *a1, unsigned int a2)
{
__int64 v2; // rbx
__int64 v3; // rax
__int64 v4; // rax
std::string::pointer v5; // rdi
unsigned int v6; // r15d
const std::string::value_type *v7; // rsi
const std::string::value_type *v8; // rax
__int64 result; // rax
__m128 v10; // xmm0
int v11; // eax
__int64 v12; // xmm0_8
std::string::pointer data; // rdi
char *v14; // r13
const char *v15; // r8
char *v16; // rax
char *v17; // r12
__int64 v18; // rax
int v19; // ecx
__int64 v20; // r13
__m128 v21; // xmm0
__int64 PageContainer; // [rsp+38h] [rbp-158h]
__int128 v23; // [rsp+40h] [rbp-150h] BYREF
void *v24; // [rsp+50h] [rbp-140h]
std::string v25; // [rsp+58h] [rbp-138h] BYREF
std::string v26; // [rsp+70h] [rbp-120h] BYREF
__int128 v27; // [rsp+88h] [rbp-108h] BYREF
void *v28; // [rsp+98h] [rbp-F8h]
__int128 v29; // [rsp+A0h] [rbp-F0h] BYREF
void *v30; // [rsp+B0h] [rbp-E0h]
unsigned __int64 v31; // [rsp+B8h] [rbp-D8h] BYREF
std::string v32; // [rsp+C0h] [rbp-D0h] BYREF
std::string v33; // [rsp+D8h] [rbp-B8h] BYREF
std::string v34; // [rsp+F0h] [rbp-A0h] BYREF
std::string v35; // [rsp+108h] [rbp-88h] BYREF
int v36; // [rsp+120h] [rbp-70h]
unsigned __int64 v37; // [rsp+124h] [rbp-6Ch] BYREF
__int64 v38; // [rsp+12Ch] [rbp-64h] BYREF
unsigned __int64 v39; // [rsp+134h] [rbp-5Ch] BYREF
float v40; // [rsp+13Ch] [rbp-54h]
std::string v41; // [rsp+140h] [rbp-50h] BYREF
unsigned __int64 v42[6]; // [rsp+160h] [rbp-30h] BYREF
v2 = (__int64)a1;
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v38, v3);
sub_100278250((float *)&v31, *(float *)&v38 * 0.5, *((float *)&v38 + 1) * 0.5);
sub_100278250((float *)&v39, *(float *)&v38 * 0.5, (float)(*((float *)&v38 + 1) * 0.5) + 42.0);
v41.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)22;
strcpy(v41.__r_.__value_.__s.__data_, "Group ID 1:");
sub_100278250((float *)&v37, -80.0, 80.0);
sub_100278350((double *)v42, &v31, &v37);
IDNameInput::create(v2, v2 + 544, 1, 51, (unsigned int)&v41, (unsigned int)v42, 6, 0, a2, 0);
if ( (*(_BYTE *)&v41.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v41.__r_.__value_.__l.__data_);
v41.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)22;
strcpy(v41.__r_.__value_.__s.__data_, "Group ID 2:");
sub_100278250((float *)&v37, 80.0, 80.0);
sub_100278350((double *)v42, &v31, &v37);
IDNameInput::create((_DWORD)a1, (_DWORD)a1 + 544, 1, 71, (unsigned int)&v41, (unsigned int)v42, 6, 9, a2, 0);
if ( (*(_BYTE *)&v41.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v41.__r_.__value_.__l.__data_);
v25.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)16;
strcpy(v25.__r_.__value_.__s.__data_, "VolNear:");
sub_100278250((float *)v42, -91.0, -0.0);
sub_100278350((double *)&v41, &v39, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
421,
&v25,
(__int64)&v41,
0,
1u,
0.64999998,
0.0,
1.0,
6u,
0,
a2,
0,
1u,
2u,
0);
if ( (*(_BYTE *)&v25.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v25.__r_.__value_.__l.__data_);
v26.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)16;
strcpy(v26.__r_.__value_.__s.__data_, "MinDist:");
sub_100278250((float *)v42, 91.0, -0.0);
sub_100278350((double *)&v41, &v39, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
424,
&v26,
(__int64)&v41,
0,
2u,
0.64999998,
0.0,
100.0,
6u,
0,
a2,
0,
1u,
0,
0);
if ( (*(_BYTE *)&v26.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v26.__r_.__value_.__l.__data_);
v32.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)14;
strcpy(v32.__r_.__value_.__s.__data_, "VolMed:");
sub_100278250((float *)v42, -91.0, -30.0);
sub_100278350((double *)&v41, &v39, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
422,
&v32,
(__int64)&v41,
0,
1u,
0.64999998,
0.0,
1.0,
6u,
0,
a2,
0,
1u,
2u,
0);
if ( (*(_BYTE *)&v32.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v32.__r_.__value_.__l.__data_);
v33.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)12;
strcpy(v33.__r_.__value_.__s.__data_, "Dist2:");
sub_100278250((float *)v42, 91.0, -30.0);
sub_100278350((double *)&v41, &v39, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
425,
&v33,
(__int64)&v41,
0,
2u,
0.64999998,
0.0,
100.0,
6u,
0,
a2,
0,
1u,
0,
0);
if ( (*(_BYTE *)&v33.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v33.__r_.__value_.__l.__data_);
v34.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)14;
strcpy(v34.__r_.__value_.__s.__data_, "VolFar:");
sub_100278250((float *)v42, -91.0, -60.0);
sub_100278350((double *)&v41, &v39, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
423,
&v34,
(__int64)&v41,
0,
1u,
0.64999998,
0.0,
1.0,
6u,
0,
a2,
0,
1u,
2u,
0);
if ( (*(_BYTE *)&v34.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v34.__r_.__value_.__l.__data_);
v35.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)12;
strcpy(v35.__r_.__value_.__s.__data_, "Dist3:");
sub_100278250((float *)v42, 91.0, -60.0);
sub_100278350((double *)&v41, &v39, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
426,
&v35,
(__int64)&v41,
0,
2u,
0.64999998,
0.0,
100.0,
6u,
0,
a2,
0,
1u,
0,
0);
if ( (*(_BYTE *)&v35.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v35.__r_.__value_.__l.__data_);
LOBYTE(v27) = 4;
strcpy((char *)&v27 + 1, "P1");
sub_100278250((float *)v42, -170.0, -95.0);
sub_100278350((double *)&v41, &v39, v42);
SetupTriggerPopup::createToggleValueControl((int)a1, 138, &v27, (__int64)&v41, 0, a2, 1.0, 0);
if ( (v27 & 1) != 0 )
operator delete(v28);
LOBYTE(v29) = 4;
strcpy((char *)&v29 + 1, "P2");
sub_100278250((float *)v42, -110.0, -95.0);
sub_100278350((double *)&v41, &v39, v42);
SetupTriggerPopup::createToggleValueControl((int)a1, 200, &v29, (__int64)&v41, 0, a2, 1.0, 0);
if ( (v29 & 1) != 0 )
operator delete(v30);
LOBYTE(v23) = 6;
*(_DWORD *)((char *)&v23 + 1) = 7168323;
sub_100278250((float *)v42, -50.0, -95.0);
sub_100278350((double *)&v41, &v39, v42);
SetupTriggerPopup::createToggleValueControl((int)a1, 428, &v23, (__int64)&v41, 0, a2, 1.0, 0);
if ( (v23 & 1) != 0 )
{
a1 = v24;
operator delete(v24);
}
v4 = sub_1007FE900(a1);
*(_QWORD *)(v2 + 1016) = v4;
cocos2d::CCObject::retain(v4);
v36 = (int)(*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1464LL))(v2, 458);
v5 = (std::string::pointer)v2;
PageContainer = SetupTriggerPopup::getPageContainer(v2, a2);
v6 = 0;
memset(&v41, 0, sizeof(v41));
v7 = "edit_areaModeBtn01_001.png";
v8 = "edit_areaModeBtn01_001.png";
switch ( (unsigned __int64)"edit_areaModeBtn01_001.png" )
{
case 0uLL:
LABEL_29:
v7 = "edit_areaModeBtn04_001.png";
goto LABEL_32;
case 1uLL:
goto LABEL_32;
case 2uLL:
LABEL_30:
v12 = 1127481344;
v40 = 180.0;
std::string::assign(&v41, "edit_areaModeBtn03_001.png");
goto LABEL_33;
case 3uLL:
LABEL_31:
v7 = "edit_areaModeBtn03_001.png";
LABEL_32:
v12 = 0;
v40 = 0.0;
std::string::assign(&v41, v7);
goto LABEL_33;
case 4uLL:
goto LABEL_44;
case 5uLL:
LABEL_43:
v8 = "edit_areaModeBtn03_001.png";
LABEL_44:
v12 = 1119092736;
v40 = 90.0;
std::string::assign(&v41, v8);
LABEL_33:
data = v41.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v41.__r_.__value_.__s.0 & 1) != 0 )
goto LABEL_34;
goto LABEL_35;
case 6uLL:
while ( 2 )
{
std::string::assign(&v41, "edit_areaModeBtn03_001.png");
v12 = 3266576384LL;
v40 = -90.0;
data = v41.__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v41.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_35;
LABEL_34:
data = v41.__r_.__value_.__l.__data_;
LABEL_35:
v14 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)data, *(double *)&v12);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v14 + 360LL))(v14, v40);
v15 = "GJ_button_04.png";
if ( v36 == v6 )
v15 = "GJ_button_02.png";
v16 = ButtonSprite::create((int)v14, 32, 0, 1u, (int)v15, 1, 32.0, 1.0, 0.0);
v17 = (char *)CCMenuItemSpriteExtra::create((__int64)v16, 0, v2, (__int64)SetupAudioTriggerPopup::onProxMode, 0);
(*(void (__fastcall **)(char *, _QWORD))(*(_QWORD *)v17 + 72LL))(v17, v6);
sub_1007FEBF0(PageContainer, v17);
sub_1007FEBF0(*(_QWORD *)(v2 + 1016), v17);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v14 + 160LL))(v14, 1.8);
v40 = *(float *)(*(__int64 (__fastcall **)(char *))(*(_QWORD *)v17 + 328LL))(v17);
v18 = (*(__int64 (__fastcall **)(char *))(*(_QWORD *)v17 + 328LL))(v17);
sub_100278250((float *)v42, v40 * 0.5, *(float *)(v18 + 4) * 0.5);
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v14 + 184LL))(v14, v42);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v17 + 160LL))(v17, 0.60000002);
*((_DWORD *)v17 + 101) = 1058642330;
(*(void (__fastcall **)(_QWORD, char *))(**(_QWORD **)(v2 + 552) + 456LL))(*(_QWORD *)(v2 + 552), v17);
v19 = -30;
if ( v6 < 4 )
v19 = 0;
v20 = *(_QWORD *)(v2 + 552);
v21 = (__m128)(unsigned int)v38;
sub_100278250(
(float *)&v37,
(float)((float)(*(float *)&v38 * 0.5) + 60.0) + (float)((float)(v6 & 3) * 30.000002),
(float)((float)(*((float *)&v38 + 1) * 0.5) + -54.0) + (float)v19);
cocos2d::CCNode::convertToNodeSpace((double *)v42, v20, (unsigned int *)&v37);
v5 = v17;
(*(void (__fastcall **)(char *, unsigned __int64 *))(*(_QWORD *)v17 + 184LL))(v17, v42);
if ( (*(_BYTE *)&v41.__r_.__value_.__s.0 & 1) != 0 )
{
v5 = v41.__r_.__value_.__l.__data_;
operator delete(v41.__r_.__value_.__l.__data_);
}
if ( ++v6 != 7 )
{
memset(&v41, 0, sizeof(v41));
v8 = "edit_areaModeBtn01_001.png";
v7 = "edit_areaModeBtn01_001.png";
switch ( (unsigned __int64)"edit_areaModeBtn01_001.png" )
{
case 0uLL:
goto LABEL_29;
case 1uLL:
goto LABEL_32;
case 2uLL:
goto LABEL_30;
case 3uLL:
goto LABEL_31;
case 4uLL:
goto LABEL_44;
case 5uLL:
goto LABEL_43;
case 6uLL:
continue;
case 7uLL:
goto LABEL_47;
}
}
break;
}
*(double *)v21.i64 = (*(double (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1464LL))(v2, 428);
(*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)v2 + 1352LL))(
v2,
428,
_mm_cvtsi128_si32((__m128i)_mm_cmpneq_ss(v21, (__m128)0LL)) & 1);
if ( (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1464LL))(v2, 138) == 0.0
&& (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1464LL))(v2, 200) == 0.0 )
{
v10.f32[0] = (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)v2 + 1464LL))(v2, 428);
v11 = _mm_cvtsi128_si32((__m128i)_mm_cmpeq_ss((__m128)0LL, v10)) & 1;
}
else
{
LOBYTE(v11) = 0;
}
result = (*(__int64 (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)v2 + 1352LL))(
v2,
9,
(unsigned __int8)v11);
break;
case 7uLL:
LABEL_47:
result = cocos2d::CCParticleSystem::getStartRadius(v5, "edit_areaModeBtn01_001.png");
break;
}
return result;
}