//
// BrowseSmartKeyLayer::createTemplateObjects from 0x1004e6330 to 0x1004e6491 (353 bytes)
//
// 1 xrefs:
// > BrowseSmartKeyLayer::onButton @ 0x1004e62d2
//
// 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:31:20 +0000
//
void __fastcall BrowseSmartKeyLayer::createTemplateObjects(__int64 a1)
{
__int64 AllSelectedBlocks; // r14
_OWORD *v2; // r12
unsigned int v3; // r15d
__int64 v4; // r13
int v5; // eax
char *v6; // rax
__int128 v7; // [rsp+8h] [rbp-78h] BYREF
void *v8; // [rsp+18h] [rbp-68h]
std::string v9; // [rsp+20h] [rbp-60h] BYREF
char v10; // [rsp+38h] [rbp-48h] BYREF
_BYTE v11[23]; // [rsp+39h] [rbp-47h] BYREF
std::string::pointer *p_data; // [rsp+50h] [rbp-30h]
AllSelectedBlocks = BrowseSmartKeyLayer::getAllSelectedBlocks();
if ( (unsigned int)sub_1007FEF90(AllSelectedBlocks) )
{
if ( (unsigned int)sub_1007FEF90(AllSelectedBlocks) )
{
v2 = (_OWORD *)(a1 + 712);
v3 = 0;
p_data = &v9.__r_.__value_.__l.__data_;
do
{
v4 = sub_1007FEFE0(AllSelectedBlocks, v3);
if ( (*(_BYTE *)v2 & 1) != 0 )
{
sub_10001AD30(&v9, *(const void **)(a1 + 728), *(_QWORD *)(a1 + 720));
}
else
{
v9.__r_.__value_.__r.__words[2] = *(_QWORD *)(a1 + 728);
*(_OWORD *)&v9.__r_.__value_.__l.0 = *v2;
}
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 64LL))(v4);
BrowseSmartTemplateLayer::createPrefab(a1, &v9, v5);
if ( (*(_BYTE *)&v9.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v9.__r_.__value_.__l.__data_);
++v3;
}
while ( v3 < (unsigned int)sub_1007FEF90(AllSelectedBlocks) );
}
v10 = 30;
strcpy(v11, "Added to editor");
LOWORD(v7) = 0;
v6 = TextAlertPopup::create((__int128 *)&v10, 0x96u, &v7, 0.5, 0.60000002);
(*(void (__fastcall **)(__int64, char *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v6, 100);
if ( (v7 & 1) != 0 )
operator delete(v8);
if ( (v10 & 1) != 0 )
operator delete(*(void **)&v11[15]);
}
}