//
// EditorUI::findSnapObject from 0x1401bf400 to 0x1401bf4fd (253 bytes)
//
// 5 xrefs:
// > EditorUI::startFreeMoveTouch @ 0x1401bfbcb
// > EditorUI::startFreeMoveTouch @ 0x1401bfd0d
// > ??> @ 0x1408a2590
// > ??> @ 0x1408a25a0
// > ??> @ 0x14091a5b8
//
// 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 11:28:02 +0000
//
__int64 __fastcall EditorUI::findSnapObject(__int64 a1, const struct cocos2d::CCPoint *a2)
{
__int64 v4; // rcx
unsigned int v5; // ebx
cocos2d::CCArray *i; // rbp
struct cocos2d::CCObject *v7; // rsi
cocos2d::CCRect *ObjectRect; // rax
_BYTE v10[16]; // [rsp+30h] [rbp-38h] BYREF
_BYTE v11[16]; // [rsp+40h] [rbp-28h] BYREF
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944)) )
{
v5 = 0;
for ( i = (cocos2d::CCArray *)cocos2d::CCArray::create(v4);
v5 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944));
++v5 )
{
v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 944), v5);
LevelEditorLayer::getObjectRect(*(_QWORD *)(a1 + 1512), v10, v7);
ObjectRect = (cocos2d::CCRect *)LevelEditorLayer::getObjectRect(*(_QWORD *)(a1 + 1512), v11, v7);
if ( cocos2d::CCRect::containsPoint(ObjectRect, a2) )
cocos2d::CCArray::addObject(i, v7);
}
}
else
{
i = nullptr;
}
return EditorUI::findSnapObject_1(a1, i);
}