//
// sub_1003BDEC0 from 0x1003bdec0 to 0x1003be8f6 (2614 bytes)
//
// 1 xrefs:
// > sub_1003BDDA0 @ 0x1003bde79
//
// 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:29:31 +0000
//
__int64 __fastcall sub_1003BDEC0(__int64 a1, __int64 a2, __int64 a3)
{
__int64 result; // rax
__int64 v4; // rax
__int64 v5; // r14
char *v6; // rax
void *v7; // rax
int v8; // ebx
char v9; // al
unsigned __int64 v10; // r14
__int64 v11; // rax
const std::string::value_type *CString; // rax
int v13; // ebx
char v14; // al
unsigned __int64 v15; // r14
__int64 v16; // rax
const std::string::value_type *v17; // rax
int v18; // ebx
char v19; // al
unsigned __int64 v20; // r14
__int64 v21; // rax
const std::string::value_type *v22; // rax
const char *data; // rbx
size_t v24; // rax
size_t v25; // r14
char *v26; // r15
size_t v27; // r12
__int64 v28; // rbx
__int64 v29; // r14
float v30; // xmm0_4
__int64 v31; // rax
__int64 v32; // r14
__int64 v33; // r14
__int64 v34; // r15
__int64 v35; // rbx
__int64 v36; // rax
__int64 v37; // rbx
__int64 v38; // rbx
void *v39; // rax
__int64 v40; // rdi
__int64 v41; // rdi
char *v42; // rbx
void *v43; // rbx
char *v44; // rbx
void *v45; // rbx
char v46; // [rsp+0h] [rbp-F0h]
char v47; // [rsp+20h] [rbp-D0h] BYREF
char v48[15]; // [rsp+21h] [rbp-CFh] BYREF
void *v49; // [rsp+30h] [rbp-C0h]
std::string v50; // [rsp+38h] [rbp-B8h] BYREF
__int64 v51; // [rsp+50h] [rbp-A0h]
_QWORD __dst[2]; // [rsp+58h] [rbp-98h] BYREF
void *v53; // [rsp+68h] [rbp-88h]
unsigned __int64 v54; // [rsp+70h] [rbp-80h] BYREF
std::string v55; // [rsp+78h] [rbp-78h] BYREF
unsigned __int64 v56; // [rsp+94h] [rbp-5Ch] BYREF
float v57; // [rsp+9Ch] [rbp-54h] BYREF
float v58; // [rsp+A0h] [rbp-50h]
unsigned __int64 v59; // [rsp+A4h] [rbp-4Ch] BYREF
unsigned __int8 v60; // [rsp+AFh] [rbp-41h]
unsigned __int64 v61[2]; // [rsp+B0h] [rbp-40h] BYREF
void *__p; // [rsp+C0h] [rbp-30h]
result = SetupTriggerPopup::init(a1, a2, a3, 1, 300.0, 240.0, 0.0);
if ( !(_BYTE)result )
return result;
v60 = result;
(*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 1360LL))(a1);
v4 = cocos2d::CCDirector::sharedDirector(a1, a2);
cocos2d::CCDirector::getWinSize(&v57, v4);
v5 = cocos2d::CCLabelBMFont::create_3("Setup Animation", "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v5);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v5 + 160LL))(v5, 0.69999999);
sub_100278250((float *)&v55, v57 * 0.5, (float)((float)(*(float *)(a1 + 736) * 0.5) + (float)(v58 * 0.5)) + -18.0);
(*(void (__fastcall **)(__int64, std::string *))(*(_QWORD *)v5 + 184LL))(v5, &v55);
v6 = ButtonSprite::create_1(
(__int64)"OK",
0x28u,
0,
1u,
(__int64)"goldFont.fnt",
(__int64)"GJ_button_01.png",
0.80000001,
30.0);
v7 = CCMenuItemSpriteExtra::create((__int64)v6, 0, a1, 1369, 0);
v51 = a1;
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v7);
v55.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x90u);
v55.__r_.__value_.__r.__words[0] = 145;
v55.__r_.__value_.__l.__size_ = 140;
strcpy(
v55.__r_.__value_.__l.__data_,
"Animates certain objects. Can also be used to activate animate on trigger objects.\n"
"The Animation ID specifies the animation:");
std::string::append(&v55, "\nBig Beast: ");
v8 = 0;
do
{
AnimatedGameObject::animationForID(v61, v8, 918);
v9 = v61[0] & 1;
if ( (v61[0] & 1) != 0 )
{
v10 = v61[1];
if ( !v61[1] )
goto LABEL_11;
}
else
{
v10 = LOBYTE(v61[0]) >> 1;
if ( !(LOBYTE(v61[0]) >> 1) )
goto LABEL_11;
}
if ( v8 )
std::string::append(&v55, ", ");
v11 = sub_10088E820("%i: %s", v46);
CString = (const std::string::value_type *)cocos2d::CCString::getCString(v11);
std::string::append(&v55, CString);
++v8;
v9 = v61[0] & 1;
LABEL_11:
if ( v9 )
operator delete(__p);
}
while ( v10 );
std::string::append(&v55, "\n\nBat: ");
v13 = 0;
do
{
AnimatedGameObject::animationForID(v61, v13, 1584);
v14 = v61[0] & 1;
if ( (v61[0] & 1) != 0 )
{
v15 = v61[1];
if ( !v61[1] )
goto LABEL_22;
}
else
{
v15 = LOBYTE(v61[0]) >> 1;
if ( !(LOBYTE(v61[0]) >> 1) )
goto LABEL_22;
}
if ( v13 )
std::string::append(&v55, ", ");
v16 = sub_10088E820("%i: %s", v46);
v17 = (const std::string::value_type *)cocos2d::CCString::getCString(v16);
std::string::append(&v55, v17);
++v13;
v14 = v61[0] & 1;
LABEL_22:
if ( v14 )
operator delete(__p);
}
while ( v15 );
std::string::append(&v55, "\n\nSpikeball: ");
v18 = 0;
do
{
AnimatedGameObject::animationForID(v61, v18, 2012);
v19 = v61[0] & 1;
if ( (v61[0] & 1) != 0 )
{
v20 = v61[1];
if ( !v61[1] )
goto LABEL_33;
}
else
{
v20 = LOBYTE(v61[0]) >> 1;
if ( !(LOBYTE(v61[0]) >> 1) )
goto LABEL_33;
}
if ( v18 )
std::string::append(&v55, ", ");
v21 = sub_10088E820("%i: %s", v46);
v22 = (const std::string::value_type *)cocos2d::CCString::getCString(v21);
std::string::append(&v55, v22);
++v18;
v19 = v61[0] & 1;
LABEL_33:
if ( v19 )
operator delete(__p);
}
while ( v20 );
v47 = 8;
strcpy(v48, "Help");
if ( (*(_BYTE *)&v55.__r_.__value_.__s.0 & 1) != 0 )
data = v55.__r_.__value_.__l.__data_;
else
data = v55.__r_.__value_.__s.__data_;
v24 = strlen(data);
if ( v24 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v25 = v24;
if ( v24 >= 0x17 )
{
v27 = 26;
if ( (v24 | 7) != 0x17 )
v27 = (v24 | 7) + 1;
v26 = (char *)operator new(v27);
v53 = v26;
__dst[0] = v27 | 1;
__dst[1] = v25;
goto LABEL_45;
}
LOBYTE(__dst[0]) = 2 * v24;
v26 = (char *)__dst + 1;
if ( v24 )
LABEL_45:
memmove(v26, data, v25);
v26[v25] = 0;
v28 = InfoAlertButton::create(&v47, __dst, 1.0);
v29 = v51;
if ( (__dst[0] & 1) != 0 )
operator delete(v53);
if ( (v47 & 1) != 0 )
operator delete(v49);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v29 + 552) + 456LL))(*(_QWORD *)(v29 + 552), v28);
v30 = (float)((float)(v57 * 0.5) - (float)(*(float *)(v29 + 732) * 0.5)) + 18.0;
v31 = v29;
v32 = *(_QWORD *)(v29 + 552);
sub_100278250((float *)&v59, v30, (float)((float)(*(float *)(v31 + 736) * 0.5) + (float)(v58 * 0.5)) + -18.0);
cocos2d::CCNode::convertToNodeSpace((double *)v61, v32, (unsigned int *)&v59);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v28 + 184LL))(v28, v61);
LOBYTE(v61[0]) = 16;
strcpy((char *)v61 + 1, "Group ID");
sub_100278250((float *)&v59, v57 * 0.5, (float)(v58 * 0.5) + 40.0);
v33 = v51;
v34 = v51 + 544;
v35 = IDNameInput::create(v51, (int)v51 + 544, 1, 0, (unsigned int)v61, (unsigned int)&v59, 6, 0, 0, 0);
if ( (v61[0] & 1) != 0 )
operator delete(__p);
if ( v35 )
v36 = *(_QWORD *)(v35 + 384);
else
v36 = 0;
*(_QWORD *)(v33 + 1016) = v36;
sub_100278250((float *)&v59, v57 * 0.5, (float)(0.5 * v58) + -25.0);
v37 = cocos2d::CCLabelBMFont::create_3("Animation ID", "goldFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(v33 + 584) + 456LL))(*(_QWORD *)(v33 + 584), v37);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v37 + 160LL))(v37, 0.64999998);
sub_100278250((float *)&v56, 0.0, 30.0);
sub_100278350((double *)v61, &v59, &v56);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v37 + 184LL))(v37, v61);
sub_100278270((__int64)v61, 0.0, 0.0, (__m128)0x42200000u, (__m128)0x42200000u);
v38 = cocos2d::extension::CCScale9Sprite::create_2("square02b_small.png", v61);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v38 + 912LL))(v38, 100);
BYTE2(v61[0]) = 0;
LOWORD(v61[0]) = 0;
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v38 + 960LL))(v38, v61);
sub_100278260((float *)v61, 50.0, 30.0);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v38 + 320LL))(v38, v61);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(v33 + 584) + 464LL))(
*(_QWORD *)(v33 + 584),
v38,
0xFFFFFFFFLL);
(*(void (__fastcall **)(__int64, unsigned __int64 *))(*(_QWORD *)v38 + 184LL))(v38, &v59);
v39 = CCTextInputNode::create((__int64)"Num", (__int64)"Thonburi", 0x18u, (__int64)"bigFont.fnt", 50.0, 40.0);
*(_QWORD *)(v33 + 1024) = v39;
(*(void (__fastcall **)(_QWORD, void *, __int64))(**(_QWORD **)(v33 + 584) + 464LL))(*(_QWORD *)(v33 + 584), v39, 20);
(*(void (__fastcall **)(_QWORD, unsigned __int64 *))(**(_QWORD **)(v33 + 1024) + 184LL))(
*(_QWORD *)(v33 + 1024),
&v59);
CCTextInputNode::setMaxLabelScale(*(_QWORD *)(v33 + 1024), 0.60000002);
CCTextInputNode::setMaxLabelWidth(*(_QWORD *)(v33 + 1024), 200.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(*(_QWORD *)(v33 + 1024) + 576LL) + 344LL))(
*(_QWORD *)(*(_QWORD *)(v33 + 1024) + 576LL),
0);
v40 = *(_QWORD *)(v33 + 1024);
*(_DWORD *)(v40 + 592) = 6;
v50.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)20;
strcpy(v50.__r_.__value_.__s.__data_, "0123456789");
CCTextInputNode::setAllowedChars(v40, &v50);
if ( (*(_BYTE *)&v50.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v50.__r_.__value_.__l.__data_);
CCTextInputNode::setLabelPlaceholderColor(*(_QWORD *)(v33 + 1024), 15772280);
CCTextInputNode::setLabelPlaceholderScale(*(_QWORD *)(v33 + 1024), 0.5);
v41 = *(_QWORD *)(v33 + 1024);
*(_QWORD *)(v41 + 584) = v34;
*(_BYTE *)(v41 + 424) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v41 + 72LL))(v41, 1);
cocos2d::CCNode::convertToNodeSpace((double *)v61, *(_QWORD *)(v33 + 552), (unsigned int *)&v59);
v42 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"edit_leftBtn_001.png", COERCE_DOUBLE(1056964608));
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v42 + 160LL))(v42, 1.1);
v43 = CCMenuItemSpriteExtra::create((__int64)v42, 0, v33, (__int64)SetupAnimationPopup::onAnimationIDArrow, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v33 + 552) + 456LL))(*(_QWORD *)(v33 + 552), v43);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v43 + 72LL))(v43, 1);
sub_100278250((float *)&v54, -50.0, 0.0);
sub_100278350((double *)&v56, v61, &v54);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v43 + 184LL))(v43, &v56);
CCMenuItemSpriteExtra::setSizeMult((__int64)v43, 2.0);
v44 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"edit_rightBtn_001.png", COERCE_DOUBLE(0x40000000));
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v44 + 160LL))(v44, 1.1);
v45 = CCMenuItemSpriteExtra::create((__int64)v44, 0, v33, (__int64)SetupAnimationPopup::onAnimationIDArrow, 0);
(*(void (__fastcall **)(_QWORD, void *))(**(_QWORD **)(v33 + 552) + 456LL))(*(_QWORD *)(v33 + 552), v45);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v45 + 72LL))(v45, 2);
sub_100278250((float *)&v54, 50.0, 0.0);
sub_100278350((double *)&v56, v61, &v54);
(*(void (__fastcall **)(void *, unsigned __int64 *))(*(_QWORD *)v45 + 184LL))(v45, &v56);
CCMenuItemSpriteExtra::setSizeMult((__int64)v45, 2.0);
sub_1003BEA60(v33);
sub_1003BEB70(v33);
SetupTriggerPopup::createMultiTriggerItemsDefault((float *)v33, (__int64)&v56);
*(_BYTE *)(v33 + 744) = 0;
if ( (*(_BYTE *)&v55.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v55.__r_.__value_.__l.__data_);
return v60;
}