//
// BrowseSmartKeyLayer::createTemplateObjects from 0x10007344c to 0x100073598 (332 bytes)
//
// 1 xrefs:
// > BrowseSmartKeyLayer::onButton @ 0x100073430
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall BrowseSmartKeyLayer::createTemplateObjects(BrowseSmartKeyLayer *a1)
{
cocos2d::CCArray *AllSelectedBlocks; // x20
__int64 v3; // x21
__int64 v4; // x22
__int64 v5; // x0
__int64 v6; // x0
void *v7[2]; // [xsp+0h] [xbp-80h] BYREF
char v8; // [xsp+17h] [xbp-69h]
void *v9[2]; // [xsp+18h] [xbp-68h] BYREF
char v10; // [xsp+2Fh] [xbp-51h]
void *__p[2]; // [xsp+30h] [xbp-50h] BYREF
char *longStorage; // [xsp+40h] [xbp-40h]
AllSelectedBlocks = BrowseSmartKeyLayer::getAllSelectedBlocks(a1);
if ( (unsigned int)sub_10024A36C(AllSelectedBlocks) )
{
if ( (unsigned int)sub_10024A36C(AllSelectedBlocks) )
{
v3 = 0;
do
{
v4 = sub_10024A388(AllSelectedBlocks, v3);
if ( a1->m_prefabKey.m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(__p, (void *)a1->m_prefabKey.m_data.m_long.capacitym1, a1->m_prefabKey.m_data.m_long.size);
}
else
{
*(_OWORD *)__p = *(_OWORD *)&a1->m_prefabKey.m_data.m_short.sizex2;
longStorage = a1->m_prefabKey.m_data.m_long.longStorage;
}
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 64LL))(v4);
BrowseSmartTemplateLayer::createPrefab((__int64)a1, (__int64)__p, v5);
if ( SHIBYTE(longStorage) < 0 )
operator delete(__p[0]);
v3 = (unsigned int)(v3 + 1);
}
while ( (unsigned int)v3 < (unsigned int)sub_10024A36C(AllSelectedBlocks) );
}
sub_100009900(v9, "Added to editor");
sub_100009900(v7, "");
v6 = TextAlertPopup::create(v9, 150, v7, 0.5, 0.6);
((void (__fastcall *)(BrowseSmartKeyLayer *, __int64, __int64))a1->addChild_0)(a1, v6, 100);
if ( v8 < 0 )
operator delete(v7[0]);
if ( v10 < 0 )
operator delete(v9[0]);
}
}