//
// cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID from 0x10042a4f0 to 0x10042a639 (329 bytes)
//
// 5 xrefs:
// > cocos2d::extension::CCTableView::cellAtIndex @ 0x10042cc2c
// > cocos2d::extension::CCTableView::updateCellAtIndex @ 0x10042ccdc
// > cocos2d::extension::CCTableView::insertCellAtIndex @ 0x10042d062
// > cocos2d::extension::CCTableView::removeCellAtIndex @ 0x10042d244
// > cocos2d::extension::CCTableView::ccTouchBegan @ 0x10042dbe9
//
// 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
//
cocos2d::extension::CCSortableObject *__fastcall cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(
cocos2d::extension::CCArrayForObjectSorting *a1,
unsigned int a2)
{
cocos2d::CCObject *v2; // r15
unsigned int v3; // r12d
cocos2d::ccArray *data; // rax
const void **arr; // r13
unsigned int v6; // r14d
void *v7; // rax
unsigned int v8; // eax
const void *v9; // rax
cocos2d::extension::CCSortableObject *v10; // r14
int v11; // ecx
cocos2d::extension::CCSortableObject *result; // rax
const void **v13; // [rsp+8h] [rbp-38h]
if ( !(unsigned int)sub_100720070(a1) )
return nullptr;
v2 = (cocos2d::CCObject *)operator new(0x48u);
cocos2d::CCObject::CCObject(v2);
v2->__vftable = (cocos2d::CCObject_vtbl *)off_100935468;
v2[1].__vftable = (cocos2d::CCObject_vtbl *)off_1009354D8;
v2[1].m_uID = a2;
v3 = 0;
if ( a1 )
{
data = a1->data;
if ( data->num )
{
arr = (const void **)data->arr;
v13 = &arr[data->num - 1];
v3 = 0;
v6 = 0;
do
{
if ( !*arr )
break;
v7 = __dynamic_cast(
*arr,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
-2);
v8 = (*(__int64 (__fastcall **)(void *))(*(_QWORD *)v7 + 24LL))(v7);
if ( v8 == a2 )
break;
if ( v8 > a2 && v6 <= a2 )
break;
++v3;
++arr;
v6 = v8;
}
while ( arr <= v13 );
}
}
cocos2d::CCObject::release(v2);
if ( v3 >= (unsigned int)sub_100720070(a1) )
return nullptr;
v9 = (const void *)sub_1007200C0(a1, v3);
v10 = (cocos2d::extension::CCSortableObject *)__dynamic_cast(
v9,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
-2);
v11 = ((__int64 (__fastcall *)(cocos2d::extension::CCSortableObject *))v10->getObjectID)(v10);
result = nullptr;
if ( v11 == a2 )
return v10;
return result;
}