//
// EditorUI::copyObjectsDetailed from 0x10003de90 to 0x10003dff7 (359 bytes)
//
// 1 xrefs:
// > EditorUI::addObjectsToSmartTemplate @ 0x10004267a
//
// 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
//
std::string *__fastcall EditorUI::copyObjectsDetailed(std::string *this, __int64 a2, __int64 a3)
{
void **v4; // rax
size_t v5; // rsi
unsigned int *v6; // rax
_QWORD *v7; // r14
unsigned __int64 v8; // r15
_DWORD *v9; // r13
__int64 v10; // rsi
__int64 v11; // rax
const std::string::value_type *p_s; // rsi
std::string::size_type v13; // rdx
char v15; // [rsp+8h] [rbp-58h] BYREF
_BYTE v16[8]; // [rsp+10h] [rbp-50h] BYREF
__int64 v17; // [rsp+18h] [rbp-48h]
unsigned __int8 v18; // [rsp+20h] [rbp-40h] BYREF
std::string::value_type __s; // [rsp+21h] [rbp-3Fh] BYREF
std::string::size_type v20; // [rsp+28h] [rbp-38h]
void *__p; // [rsp+30h] [rbp-30h]
double v22; // 0:xmm0_8.8
v17 = a2;
v4 = *(void ***)(a3 + 56);
v5 = *(unsigned int *)v4;
qsort(v4[2], v5, 8u, (int (__cdecl *)(const void *, const void *))_compar);
*(cocos2d::CCPoint *)&v22 = EditorUI::getGroupCenter((EditorUI *)&v15, (cocos2d::CCArray *)v5, a3);
*(_WORD *)&this->__r_.__value_.__l.0 = 0;
v6 = *(unsigned int **)(a3 + 56);
if ( *v6 )
{
v7 = *((_QWORD **)v6 + 2);
v8 = (unsigned __int64)&v7[*v6 - 1];
do
{
v9 = (_DWORD *)*v7;
if ( !*v7 )
break;
if ( v9[257] != 749 )
{
v10 = (*(__int64 (__fastcall **)(_QWORD, double))(*(_QWORD *)v9 + 192LL))(*v7, v22);
v22 = sub_10028CC60(v16);
v11 = (*(__int64 (__fastcall **)(_DWORD *, __int64, double))(*(_QWORD *)v9 + 192LL))(v9, v10, v22);
sub_10028CD00(&v18, v11, &v15);
(*(void (__fastcall **)(_DWORD *, unsigned __int8 *))(*(_QWORD *)v9 + 184LL))(v9, &v18);
(*(void (__fastcall **)(unsigned __int8 *, _DWORD *, _QWORD))(*(_QWORD *)v9 + 1376LL))(
&v18,
v9,
*(_QWORD *)(v17 + 1256));
(*(void (__fastcall **)(_DWORD *, _BYTE *))(*(_QWORD *)v9 + 184LL))(v9, v16);
if ( (v18 & 1) != 0 )
{
p_s = (const std::string::value_type *)__p;
v13 = v20;
}
else
{
v13 = v18 >> 1;
p_s = &__s;
}
std::string::append(this, p_s, v13);
std::string::append(this, ";");
if ( (v18 & 1) != 0 )
operator delete(__p);
}
++v7;
}
while ( (unsigned __int64)v7 <= v8 );
}
return this;
}