// // cocos2d::CCComponentContainer::remove_1 from 0x100164ec0 to 0x100165164 (676 bytes) // // 1 xrefs: // > @ 0x10079bd90 // // 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 // bool __fastcall cocos2d::CCComponentContainer::remove_1(cocos2d::CCComponentContainer *a1, const char *a2) { cocos2d::CCDictionary *m_pComponents; // x8 cocos2d::CCDictElement *m_pElements; // x8 int v4; // w9 int v5; // w10 unsigned int v6; // w9 unsigned int v7; // w11 int v8; // w10 unsigned int v9; // w9 unsigned int v10; // w11 int v11; // w10 UT_hash_table *tbl; // x8 UT_hash_handle *hh_head; // x9 std::ptrdiff_t v15; // x8 __int64 v16; // x19 void *v17; // x0 __int64 v18; // x21 __int64 v19; // x9 cocos2d::CCDictionary *v20; // x8 cocos2d::CCDictElement **p_m_pElements; // x8 cocos2d::CCDictElement *v22; // x11 cocos2d::CCDictElement *v23; // t1 UT_hash_table *v24; // x10 std::ptrdiff_t hho; // x13 cocos2d::CCDictElement *v26; // x12 cocos2d::CCDictElement **v27; // x13 cocos2d::CCDictElement *v28; // x8 UT_hash_table *v29; // x8 __int64 v30; // x9 __int64 v31; // x9 __int64 v32; // x10 void *v33; // x0 m_pComponents = a1->m_pComponents; if ( m_pComponents ) { m_pElements = m_pComponents->m_pElements; if ( !m_pElements ) goto LABEL_8; v4 = *((_DWORD *)a2 + 1) - 1640531527; v5 = ((*((unsigned __int8 *)a2 + 3) << 24) - v4 + (*((unsigned __int8 *)a2 + 2) << 16) + (*((unsigned __int8 *)a2 + 1) << 8) + *(unsigned __int8 *)a2 - 1622558014) ^ 0x7F76D; v6 = (v4 - v5 + 17973513) ^ (v5 << 8); v7 = (-17973513 - v5 - v6) ^ (v6 >> 13); v8 = (v5 - v6 - v7) ^ (v7 >> 12); v9 = (v6 - v7 - v8) ^ (v8 << 16); v10 = (v7 - v8 - v9) ^ (v9 >> 5); v11 = (v8 - v9 - v10) ^ (v10 >> 3); tbl = m_pElements->hh.tbl; hh_head = tbl->buckets[((v10 - v11 - ((v9 - v10 - v11) ^ (v11 << 10))) ^ (((v9 - v10 - v11) ^ (v11 << 10)) >> 15)) & (tbl->num_buckets - 1)].hh_head; if ( hh_head ) { v15 = -tbl->hho; while ( 1 ) { v16 = (__int64)hh_head + v15; if ( *(_DWORD *)((char *)&hh_head[5].key + v15) == 8 && **(_QWORD **)(v16 + 312) == *(_QWORD *)a2 ) break; hh_head = *(UT_hash_handle **)(v16 + 304); if ( !hh_head ) goto LABEL_8; } v17 = *(void **)(v16 + 264); if ( v17 ) { v17 = __dynamic_cast( v17, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCObject, (const struct __class_type_info *)&`typeinfo for'cocos2d::CCComponent, 0); if ( v17 ) { v18 = (__int64)v17; (*(void (__fastcall **)(void *))(*(_QWORD *)v17 + 96LL))(v17); sub_10012A620(v18, 0); v19 = *(_QWORD *)(v16 + 280); if ( v19 || *(_QWORD *)(v16 + 288) ) { v20 = a1->m_pComponents; v23 = v20->m_pElements; p_m_pElements = &v20->m_pElements; v22 = v23; v24 = v23->hh.tbl; hho = v24->hho; if ( (UT_hash_handle *)v16 == (UT_hash_handle *)((char *)v24->tail - hho) ) v24->tail = (UT_hash_handle *)(hho + v19); v26 = *(cocos2d::CCDictElement **)(v16 + 288); v27 = (cocos2d::CCDictElement **)(hho + v19 + 16); if ( v19 ) { v28 = v22; } else { v27 = p_m_pElements; v28 = *(cocos2d::CCDictElement **)(v16 + 288); } *v27 = v26; v29 = v28->hh.tbl; if ( v26 ) *(_QWORD *)&v26->m_szKey[v29->hho + 8] = v19; v30 = (__int64)&v29->buckets[(v29->num_buckets - 1) & *(_DWORD *)(v16 + 324)]; --*(_DWORD *)(v30 + 8); if ( *(_QWORD *)v30 == v16 + 272 ) *(_QWORD *)v30 = *(_QWORD *)(v16 + 304); v31 = *(_QWORD *)(v16 + 296); v32 = *(_QWORD *)(v16 + 304); if ( v31 ) *(_QWORD *)(v31 + 32) = v32; if ( v32 ) *(_QWORD *)(v32 + 24) = v31; --v29->num_items; } else { free(a1->m_pComponents->m_pElements->hh.tbl->buckets); free(a1->m_pComponents->m_pElements->hh.tbl); a1->m_pComponents->m_pElements = nullptr; } cocos2d::CCObject::release(*(cocos2d::CCObject **)(v16 + 264)); v33 = (void *)nullsub_212(v16); operator delete(v33); LOBYTE(v17) = 1; } } } else { LABEL_8: LOBYTE(v17) = 0; } } else { LOBYTE(v17) = 0; } return (char)v17; }
GD Web Decomp Icon

GD Web Decomp

Raw Source