//
// SetupAreaRotateTriggerPopup::init from 0x1405a5fb0 to 0x1405a6708 (1880 bytes)
//
// 2 xrefs:
// > EditorUI::editObject @ 0x1401bbf58
// > ??> @ 0x14092d5b4
//
// 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=3
char __fastcall SetupAreaRotateTriggerPopup::init(_BYTE *a1, int a2, int a3, int a4)
{
char result; // al
_QWORD *v6; // r9
_QWORD *v7; // rcx
const char *v8; // rdx
__int64 v9; // r8
__int64 v10; // rcx
__int64 v11; // rax
__int64 v12; // rax
__int64 v13; // rax
__int64 v14; // rax
__int64 v15; // rax
__int64 v16; // rax
__int64 v17; // rax
float v18[2]; // [rsp+88h] [rbp-80h] BYREF
__int128 *v19; // [rsp+90h] [rbp-78h] BYREF
__int128 *v20; // [rsp+98h] [rbp-70h] BYREF
__int128 *v21; // [rsp+A0h] [rbp-68h] BYREF
__int128 v22; // [rsp+A8h] [rbp-60h] BYREF
__int64 v23; // [rsp+B8h] [rbp-50h]
__int64 v24; // [rsp+C0h] [rbp-48h]
__int128 v25; // [rsp+C8h] [rbp-40h] BYREF
__int64 v26; // [rsp+D8h] [rbp-30h]
__int64 v27; // [rsp+E0h] [rbp-28h]
char v28; // [rsp+150h] [rbp+48h] BYREF
result = SetupTriggerPopup::init((_DWORD)a1, a2, a3, a4, 1133248512, 1, 0);
if ( result )
{
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1096LL))(a1);
v22 = 0;
*(_QWORD *)&v22 = sub_14003D460(0x20u);
v23 = 19;
v24 = 31;
strcpy((char *)v22, "Area Rotate Trigger");
SetupTriggerPopup::addTitle(a1, &v22);
v22 = 0;
v23 = 2;
v24 = 15;
strcpy((char *)&v22, "OK");
SetupTriggerPopup::addCloseButton(a1, &v22);
v19 = &v22;
v22 = 0;
v23 = 0;
v24 = 0;
v6 = sub_14003D460(0x140u);
*(_QWORD *)&v22 = v6;
v23 = 314;
v24 = 319;
v7 = v6;
v8 = "Rotates objects using Target Group ID within an area around Center Group ID. The area can be sp"
"ecified by the arrow buttons and Length (for size).\n"
"You can specify how much the objects in the area rotate depending on how close they are to the center.\n"
"Check the other pages for more settings.";
v9 = 2;
do
{
*(_OWORD *)v7 = *(_OWORD *)v8;
*((_OWORD *)v7 + 1) = *((_OWORD *)v8 + 1);
*((_OWORD *)v7 + 2) = *((_OWORD *)v8 + 2);
*((_OWORD *)v7 + 3) = *((_OWORD *)v8 + 3);
*((_OWORD *)v7 + 4) = *((_OWORD *)v8 + 4);
*((_OWORD *)v7 + 5) = *((_OWORD *)v8 + 5);
*((_OWORD *)v7 + 6) = *((_OWORD *)v8 + 6);
v7 += 16;
*((_OWORD *)v7 - 1) = *((_OWORD *)v8 + 7);
v8 += 128;
--v9;
}
while ( v9 );
*(_OWORD *)v7 = *(_OWORD *)v8;
*((_OWORD *)v7 + 1) = *((_OWORD *)v8 + 1);
*((_OWORD *)v7 + 2) = *((_OWORD *)v8 + 2);
v7[6] = *((_QWORD *)v8 + 6);
*((_WORD *)v7 + 28) = *((_WORD *)v8 + 28);
*((_BYTE *)v6 + 314) = 0;
v25 = 0;
v26 = 4;
v27 = 15;
strcpy((char *)&v25, "Help");
SetupTriggerPopup::addHelpButton(a1, &v25, &v22);
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
v11 = cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize(v11, v18);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v28, v18[0] * 0.5, (float)(v18[1] * 0.5) + 95.0);
v20 = &v22;
v22 = 0;
v23 = 6;
v24 = 15;
strcpy((char *)&v22, "Length");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, -75.0, 0.0);
cocos2d::CCPoint::operator+(&v28, &v19, v12);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
222,
(unsigned int)&v22,
(unsigned int)&v19,
1059481190,
0,
2,
6,
0,
0,
1120403456,
0,
0,
1,
2,
0);
v21 = &v25;
v25 = 0;
v26 = 2;
v27 = 15;
strcpy((char *)&v25, "+-");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, 75.0, 0.0);
cocos2d::CCPoint::operator+(&v28, &v19, v13);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
223,
(unsigned int)&v25,
(unsigned int)&v19,
1059481190,
0,
2,
6,
0,
0,
1120403456,
0,
0,
1,
2,
0);
v21 = &v22;
v22 = 0;
v23 = 6;
v24 = 15;
strcpy((char *)&v22, "Offset");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, -75.0, -25.0);
cocos2d::CCPoint::operator+(&v28, &v19, v14);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
220,
(unsigned int)&v22,
(unsigned int)&v19,
1059481190,
0,
2,
6,
0,
-1027080192,
1120403456,
0,
0,
1,
2,
0);
v21 = &v25;
v25 = 0;
v26 = 2;
v27 = 15;
strcpy((char *)&v25, "+-");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, 75.0, -25.0);
cocos2d::CCPoint::operator+(&v28, &v19, v15);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
221,
(unsigned int)&v25,
(unsigned int)&v19,
1059481190,
0,
2,
6,
0,
-1027080192,
1120403456,
0,
0,
1,
2,
0);
v21 = &v25;
v26 = 8;
v27 = 15;
v25 = 0x6E6F697461746F52uLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, -75.0, -50.0);
cocos2d::CCPoint::operator+(&v28, &v19, v16);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
270,
(unsigned int)&v25,
(unsigned int)&v19,
1059481190,
0,
1,
6,
0,
-1011613696,
1135869952,
0,
0,
1,
2,
0);
v21 = &v25;
v25 = 0;
v26 = 2;
v27 = 15;
strcpy((char *)&v25, "+-");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v20, 75.0, -50.0);
cocos2d::CCPoint::operator+(&v28, &v19, v17);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
271,
(unsigned int)&v25,
(unsigned int)&v19,
1059481190,
0,
1,
6,
0,
0,
1127481344,
0,
0,
1,
2,
0);
SetupAreaMoveTriggerPopup::addAreaDefaultControls((__int64)a1, 3007);
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1136LL))(a1);
SetupTriggerPopup::createPageButtons(a1);
SetupTriggerPopup::goToPage(a1, 0, 0);
a1[744] = 0;
return 1;
}
return result;
}