//
// EditorUI::selectObject from 0x1005b8760 to 0x1005b882f (207 bytes)
//
// 9 xrefs:
// > EditorUI::clickOnPosition @ 0x10000c828
// > EditorUI::onCreateObject @ 0x100011239
// > EditorUI::onCreateObject @ 0x100011353
// > EditorUI::createGradientFromSelection @ 0x1000177d7
// > EditorUI::pasteObjects @ 0x1005b79da
// > EditorUI::selectObjects @ 0x1005b8dd5
// > EditorUI::findObject @ 0x1005b9ac2
// > sub_1005B9BD0 @ 0x1005b9c0e
// > EditorUI::ccTouchEnded @ 0x10060b0c8
//
// 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:32:42 +0000
//
__int64 __fastcall EditorUI::selectObject(__int64 a1, int *a2, int a3)
{
__int64 result; // rax
__int64 StickyGroup; // rax
__int64 v5; // rax
if ( a3 || (result = EditorUI::canSelectObject(a1, a2), (_BYTE)result) )
{
if ( *(_BYTE *)(a1 + 867) == 1
&& !*(_BYTE *)(a1 + 868)
&& a2[218] > 0
&& (StickyGroup = GJBaseGameLayer::getStickyGroup(*(_QWORD *)(a1 + 1440))) != 0
&& (unsigned int)sub_1007FEF90(StickyGroup) >= 2 )
{
EditorUI::deselectAll(a1);
v5 = sub_1007FE9A0(a2);
return EditorUI::selectObjects(a1, v5, 0);
}
else
{
*(_BYTE *)(a1 + 866) = 1;
EditorUI::deselectAll(a1);
*(_QWORD *)(a1 + 1496) = a2;
(*(void (__fastcall **)(int *, __int64))(*(_QWORD *)a2 + 1528LL))(a2, 65280);
*(_DWORD *)(*(_QWORD *)(a1 + 1496) + 1136LL) = *(_DWORD *)(a1 + 1540);
*(_BYTE *)(a1 + 776) = 1;
return EditorUI::checkLiveColorSelect(a1);
}
}
return result;
}