//
// cocos2d::CCComponentContainer::get from 0x1002c5050 to 0x1002c514b (251 bytes)
//
// 1 xrefs:
// > ??> @ 0x100907020
//
// 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::CCComponent *__fastcall cocos2d::CCComponentContainer::get(cocos2d::CCComponentContainer *a1, const char *a2)
{
double v2; // xmm0_8
cocos2d::CCDictionary *m_pComponents; // rbx
size_t v4; // rax
size_t v5; // r14
char *v6; // r15
cocos2d::CCComponent *result; // rax
size_t v8; // r12
const void *v9; // rax
cocos2d::CCComponent *v10; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
if ( !a2 )
return nullptr;
m_pComponents = a1->m_pComponents;
if ( !m_pComponents )
return nullptr;
v4 = strlen(a2);
if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(v2);
v5 = v4;
if ( v4 >= 0x17 )
{
v8 = 26;
if ( (v4 | 7) != 0x17 )
v8 = (v4 | 7) + 1;
v6 = (char *)operator new(v8);
__p = v6;
__dst[0] = v8 + 1;
__dst[1] = v5;
goto LABEL_11;
}
LOBYTE(__dst[0]) = 2 * v4;
v6 = (char *)__dst + 1;
if ( v4 )
LABEL_11:
memcpy(v6, a2, v5);
v6[v5] = 0;
v9 = (const void *)cocos2d::CCDictionary::objectForKey_1(m_pComponents, __dst);
if ( v9 )
{
result = (cocos2d::CCComponent *)__dynamic_cast(
v9,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCComponent,
0);
if ( (__dst[0] & 1) == 0 )
return result;
goto LABEL_14;
}
result = nullptr;
if ( (__dst[0] & 1) != 0 )
{
LABEL_14:
v10 = result;
operator delete(__p);
return v10;
}
return result;
}