// // EditorUI::dynamicGroupUpdate from 0x1401188b0 to 0x140118fd6 (1830 bytes) // // 3 xrefs: // > EditorPauseLayer::onReGroup @ 0x1400dccd0 // > EditorPauseLayer::onBuildHelper @ 0x1400dccf0 // > @ 0x1406c93b4 // // 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 // // Hidden C++ exception states: #wind=4 void EditorUI::dynamicGroupUpdate(EditorUI *a1, bool a2) { bool v2; // r14 EditorUI *v3; // rdi __int64 v4; // rcx cocos2d::CCArray *v5; // r12 struct cocos2d::CCObject *m_selectedObject; // rdx __int64 v7; // r8 __int64 v8; // r8 unsigned int v9; // esi unsigned int v10; // r13d __int64 v11; // r8 struct cocos2d::CCObject *v12; // r14 int v13; // r15d __int64 v14; // rdi unsigned __int64 v15; // rbx __int64 v16; // rax int v17; // edx __int64 v18; // rax cocos2d::CCObjectType m_eObjType; // eax char *v20; // rdi unsigned int v21; // r15d struct cocos2d::CCObject *v22; // rax struct cocos2d::CCObject *v23; // r14 int m_uAutoReleaseCount; // eax cocos2d::CCObjectType v25; // eax unsigned __int8 *p_m_uIndexInArray; // r8 char *v27; // rdx unsigned __int8 *v28; // rbx unsigned __int8 *i; // r14 unsigned __int8 *v30; // rbx unsigned __int8 *v31; // r14 __int64 v32; // r8 __int64 **v33; // r13 __int64 *j; // rbx int v35; // edx __int64 v36; // rax int NextFreeGroupID; // r15d unsigned int k; // r14d GameObject *v39; // rdi EditorUI *v40; // rcx __int64 v41; // rax GameObject *v42; // rax int v43; // [rsp+20h] [rbp-E0h] BYREF cocos2d::CCArray *v44; // [rsp+28h] [rbp-D8h] BYREF _BYTE v45[16]; // [rsp+30h] [rbp-D0h] BYREF char v46[8]; // [rsp+40h] [rbp-C0h] BYREF void *v47; // [rsp+48h] [rbp-B8h] BYREF __int64 v48[3]; // [rsp+58h] [rbp-A8h] BYREF __int64 v49; // [rsp+70h] [rbp-90h] _BYTE v50[16]; // [rsp+80h] [rbp-80h] BYREF _BYTE v51[16]; // [rsp+90h] [rbp-70h] BYREF _BYTE v52[16]; // [rsp+A0h] [rbp-60h] BYREF std::unordered_set v53; // [rsp+B0h] [rbp-50h] BYREF char v54[16]; // [rsp+F0h] [rbp-10h] BYREF char v55[16]; // [rsp+100h] [rbp+0h] BYREF char v56[16]; // [rsp+110h] [rbp+10h] BYREF char v57[16]; // [rsp+120h] [rbp+20h] BYREF char v58[16]; // [rsp+130h] [rbp+30h] BYREF char v59[16]; // [rsp+140h] [rbp+40h] BYREF char v60; // [rsp+150h] [rbp+50h] BYREF char v61[16]; // [rsp+160h] [rbp+60h] BYREF std::unordered_set v62; // [rsp+170h] [rbp+70h] BYREF char v63[8]; // [rsp+1B0h] [rbp+B0h] BYREF void *v64; // [rsp+1B8h] [rbp+B8h] BYREF char v65[104]; // [rsp+1C8h] [rbp+C8h] BYREF int m_nTag; // [rsp+250h] [rbp+150h] BYREF unsigned int v69; // [rsp+258h] [rbp+158h] BYREF v2 = a2; v3 = a1; if ( a1->m_selectedObject || cocos2d::CCArray::count(a1->m_selectedObjects) ) { sub_14005E0D0(&v3->m_editorLayer->m_unk3ae0._Traitsobj._Mypair._Myval2._Myval2); v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4); v44 = v5; m_selectedObject = v3->m_selectedObject; if ( m_selectedObject ) cocos2d::CCArray::addObject(v5, m_selectedObject); else cocos2d::CCArray::addObjectsFromArray(v5, v3->m_selectedObjects); m_nTag = 0; sub_14005E660((__int64)v63, &m_nTag, v7); m_nTag = 0; sub_14005E660((__int64)v46, &m_nTag, v8); v9 = 0; v10 = 0; v69 = 0; if ( cocos2d::CCArray::count(v5) ) { while ( 1 ) { v12 = cocos2d::CCArray::objectAtIndex(v5, v10); v13 = 0; if ( SLOWORD(v12[21].__vftable) <= 0 ) goto LABEL_23; v14 = 0; v15 = 0; do { if ( v15 <= 9 && (v16 = *(_QWORD *)&v12[20].m_uOrderOfArrival) != 0 ) v17 = *(__int16 *)(v14 + v16); else v17 = 0; m_nTag = v17; v43 = v17; v11 = 2 * ((0x100000001B3LL * (HIBYTE(v17) ^ (0x100000001B3LL * (BYTE2(v17) ^ (0x100000001B3LL * (BYTE1(v17) ^ (0x100000001B3LL * ((unsigned __int8)v17 ^ 0xCBF29CE484222325uLL)))))))) & v49); v18 = *(_QWORD *)(v48[0] + 16 * ((0x100000001B3LL * (HIBYTE(v17) ^ (0x100000001B3LL * (BYTE2(v17) ^ (0x100000001B3LL * (BYTE1(v17) ^ (0x100000001B3LL * ((unsigned __int8)v17 ^ 0xCBF29CE484222325uLL)))))))) & v49) + 8); if ( (void *)v18 != v47 ) { if ( v17 == *(_DWORD *)(v18 + 16) ) goto LABEL_19; while ( v18 != *(_QWORD *)(v48[0] + 16 * ((0x100000001B3LL * (HIBYTE(v17) ^ (0x100000001B3LL * (BYTE2(v17) ^ (0x100000001B3LL * (BYTE1(v17) ^ (0x100000001B3LL * ((unsigned __int8)v17 ^ 0xCBF29CE484222325uLL)))))))) & v49)) ) { v18 = *(_QWORD *)(v18 + 8); if ( v17 == *(_DWORD *)(v18 + 16) ) goto LABEL_19; } } v18 = 0; LABEL_19: if ( !v18 ) sub_140060D70((__int64)v46, (__int64)v45, (unsigned __int8 *)&v43); ++v13; ++v15; v14 += 2; } while ( v13 < SLOWORD(v12[21].__vftable) ); v5 = v44; v10 = v69; v3 = a1; LABEL_23: m_eObjType = v12[18].m_eObjType; if ( m_eObjType == 1816 ) { if ( v12[30].m_nTag > 0 ) { m_nTag = v12[30].m_nTag; sub_140060D70((__int64)v46, (__int64)v50, (unsigned __int8 *)&m_nTag); } } else if ( m_eObjType == 2903 ) { m_nTag = 0; sub_14005E660((__int64)&v62, &m_nTag, v11); v12[33].m_nTag = LevelEditorLayer::getNextFreeGradientID(v3->m_editorLayer, &v62); sub_14005D100((__int64)&v62._Vec); sub_14005D870((void **)&v62._List._Mypair._Myval2._Myhead); } v69 = ++v10; if ( v10 >= cocos2d::CCArray::count(v5) ) { v2 = a2; break; } } } v20 = v46; if ( !v2 ) v20 = v63; v21 = 0; if ( cocos2d::CCArray::count(v5) ) { while ( 1 ) { v22 = cocos2d::CCArray::objectAtIndex(v5, v21); v23 = v22; if ( v22[22].m_uAutoReleaseCount == 1 ) { m_uAutoReleaseCount = v22[26].m_uAutoReleaseCount; m_nTag = m_uAutoReleaseCount; v69 = v23[26].m_eObjType; v43 = v23[30].m_nTag; LODWORD(v44) = HIDWORD(v23[30].__vftable); if ( v23[18].m_eObjType == 1006 && !LODWORD(v23[29].__vftable) ) { if ( m_uAutoReleaseCount > 999 ) m_uAutoReleaseCount = 0; m_nTag = m_uAutoReleaseCount; } sub_140060D70((__int64)v20, (__int64)v50, (unsigned __int8 *)&m_nTag); sub_140060D70((__int64)v20, (__int64)v54, (unsigned __int8 *)&v69); sub_140060D70((__int64)v20, (__int64)v55, (unsigned __int8 *)&v43); sub_140060D70((__int64)v20, (__int64)v56, (unsigned __int8 *)&v44); v25 = v23[18].m_eObjType; switch ( v25 ) { case 901: p_m_uIndexInArray = (unsigned __int8 *)&v23[27].m_uIndexInArray; v27 = v52; goto LABEL_54; case 1268: v30 = *(unsigned __int8 **)&v23[33].m_uID; v31 = *(unsigned __int8 **)&v23[33].m_nTag; if ( v30 != v31 ) { if ( a2 ) { do { sub_140060D70((__int64)v20, (__int64)v45, v30 + 8); sub_140060D70((__int64)v20, (__int64)v51, v30); v30 += 16; } while ( v30 != v31 ); } else { do { sub_140060D70((__int64)v20, (__int64)v45, v30 + 8); v30 += 16; } while ( v30 != v31 ); } } break; case 2068: v28 = *(unsigned __int8 **)&v23[33].m_uID; for ( i = *(unsigned __int8 **)&v23[33].m_nTag; v28 != i; v28 += 16 ) sub_140060D70((__int64)v20, (__int64)v61, v28); break; case 2903: sub_140060D70((__int64)v20, (__int64)v57, (unsigned __int8 *)&v23[33].m_uReference); sub_140060D70((__int64)v20, (__int64)v58, (unsigned __int8 *)&v23[33].m_uAutoReleaseCount); sub_140060D70((__int64)v20, (__int64)v59, (unsigned __int8 *)&v23[33].m_eObjType); p_m_uIndexInArray = (unsigned __int8 *)&v23[33].m_uIndexInArray; v27 = &v60; LABEL_54: sub_140060D70((__int64)v20, (__int64)v27, p_m_uIndexInArray); break; } } if ( ++v21 >= cocos2d::CCArray::count(v5) ) { v2 = a2; break; } } } m_nTag = 0; sub_14005D780(v20, (unsigned __int8 *)&m_nTag); m_nTag = 0; sub_14005E660((__int64)&v53, &m_nTag, v32); v33 = *((__int64 ***)v20 + 1); for ( j = *v33; j != (__int64 *)v33; j = (__int64 *)*j ) { v35 = *((_DWORD *)j + 4); m_nTag = v35; if ( v2 ) { LABEL_66: NextFreeGroupID = LevelEditorLayer::getNextFreeGroupID(a1->m_editorLayer, &v53); v69 = NextFreeGroupID; for ( k = 0; k < cocos2d::CCArray::count(v5); ++k ) { v39 = (GameObject *)cocos2d::CCArray::objectAtIndex(v5, k); EditorUI::replaceGroupID(v40, v39, m_nTag, NextFreeGroupID); v39->m_enabledGroupsCounter = 0; v39->m_isGroupDisabled = 0; } sub_140060D70((__int64)&v53, (__int64)v52, (unsigned __int8 *)&v69); v41 = sub_140060B20( &a1->m_editorLayer->m_unk3ae0._Traitsobj._Mypair._Myval2._Myval2, (__int64)v51, (unsigned __int8 *)&m_nTag); *(_DWORD *)(*(_QWORD *)v41 + 20LL) = v69; v2 = a2; continue; } v36 = *(_QWORD *)(v48[0] + 16 * ((0x100000001B3LL * (HIBYTE(v35) ^ (0x100000001B3LL * (BYTE2(v35) ^ (0x100000001B3LL * (BYTE1(v35) ^ (0x100000001B3LL * ((unsigned __int8)v35 ^ 0xCBF29CE484222325uLL)))))))) & v49) + 8); if ( (void *)v36 != v47 ) { if ( v35 == *(_DWORD *)(v36 + 16) ) goto LABEL_65; while ( v36 != *(_QWORD *)(v48[0] + 16 * ((0x100000001B3LL * (HIBYTE(v35) ^ (0x100000001B3LL * (BYTE2(v35) ^ (0x100000001B3LL * (BYTE1(v35) ^ (0x100000001B3LL * ((unsigned __int8)v35 ^ 0xCBF29CE484222325uLL)))))))) & v49)) ) { v36 = *(_QWORD *)(v36 + 8); if ( v35 == *(_DWORD *)(v36 + 16) ) goto LABEL_65; } } v36 = 0; LABEL_65: if ( v36 ) goto LABEL_66; } LevelEditorLayer::recreateGroups(a1->m_editorLayer); if ( cocos2d::CCArray::count(v5) ) { do { v42 = (GameObject *)cocos2d::CCArray::objectAtIndex(v5, v9); LevelEditorLayer::updateObjectLabel(v42); ++v9; } while ( v9 < cocos2d::CCArray::count(v5) ); } sub_14005D100((__int64)&v53._Vec); sub_14005D870((void **)&v53._List._Mypair._Myval2._Myhead); sub_14005D100((__int64)v48); sub_14005D870(&v47); sub_14005D100((__int64)v65); sub_14005D870(&v64); } }