//
// cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID from 0xd1b220 to 0xd1b330 (272 bytes)
//
// 3 xrefs:
// > cocos2d::extension::CCTableView::cellAtIndex @ 0xd18f98
// > cocos2d::extension::CCTableView::insertCellAtIndex @ 0xd1a9dc
// > ??> @ 0xedef8
//
// 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 13:07:08 +0000
//
void *__fastcall cocos2d::extension::CCArrayForObjectSorting::objectWithObjectID(
cocos2d::extension::CCArrayForObjectSorting *this,
int a2)
{
_DWORD *v4; // x19
unsigned int v5; // w21
const void *v6; // x0
void *v7; // x19
if ( !(unsigned int)cocos2d::CCArray::count(this) )
return nullptr;
v4 = (_DWORD *)operator new(0x48u);
cocos2d::CCObject::CCObject((cocos2d::CCObject *)v4);
v4[16] = 0;
*(_QWORD *)v4 = &off_150FB10;
*((_QWORD *)v4 + 7) = off_150FB80;
`non-virtual thunk to'cocos2d::extension::CCSortedObject::setObjectID(
(cocos2d::extension::CCSortedObject *)(v4 + 14),
a2);
v5 = cocos2d::extension::CCArrayForObjectSorting::indexOfSortedObject((__int64)this, (__int64)(v4 + 14));
cocos2d::CCObject::release((cocos2d::CCObject *)v4);
if ( v5 >= (unsigned int)cocos2d::CCArray::count(this) || v5 == -1 )
return nullptr;
v6 = (const void *)cocos2d::CCArray::objectAtIndex(this, v5);
if ( !v6 )
{
__break(0x3E8u);
return nullptr;
}
v7 = _dynamic_cast(
v6,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::extension::CCSortableObject,
-2);
if ( a2 == (*(unsigned int (__fastcall **)(void *))(*(_QWORD *)v7 + 24LL))(v7) )
return v7;
else
return nullptr;
}