//
// LevelEditorLayer::findGameObject from 0x10035b4e8 to 0x10035b530 (72 bytes)
//
// 1 xrefs:
// > EditorUI::findAndSelectObject @ 0x1003ea044
//
// 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
//
GameObject *__fastcall LevelEditorLayer::findGameObject(LevelEditorLayer *a1, int a2)
{
cocos2d::CCArray *m_objects; // x8
cocos2d::ccArray *data; // x8
__int64 num; // x9
GameObject **arr; // x8
unsigned __int64 v6; // x9
GameObject *result; // x0
m_objects = a1->m_objects;
if ( !m_objects )
return nullptr;
data = m_objects->data;
num = data->num;
if ( !(_DWORD)num )
return nullptr;
arr = (GameObject **)data->arr;
v6 = (unsigned __int64)&arr[num - 1];
while ( 1 )
{
result = *arr;
if ( !*arr || result->m_uniqueID == a2 )
break;
if ( (unsigned __int64)++arr > v6 )
return nullptr;
}
return result;
}