//
// EditorUI::copyObjectsDetailed from 0xbd9294 to 0xbd94b0 (540 bytes)
//
// 2 xrefs:
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc578
// > ??> @ 0xc0460
//
// This function is hookable on this platform (idp: arm, 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 13:03:42 +0000
//
__int64 *__usercall EditorUI::copyObjectsDetailed@(
__int64 *__return_ptr a1@,
EditorUI *this@,
cocos2d::CCArray *a3@)
{
unsigned int *v6; // x1
_DWORD **v7; // x20
__int64 v8; // x0
char *v9; // x23
_DWORD *i; // x19
const cocos2d::CCPoint *v11; // x0
void (__fastcall *v12)(_DWORD *, __int64 *); // x26
__int64 v13; // x0
long double v14; // q0
_BYTE *v15; // x1
size_t v16; // x2
__int64 v18; // [xsp+78h] [xbp+78h] BYREF
char v19[8]; // [xsp+80h] [xbp+80h] BYREF
__int64 v20; // [xsp+88h] [xbp+88h] BYREF
unsigned __int8 v21; // [xsp+90h] [xbp+90h]
_BYTE v22[15]; // [xsp+91h] [xbp+91h] BYREF
void *v23; // [xsp+A0h] [xbp+A0h]
qsort(
*(void **)(*((_QWORD *)a3 + 7) + 16LL),
**((unsigned int **)a3 + 7),
8u,
(int (*)(const void *, const void *))mIDSort);
EditorUI::getGroupCenter(&v18, this, a3, 0);
*a1 = 0;
a1[1] = 0;
a1[2] = 0;
std::string::__init(a1, &byte_11B8890, 0);
v6 = *((unsigned int **)a3 + 7);
if ( *v6 )
{
v7 = *((_DWORD ***)v6 + 2);
v8 = 8LL * *v6 - 8;
v9 = (char *)v7 + v8;
if ( v7 <= (_DWORD **)((char *)v7 + v8) )
{
for ( i = *v7; *v7; i = *v7 )
{
if ( i[257] != 749 )
{
v11 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)i + 192LL))(i);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v19, v11);
v12 = *(void (__fastcall **)(_DWORD *, __int64 *))(*(_QWORD *)i + 184LL);
v13 = (*(__int64 (__fastcall **)(_DWORD *))(*(_QWORD *)i + 192LL))(i);
cocos2d::CCPoint::operator-(&v20, v13, &v18, v14);
v12(i, &v20);
(*(void (__fastcall **)(_DWORD *, _QWORD))(*(_QWORD *)i + 1392LL))(i, *((_QWORD *)this + 180));
(*(void (__fastcall **)(_DWORD *, char *))(*(_QWORD *)i + 184LL))(i, v19);
if ( (v21 & 1) != 0 )
{
v15 = v23;
v16 = *(_QWORD *)&v22[7];
}
else
{
v16 = v21 >> 1;
v15 = v22;
}
std::string::append((__int64)a1, v15, v16);
std::string::append((__int64)a1, ";", 1u);
if ( (v21 & 1) != 0 )
operator delete(v23);
}
if ( v9 < (char *)++v7 )
break;
}
}
}
return a1;
}