//
// EditGameObjectPopup::init from 0x1403a5100 to 0x1403a533a (570 bytes)
//
// 2 xrefs:
// > EditorUI::editObjectSpecial @ 0x1401bd97b
// > ??> @ 0x140923738
//
// 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:31:18 +0000
//
// Hidden C++ exception states: #wind=2
char __fastcall EditGameObjectPopup::init(_BYTE *a1, int a2, int a3, int a4)
{
char v4; // di
char result; // al
__int64 v7; // rcx
__int64 v8; // rax
int v9; // eax
int v10; // eax
float v11[2]; // [rsp+40h] [rbp-40h] BYREF
_BYTE v12[8]; // [rsp+48h] [rbp-38h] BYREF
__int128 *v13; // [rsp+50h] [rbp-30h] BYREF
__int128 *v14; // [rsp+58h] [rbp-28h] BYREF
__int128 v15; // [rsp+60h] [rbp-20h] BYREF
__int64 v16; // [rsp+70h] [rbp-10h]
__int64 v17; // [rsp+78h] [rbp-8h]
v4 = a4;
result = SetupTriggerPopup::init((_DWORD)a1, a2, a3, a4, 1124859904, 1, 0);
if ( result )
{
a1[744] = 1;
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1096LL))(a1);
v16 = 12;
v17 = 15;
strcpy((char *)&v15, "Setup Object");
BYTE13(v15) = 0;
HIWORD(v15) = 0;
SetupTriggerPopup::addTitle(a1, &v15);
v15 = 0;
v16 = 2;
v17 = 15;
strcpy((char *)&v15, "OK");
SetupTriggerPopup::addCloseButton(a1, &v15);
v8 = cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(v8, v11);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v12, (float)(v11[0] * 0.5) - 50.0, v11[1] * 0.5);
if ( v4 )
{
v13 = &v15;
v15 = 0;
v16 = 0;
v17 = 0;
*(_QWORD *)&v15 = sub_14003D460(0x20u);
v16 = 17;
v17 = 31;
strcpy((char *)v15, "NO Multi\nActivate");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v14, (const struct cocos2d::CCPoint *)v12);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 444, (unsigned int)&v15, v9, 0, 0, 0, 1065353216);
}
else
{
v14 = &v15;
v16 = 14;
v17 = 15;
strcpy((char *)&v15, "Multi\nActivate");
HIBYTE(v15) = 0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13, (const struct cocos2d::CCPoint *)v12);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 99, (unsigned int)&v15, v10, 0, 0, 0, 1065353216);
}
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1136LL))(a1);
a1[744] = 0;
return 1;
}
return result;
}