//
// cocos2d::CCComponentContainer::get from 0x1002b1e40 to 0x1002b1f3b (251 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b0e6d0
//
// This function is hookable on this platform (idp: pc, 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 12:28:01 +0000
//
void *__fastcall cocos2d::CCComponentContainer::get(__int64 a1, const char *a2)
{
__int64 v2; // rbx
size_t v3; // rax
size_t v4; // r14
char *v5; // r15
void *result; // rax
size_t v7; // r12
const void *v8; // rax
void *v9; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
if ( !a2 )
return nullptr;
v2 = *(_QWORD *)(a1 + 8);
if ( !v2 )
return nullptr;
v3 = strlen(a2);
if ( v3 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v4 = v3;
if ( v3 >= 0x17 )
{
v7 = 26;
if ( (v3 | 7) != 0x17 )
v7 = (v3 | 7) + 1;
v5 = (char *)operator new(v7);
__p = v5;
__dst[0] = v7 + 1;
__dst[1] = v4;
goto LABEL_11;
}
LOBYTE(__dst[0]) = 2 * v3;
v5 = (char *)__dst + 1;
if ( v3 )
LABEL_11:
memcpy(v5, a2, v4);
v5[v4] = 0;
v8 = (const void *)cocos2d::CCDictionary::objectForKey(v2, __dst);
if ( v8 )
{
result = __dynamic_cast(
v8,
(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:
v9 = result;
operator delete(__p);
return v9;
}
return result;
}