//
// cocos2d::CCComponentContainer::add from 0x7fe1e8 to 0x7fe2ce (230 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:17 +0000
//
int __fastcall cocos2d::CCComponentContainer::add(
cocos2d::CCComponentContainer *this,
cocos2d::CCComponent *a2,
void *a3,
int a4)
{
cocos2d::CCDictionary *Owner; // r0
cocos2d::CCDictionary *v7; // r0
int v8; // r5
char *Name; // r10
size_t v10; // r0
void *v11; // r0
void *v12; // r5
int v13; // r6
char *v14; // r0
char *v15; // r8
size_t v16; // r0
cocos2d::CCComponentContainer *v18; // [sp+0h] [bp-10h] BYREF
cocos2d::CCComponent *v19; // [sp+4h] [bp-Ch]
void *v20; // [sp+8h] [bp-8h]
int v21; // [sp+Ch] [bp-4h]
v18 = this;
v19 = a2;
v20 = a3;
v21 = a4;
Owner = (cocos2d::CCDictionary *)cocos2d::CCComponent::getOwner(a2);
if ( !*((_DWORD *)this + 1) )
{
v7 = cocos2d::CCDictionary::create(Owner);
*((_DWORD *)this + 1) = v7;
cocos2d::CCObject::retain((int)v7);
}
v8 = *((_DWORD *)this + 1);
v18 = nullptr;
v19 = nullptr;
v20 = nullptr;
Name = cocos2d::CCComponent::getName(a2);
v10 = strlen(Name);
std::string::__init((int *)&v18, Name, v10);
v11 = (void *)cocos2d::CCDictionary::objectForKey(v8, (int)&v18);
v12 = v11;
if ( v11 )
v12 = _dynamic_cast(
v11,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject,
(const struct __class_type_info *)&`typeinfo for'cocos2d::CCComponent,
0);
if ( ((unsigned __int8)v18 & 1) != 0 )
operator delete(v20);
if ( v12 )
return 0;
cocos2d::CCComponent::setOwner((int)a2, *((cocos2d::CCNode **)this + 2));
v13 = *((_DWORD *)this + 1);
v14 = cocos2d::CCComponent::getName(a2);
v18 = nullptr;
v19 = nullptr;
v20 = nullptr;
v15 = v14;
v16 = strlen(v14);
std::string::__init((int *)&v18, v15, v16);
cocos2d::CCDictionary::setObject(v13, a2, (int)&v18);
if ( ((unsigned __int8)v18 & 1) != 0 )
operator delete(v20);
(*(void (__fastcall **)(cocos2d::CCComponent *))(*(_DWORD *)a2 + 44))(a2);
return 1;
}