// // GJBaseGameLayer::claimParticle from 0x867eb0 to 0x8681c4 (788 bytes) // // 3 xrefs: // > GameObject::claimParticle @ 0x646158 // > GameObject::claimParticle @ 0x6462c8 // > @ 0x455a0 // // 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::CCObject *__fastcall GJBaseGameLayer::claimParticle(__int64 a1, char **a2) { cocos2d::CCDictionary *v3; // x19 cocos2d::CCArray *v4; // x25 char *v5; // x0 cocos2d::CCObject *Object; // x19 cocos2d::CCDictionary *v7; // x26 cocos2d::CCArray *v8; // x26 char *v9; // x0 char *v10; // x0 unsigned int *v12; // x1 int v13; // w2 __int64 v14; // x0 __int64 v15; // x20 void (__fastcall *v16)(__int64, cocos2d::CCObject *, _QWORD); // x21 unsigned int v17; // w0 unsigned int *v18; // x20 int v19; // w1 unsigned int *v20; // x1 int v21; // w2 const char *v22; // [xsp+68h] [xbp+68h] BYREF std::string v23; // [xsp+70h] [xbp+70h] BYREF v3 = *(cocos2d::CCDictionary **)(a1 + 12592); sub_D153B8((int)&v23, *a2); v4 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v3, &v23); v5 = (char *)v23.m_data.m_data - 24; if ( (__int64 *)v23.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v12 = (unsigned int *)((char *)v23.m_data.m_data - 8); do v13 = __ldaxr(v12); while ( __stlxr(v13 - 1, v12) ); } else { v13 = *((_DWORD *)v23.m_data.m_data - 2); *((_DWORD *)v23.m_data.m_data - 2) = v13 - 1; } if ( v13 <= 0 ) operator delete(v5); } if ( !v4 || !(unsigned int)cocos2d::CCArray::count(v4) ) return nullptr; Object = (cocos2d::CCObject *)cocos2d::CCArray::lastObject(v4); v7 = *(cocos2d::CCDictionary **)(a1 + 12592); sub_D18D28(&v22); GJBaseGameLayer::getParticleKey2(&v22, (__int64)&v23); v8 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v7, &v23); v9 = (char *)v23.m_data.m_data - 24; if ( (__int64 *)v23.m_data.m_data - 3 != &qword_124B6B0 ) { if ( &pthread_create ) { v20 = (unsigned int *)((char *)v23.m_data.m_data - 8); do v21 = __ldaxr(v20); while ( __stlxr(v21 - 1, v20) ); } else { v21 = *((_DWORD *)v23.m_data.m_data - 2); *((_DWORD *)v23.m_data.m_data - 2) = v21 - 1; } if ( v21 <= 0 ) operator delete(v9); } v10 = (char *)(v22 - 24); if ( v22 - 24 != (const char *)&qword_124B6B0 ) { if ( &pthread_create ) { v18 = (unsigned int *)(v22 - 8); do v19 = __ldaxr(v18); while ( __stlxr(v19 - 1, v18) ); } else { v19 = *((_DWORD *)v22 - 2); *((_DWORD *)v22 - 2) = v19 - 1; } if ( v19 <= 0 ) operator delete(v10); } cocos2d::CCArray::addObject(v8, Object); cocos2d::CCArray::removeLastObject(v4, 1); if ( !((__int64 (__fastcall *)(cocos2d::CCObject *))Object->__vftable[6].~CCObject_0)(Object) ) { v14 = *(_QWORD *)(a1 + 12760); v15 = *(_QWORD *)(a1 + 4144); if ( v14 && *(_BYTE *)(v14 + 1102) && (unsigned int)(*(_DWORD *)(v14 + 1092) - 2) <= 5 ) v15 = *(_QWORD *)(a1 + 4152); v16 = *(void (__fastcall **)(__int64, cocos2d::CCObject *, _QWORD))(*(_QWORD *)v15 + 448LL); v17 = Object->getTag(Object); v16(v15, Object, v17); } cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 12680), Object); ((void (__fastcall *)(cocos2d::CCObject *, __int64))Object->__vftable[4].~CCObject)(Object, 1); return Object; }
GD Web Decomp Icon

GD Web Decomp

Raw Source