//
// cocos2d::CCComponentContainer::get from 0xda04ec to 0xda0630 (324 bytes)
//
// 2 xrefs:
// > ??> @ 0x85798
// > ??> @ 0x152fa40
//
// 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:08:29 +0000
//
void *__fastcall cocos2d::CCComponentContainer::get(cocos2d::CCComponentContainer *this, const char *a2)
{
__int64 v2; // x22
size_t v3; // x0
size_t v4; // x19
const char *v5; // x1
char *v6; // x3
const void *v7; // x0
void *v8; // x19
unsigned __int64 v10; // x0
__int64 v11; // x21
char *v12; // x0
__int64 v14; // [xsp+50h] [xbp+50h] BYREF
size_t v15; // [xsp+58h] [xbp+58h]
void *v16; // [xsp+60h] [xbp+60h]
if ( !a2 )
return nullptr;
v2 = *((_QWORD *)this + 1);
if ( !v2 )
return nullptr;
v14 = 0;
v15 = 0;
v16 = nullptr;
v3 = strlen(a2);
v4 = v3;
v5 = a2;
if ( v3 > 0x16 )
{
v10 = (v3 + 16) & 0xFFFFFFFFFFFFFFF0LL;
v11 = v10 | 1;
v12 = (char *)operator new(v10);
v14 = v11;
v5 = a2;
v6 = v12;
v16 = v12;
v15 = v4;
}
else
{
LOBYTE(v14) = 2 * v3;
v6 = (char *)&v14 + 1;
if ( !v3 )
{
BYTE1(v14) = 0;
v7 = (const void *)cocos2d::CCDictionary::objectForKey(v2, (__int64)&v14);
if ( v7 )
goto LABEL_6;
LABEL_10:
v8 = nullptr;
if ( (v14 & 1) == 0 )
return v8;
LABEL_11:
operator delete(v16);
return v8;
}
}
*((_BYTE *)memcpy(v6, v5, v4) + v4) = 0;
v7 = (const void *)cocos2d::CCDictionary::objectForKey(v2, (__int64)&v14);
if ( !v7 )
goto LABEL_10;
LABEL_6:
v8 = _dynamic_cast(
v7,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCComponent,
0);
if ( (v14 & 1) != 0 )
goto LABEL_11;
return v8;
}