//
// EditorUI::doCopyObjects from 0x10018a978 to 0x10018aa54 (220 bytes)
//
// 3 xrefs:
// > EditorUI::handleEditorAction @ 0x100163620
// > EditorUI::onCopy @ 0x10018a968
// > EditorCommandsPopup::onCommand @ 0x1004c5ae4
//
// 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 10:59:52 +0000
//
__int64 __fastcall EditorUI::doCopyObjects(__int64 result, int a2)
{
__int64 v3; // x19
__int64 v4; // x8
__int64 v5; // x0
__int64 v6; // x21
__int64 v7; // x0
__int64 v8; // x0
void **v9; // x20
__int64 v10; // x0
std::string v11; // [xsp+8h] [xbp-38h] BYREF
v3 = result;
v4 = *(_QWORD *)(result + 1496);
if ( v4 )
goto LABEL_2;
result = sub_1002E757C(*(_QWORD *)(result + 896));
if ( !(_DWORD)result )
return result;
v4 = *(_QWORD *)(v3 + 1496);
if ( v4 )
{
LABEL_2:
if ( *(_DWORD *)(v4 + 1028) == 749 )
return result;
}
v5 = sub_1002E757C(*(_QWORD *)(v3 + 896));
if ( (_DWORD)v5 )
{
v6 = *(_QWORD *)(v3 + 896);
}
else
{
v6 = sub_1002E736C(v5);
sub_1002E74E0(v6, *(_QWORD *)(v3 + 1496));
}
v7 = EditorUI::copyObjects(v3, v6, a2, 0, &v11);
v8 = GameManager::sharedState(v7);
v9 = (void **)(v8 + 512);
if ( *(char *)(v8 + 535) < 0 )
operator delete(*v9);
*(std::string *)v9 = v11;
v10 = sub_1002E757C(*(_QWORD *)(v3 + 896));
*(_DWORD *)(GameManager::sharedState(v10) + 536) = v10;
return EditorUI::updateButtons(v3);
}