//
// SetupAreaMoveTriggerPopup::addAreaDefaultControls from 0x1405a39c0 to 0x1405a503c (5756 bytes)
//
// 7 xrefs:
// > SetupAreaMoveTriggerPopup::init @ 0x1405a38b9
// > SetupAreaTransformTriggerPopup::init @ 0x1405a5f23
// > SetupAreaRotateTriggerPopup::init @ 0x1405a6694
// > SetupAreaFadeTriggerPopup::init @ 0x1405a6df3
// > SetupAreaTintTriggerPopup::init @ 0x1405a78b2
// > SetupAreaTriggerPopup::init @ 0x1405a8488
// > ??> @ 0x14092d518
//
// 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:34:38 +0000
//
// Hidden C++ exception states: #wind=8
void __fastcall SetupAreaMoveTriggerPopup::addAreaDefaultControls(__int64 a1, int a2)
{
__int64 v3; // rax
__int64 v4; // rax
__int64 v5; // rax
__int64 v6; // rax
__int64 v7; // rdx
void *v8; // rcx
__int64 v9; // rbx
__int64 v10; // rax
void *v11; // rcx
__int64 v12; // rbx
__int64 v13; // rax
void *v14; // rcx
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rax
__int64 v18; // rax
__int64 v19; // rcx
cocos2d::CCObject *v20; // rax
__int64 v21; // rax
__int64 v22; // rcx
int v23; // esi
int v24; // r12d
cocos2d::CCArray *v25; // r15
_QWORD *v26; // rax
size_t v27; // r8
__int64 v28; // rax
__int64 v29; // rbx
__int64 v30; // rdi
float *v31; // rax
struct cocos2d::CCObject *ToggleButton; // rbx
cocos2d::CCArray *PageContainer; // rax
__int64 v34; // rax
int v35; // esi
int v36; // eax
__int64 v37; // rax
__int64 v38; // rcx
__int64 v39; // rax
int v40; // r9d
int v41; // eax
__int64 v42; // rax
int v43; // r9d
__int64 v44; // r8
cocos2d::CCObject *v45; // rax
int v46; // ebx
char v47; // r13
bool v48; // r12
__int64 v49; // rcx
cocos2d::CCArray *v50; // rbx
struct cocos2d::CCObject *v51; // rax
signed int v52; // r15d
char *v53; // rdx
void **v54; // rcx
struct cocos2d::CCSprite *v55; // rdi
int v56; // ecx
int v57; // eax
char v58; // dl
cocos2d::CCObject *v59; // rbx
__int64 v60; // r9
const char *v61; // rax
cocos2d::CCObject *v62; // rsi
__int64 v63; // rbx
float v64; // xmm6_4
float *v65; // rax
__int64 v66; // rax
float v67; // xmm0_4
__int64 v68; // rdi
__int64 v69; // rbx
__int64 v70; // rax
__int64 v71; // rax
void *v72; // rcx
__int64 v73; // [rsp+38h] [rbp-D0h]
int v74; // [rsp+38h] [rbp-D0h]
char v75[8]; // [rsp+88h] [rbp-80h] BYREF
void **v76; // [rsp+90h] [rbp-78h] BYREF
char v77[8]; // [rsp+98h] [rbp-70h] BYREF
float v78; // [rsp+A0h] [rbp-68h] BYREF
float v79; // [rsp+A4h] [rbp-64h]
cocos2d::CCArray *v80; // [rsp+A8h] [rbp-60h] BYREF
void **v81; // [rsp+B0h] [rbp-58h] BYREF
int v82; // [rsp+B8h] [rbp-50h] BYREF
char v83[8]; // [rsp+C0h] [rbp-48h] BYREF
char v84[8]; // [rsp+C8h] [rbp-40h] BYREF
char v85[8]; // [rsp+D0h] [rbp-38h] BYREF
char v86[8]; // [rsp+D8h] [rbp-30h] BYREF
char v87[8]; // [rsp+E0h] [rbp-28h] BYREF
char v88[8]; // [rsp+E8h] [rbp-20h] BYREF
void *Block[2]; // [rsp+F0h] [rbp-18h] BYREF
__int64 v90; // [rsp+100h] [rbp-8h]
unsigned __int64 v91; // [rsp+108h] [rbp+0h]
_BYTE v92[32]; // [rsp+110h] [rbp+8h] BYREF
v82 = a2;
v3 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v3, &v78);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, v78 * 0.5, (float)(v79 * 0.5) + 95.0);
v80 = (cocos2d::CCArray *)Block;
Block[1] = nullptr;
v90 = 7;
v91 = 15;
Block[0] = (void *)0x5974657366664FLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, -75.0, -0.0);
cocos2d::CCPoint::operator+(v77, v75, v4);
SetupTriggerPopup::createValueControlAdvanced(
a1,
252,
(unsigned int)Block,
(unsigned int)v75,
1059481190,
0,
2,
6,
0,
0,
1120403456,
1,
99,
1,
2,
0);
v76 = Block;
*(_OWORD *)Block = 0;
v90 = 2;
v91 = 15;
strcpy((char *)Block, "+-");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, 75.0, -0.0);
cocos2d::CCPoint::operator+(v77, v75, v5);
SetupTriggerPopup::createValueControlAdvanced(
a1,
253,
(unsigned int)Block,
(unsigned int)v75,
1059481190,
0,
2,
6,
0,
0,
1120403456,
1,
99,
1,
2,
0);
Block[1] = (void *)58;
v90 = 9;
v91 = 15;
Block[0] = (void *)0x4449746365666645LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 85.0, -50.0);
cocos2d::CCPoint::operator+(v77, v75, v6);
v7 = a1 + 544;
if ( !a1 )
v7 = 0;
IDNameInput::create(a1, v7, 5, 225, (__int64)Block, (const struct cocos2d::CCPoint *)v75, 1059481190, 6, 0, 1, 0);
if ( v91 > 0xF )
{
v8 = Block[0];
if ( v91 + 1 >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
*(_OWORD *)Block = 0;
v90 = 0;
v91 = 0;
Block[0] = sub_14003D460(0x20u);
v90 = 16;
v91 = 31;
strcpy((char *)Block[0], "Target Group ID:");
v9 = 0;
if ( a1 )
v9 = a1 + 544;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 85.0, -100.0);
cocos2d::CCPoint::operator+(v77, v75, v10);
IDNameInput::create(a1, v9, 1, 51, (__int64)Block, (const struct cocos2d::CCPoint *)v75, 1059481190, 6, 0, 1, 0);
if ( v91 > 0xF )
{
v11 = Block[0];
if ( v91 + 1 >= 0x1000 )
{
v11 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v11 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v11);
}
*(_OWORD *)Block = 0;
v90 = 0;
v91 = 0;
Block[0] = sub_14003D460(0x20u);
v90 = 16;
v91 = 31;
strcpy((char *)Block[0], "Center Group ID:");
v12 = 0;
if ( a1 )
v12 = a1 + 544;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 85.0, -150.0);
cocos2d::CCPoint::operator+(v77, v75, v13);
IDNameInput::create(a1, v12, 1, 71, (__int64)Block, (const struct cocos2d::CCPoint *)v75, 1059481190, 6, 0, 1, 0);
if ( v91 > 0xF )
{
v14 = Block[0];
if ( v91 + 1 >= 0x1000 )
{
v14 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v14 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v14);
}
v76 = Block;
v90 = 9;
v91 = 15;
Block[0] = *(void **)"Priority:";
Block[1] = (void *)(unsigned __int8)aPriority[8];
BYTE1(Block[1]) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, 85.0, -200.0);
cocos2d::CCPoint::operator+(v77, v75, v15);
SetupTriggerPopup::createValueControlAdvanced(
a1,
341,
(unsigned int)Block,
(unsigned int)v75,
1059481190,
1,
2,
6,
1,
0,
1120403456,
1,
0,
0,
2,
0);
v76 = Block;
Block[1] = nullptr;
v90 = 8;
v91 = 15;
Block[0] = (void *)0x746E6F7246646F4DLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, -75.0, -25.0);
cocos2d::CCPoint::operator+(v77, v75, v16);
SetupTriggerPopup::createValueControlAdvanced(
a1,
263,
(unsigned int)Block,
(unsigned int)v75,
1059481190,
0,
1,
6,
0,
0,
1092616192,
1,
0,
1,
2,
0);
v76 = Block;
Block[1] = nullptr;
v90 = 7;
v91 = 15;
Block[0] = (void *)0x6B636142646F4DLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, -75.0, -50.0);
cocos2d::CCPoint::operator+(v77, v75, v17);
SetupTriggerPopup::createValueControlAdvanced(
a1,
264,
(unsigned int)Block,
(unsigned int)v75,
1059481190,
0,
1,
6,
0,
0,
1092616192,
1,
0,
1,
2,
0);
v76 = Block;
Block[1] = nullptr;
v90 = 8;
v91 = 15;
Block[0] = (void *)0x656E6F7A64616544LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, -75.0, -75.0);
cocos2d::CCPoint::operator+(v77, v75, v18);
SetupTriggerPopup::createValueControlAdvanced(
a1,
282,
(unsigned int)Block,
(unsigned int)v75,
1059481190,
0,
1,
6,
0,
0,
1065353216,
1,
0,
1,
2,
0);
v20 = (cocos2d::CCObject *)cocos2d::CCArray::create(v19);
*(_QWORD *)(a1 + 1008) = v20;
cocos2d::CCObject::retain(v20);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 170.0, 40.0);
cocos2d::CCPoint::operator+(v77, v84, v21);
v23 = -1;
v24 = 1;
do
{
v25 = (cocos2d::CCArray *)cocos2d::CCArray::create(v22);
v76 = Block;
v26 = (_QWORD *)sub_1405A2820((__int64)v92, v23);
if ( v26[3] > 0xFu )
v26 = (_QWORD *)*v26;
*(_OWORD *)Block = 0;
v90 = 0;
v91 = 0;
v27 = -1;
do
++v27;
while ( *((_BYTE *)v26 + v27) );
sub_14003D230(Block, v26, v27);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v80, 0.0, (float)v24 * -23.0);
cocos2d::CCPoint::operator+(v84, v75, v28);
v29 = *(_QWORD *)(a1 + 584);
v30 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v81, 6.0, 0.0);
ToggleButton = GameToolbox::createToggleButton(
(const char *)Block,
(__int64)SetupAreaMoveTriggerPopup::onSpecialTarget,
0,
v30,
(__int64)v75,
a1,
v29,
0.60000002,
0.34999999,
110.0,
v31,
(const char *)&qword_140704F78,
0,
0,
v25);
sub_14003D310((__int64)v92);
*((_BYTE *)ToggleButton + 393) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)ToggleButton + 64LL))(
ToggleButton,
(unsigned int)v23);
PageContainer = (cocos2d::CCArray *)SetupTriggerPopup::getPageContainer(a1, 1);
cocos2d::CCArray::addObjectsFromArray(PageContainer, v25);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1008), ToggleButton);
++v24;
--v23;
}
while ( v23 > -12 );
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v85, (float)(v78 * 0.5) - 10.0, (float)(v79 * 0.5) - 80.0);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v83,
(float)((float)(v78 * 0.5) - (float)(*(float *)(a1 + 732) * 0.5)) + 20.0,
(float)((float)((float)(v79 * 0.5) - (float)(*(float *)(a1 + 736) * 0.5)) + 20.0) + 30.0);
v81 = Block;
v90 = 14;
v91 = 15;
strcpy((char *)Block, "Ignore\nGParent");
HIBYTE(Block[1]) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 90.0, 0.0);
cocos2d::CCPoint::operator+(v83, v75, v34);
v35 = 0;
SetupTriggerPopup::createToggleValueControl(a1, 280, (unsigned int)Block, (unsigned int)v75, 0, 1, 0, 1065353216);
v81 = Block;
v90 = 13;
v91 = 15;
strcpy((char *)Block, "Ignore\nLinked");
HIWORD(Block[1]) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, (const struct cocos2d::CCPoint *)v83);
SetupTriggerPopup::createToggleValueControl(a1, 281, (unsigned int)Block, v36, 0, 1, 0, 1065353216);
v81 = Block;
*(_OWORD *)Block = 0;
v90 = 5;
v91 = 15;
strcpy((char *)Block, "DE\nAP");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 180.0, 20.0);
cocos2d::CCPoint::operator+(v83, v75, v37);
SetupTriggerPopup::createToggleValueControl(a1, 539, (unsigned int)Block, (unsigned int)v75, 0, 1, 0, 1065353216);
if ( v82 == 3006 || (unsigned int)(v82 - 3007) <= 1 )
{
v81 = Block;
*(_OWORD *)Block = 0;
v90 = 6;
v91 = 15;
strcpy((char *)Block, "Easing");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, -95.0, -150.0);
cocos2d::CCPoint::operator+(v77, v75, v39);
SetupTriggerPopup::createCustomEasingControls(a1, (unsigned int)Block, (unsigned int)v75, v40, 242, 243, v73, 0);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v82,
(float)(v78 * 0.5) + 50.0,
(float)((float)(v79 * 0.5) - (float)(*(float *)(a1 + 736) * 0.5)) + 20.0);
v81 = Block;
Block[1] = nullptr;
v90 = 8;
v91 = 15;
Block[0] = (void *)0x74754F0A65736145LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, (const struct cocos2d::CCPoint *)&v82);
SetupTriggerPopup::createToggleValueControl(a1, 261, (unsigned int)Block, v41, 0, 0, 0, 1065353216);
v81 = Block;
Block[1] = nullptr;
v90 = 7;
v91 = 15;
Block[0] = (void *)0x32676E69736145LL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v76, 95.0, -150.0);
cocos2d::CCPoint::operator+(v77, v75, v42);
SetupTriggerPopup::createCustomEasingControls(a1, (unsigned int)Block, (unsigned int)v75, v43, 248, 249, v74, 9);
if ( (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 261) == 0.0 )
v44 = 0;
else
LOBYTE(v44) = 1;
(*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 1088LL))(a1, 9, v44);
}
v45 = (cocos2d::CCObject *)cocos2d::CCArray::create(v38);
*(_QWORD *)(a1 + 1000) = v45;
cocos2d::CCObject::retain(v45);
v46 = (int)(*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 262);
v82 = v46;
v47 = (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 276) != 0.0;
v48 = (*(float (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1168LL))(a1, 283) != 0.0;
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 896)) <= 1 )
{
do
{
v50 = *(cocos2d::CCArray **)(a1 + 896);
v51 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v49);
cocos2d::CCArray::addObject(v50, v51);
}
while ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 896)) <= 1 );
v46 = v82;
}
v80 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 896), 1u);
v52 = 0;
while ( 1 )
{
*(_OWORD *)Block = 0;
v90 = 0;
v91 = 15;
LOBYTE(Block[0]) = 0;
switch ( v52 )
{
case 0:
v53 = (char *)sub_14003D460(0x20u);
v90 = 26;
v91 = 31;
strcpy(v53, "edit_areaModeBtn04_001.png");
Block[0] = v53;
break;
case 1:
v53 = (char *)sub_14003D460(0x20u);
v90 = 26;
v91 = 31;
strcpy(v53, "edit_areaModeBtn05_001.png");
Block[0] = v53;
break;
case 2:
case 6:
v53 = (char *)sub_14003D460(0x20u);
v90 = 26;
v91 = 31;
strcpy(v53, "edit_areaModeBtn01_001.png");
Block[0] = v53;
break;
case 3:
case 7:
v53 = (char *)sub_14003D460(0x20u);
v90 = 26;
v91 = 31;
strcpy(v53, "edit_areaModeBtn02_001.png");
Block[0] = v53;
break;
case 4:
case 9:
v53 = (char *)sub_14003D460(0x20u);
v90 = 26;
v91 = 31;
strcpy(v53, "edit_areaModeBtn03_001.png");
Block[0] = v53;
break;
case 5:
case 8:
v53 = (char *)sub_14003D460(0x20u);
v90 = 27;
v91 = 31;
strcpy(v53, "edit_areaModeBtn03b_001.png");
Block[0] = v53;
break;
default:
v53 = (char *)Block[0];
break;
}
v54 = Block;
if ( v91 > 0xF )
v54 = (void **)v53;
v55 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v54);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v55 + 352LL))(v55);
if ( (unsigned int)(v52 - 2) <= 3 || v52 <= 1 )
{
v56 = (unsigned int)(v52 - 2) <= 3;
if ( v52 == 1 )
goto LABEL_55;
}
else
{
v56 = 2;
}
if ( (unsigned int)v52 <= 8 )
{
v57 = 424;
if ( _bittest(&v57, v52) )
{
LABEL_55:
v58 = 1;
goto LABEL_56;
}
}
v58 = 0;
LABEL_56:
if ( v46 == v56 && v47 == v58 && v48 == (((v52 - 2) & 0xFFFFFFFA) == 0) )
v35 = 1;
v81 = (void **)operator new(0x2C8u);
v59 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v81);
if ( v59 )
{
v61 = "GJ_button_04.png";
if ( v35 )
v61 = "GJ_button_02.png";
if ( ButtonSprite::init((__int64 *)v59, (__int64)v55, 32, v60, 32.0, 1065353216, v73, v61, 1, 0) )
{
cocos2d::CCObject::autorelease(v59);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v59 + 8LL))(v59, 1);
v59 = nullptr;
}
}
v76 = (void **)operator new(0x208u);
v62 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v76);
if ( v62 )
{
if ( CCMenuItemSpriteExtra::init(
(__int64 *)v62,
(__int64 *)v59,
0,
a1,
(__int64)SetupAreaMoveTriggerPopup::onMode) )
{
cocos2d::CCObject::autorelease(v62);
goto LABEL_71;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v62 + 8LL))(v62, 1);
}
v62 = nullptr;
LABEL_71:
(*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v62 + 64LL))(v62, (unsigned int)v52);
cocos2d::CCArray::addObject(v80, v62);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 1000), v62);
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v55 + 160LL))(v55);
v63 = *(_QWORD *)v55;
v64 = *(float *)((*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v62 + 320LL))(v62) + 4) * 0.5;
v65 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v62 + 320LL))(v62);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, *v65 * 0.5, v64);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v63 + 184))(v55, v66);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v62 + 160LL))(v62);
*((_DWORD *)v62 + 101) = 1056964608;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v62);
if ( v52 <= 4 )
v67 = 0.0;
else
v67 = -25.0;
v68 = *(_QWORD *)v62;
v69 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v87,
(float)((float)(v52 % 5) * 25.0)
+ (float)((float)((float)(v78 * 0.5) - (float)(*(float *)(a1 + 732) * 0.5)) + 50.0),
(float)((float)(v79 * 0.5) - 20.0) + v67);
cocos2d::CCNode::convertToNodeSpace(v69, v88, v70);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v68 + 184))(v62, v71);
if ( v91 > 0xF )
{
v72 = Block[0];
if ( v91 + 1 >= 0x1000 )
{
v72 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v72 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v72);
}
if ( ++v52 >= 10 )
break;
v46 = v82;
v35 = 0;
}
}