// // SetupKeyframePopup::onCustomButton from 0xa3d14c to 0xa3d584 (1080 bytes) // // 2 xrefs: // > @ 0xa4b98 // > @ 0x11de410 // // 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 // void SetupKeyframePopup::onCustomButton(SetupKeyframePopup *a1, cocos2d::CCObject *a2) { unsigned __int64 v4; // x0 cocos2d::CCObject *v5; // x1 double v6; // d0 __int64 *v7; // x19 EffectGameObject *m_gameObject; // x0 cocos2d::CCArray *m_gameObjects; // x19 EffectGameObject *v10; // x0 cocos2d::CCArray *v11; // x19 cocos2d::ccArray *v12; // x1 cocos2d::CCObject **v13; // x19 __int64 v14; // x0 unsigned __int64 v15; // x21 cocos2d::CCObject *i; // x19 cocos2d::CCArray *v17; // x0 __int64 v18; // x19 void *v19; // x0 cocos2d::ccArray *data; // x1 cocos2d::CCObject **arr; // x21 cocos2d::CCObject **v22; // x25 cocos2d::CCObject *v23; // x23 int m_uOrderOfArrival; // w6 unsigned __int64 v25; // x22 unsigned __int64 v26; // x19 __int64 **v27; // x5 __int64 *v28; // x2 int v29; // w0 LevelEditorLayer *m_editorLayer; // x0 __int64 *v31; // x19 __int64 v32; // x0 int v33; // w5 LevelEditorLayer *v34; // x0 __int64 *v35; // x19 cocos2d::CCArray *v36; // x0 __int64 v37; // [xsp+68h] [xbp+68h] __int64 v38; // [xsp+70h] [xbp+70h] BYREF cocos2d::CCObject v39; // [xsp+78h] [xbp+78h] BYREF __int64 *v40; // [xsp+B0h] [xbp+B0h] __int64 v41; // [xsp+B8h] [xbp+B8h] float v42; // [xsp+C0h] [xbp+C0h] BYREF __int64 v43; // [xsp+C8h] [xbp+C8h] __int64 v44; // [xsp+D0h] [xbp+D0h] BYREF v40 = nullptr; v41 = 0; v42 = 1.0; v43 = 0; v4 = sub_D146DC(&v42, 10); *(_QWORD *)&v39.m_uOrderOfArrival = v4; if ( v4 == 1 ) { v44 = 0; v7 = &v44; } else { if ( v4 > 0x1FFFFFFFFFFFFFFFLL ) sub_D1383C(v6); v37 = 8 * v4; v7 = (__int64 *)operator new(8 * v4); memset(v7, 0, v37); } m_gameObject = a1->m_gameObject; *(_QWORD *)&v39.m_unknown2 = v7; if ( m_gameObject ) m_gameObjects = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject((cocos2d::CCArray *)m_gameObject, v5); else m_gameObjects = a1->m_gameObjects; if ( m_gameObjects ) { if ( (unsigned int)cocos2d::CCArray::count(m_gameObjects) ) { data = m_gameObjects->data; if ( data->num ) { arr = data->arr; v22 = &arr[data->num - 1]; if ( arr <= v22 ) { while ( 1 ) { v23 = *arr; if ( !*arr ) goto LABEL_8; m_uOrderOfArrival = v23[32].m_uOrderOfArrival; v25 = m_uOrderOfArrival; v26 = (unsigned __int64)m_uOrderOfArrival % *(_QWORD *)&v39.m_uOrderOfArrival; v27 = *(__int64 ***)(*(_QWORD *)&v39.m_unknown2 + 8 * v26); if ( !v27 ) goto LABEL_44; v28 = *v27; if ( m_uOrderOfArrival != *((_DWORD *)*v27 + 2) ) break; LABEL_34: if ( !*v27 ) goto LABEL_44; LABEL_35: if ( v22 < ++arr ) goto LABEL_8; } while ( *v28 ) { v29 = *(_DWORD *)(*v28 + 8); v27 = (__int64 **)v28; if ( v26 != (unsigned __int64)v29 % *(_QWORD *)&v39.m_uOrderOfArrival ) break; v28 = (__int64 *)*v28; if ( m_uOrderOfArrival == v29 ) goto LABEL_34; } LABEL_44: v32 = operator new(0x10u); v33 = v23[32].m_uOrderOfArrival; *(_QWORD *)v32 = 0; *(_DWORD *)(v32 + 8) = v33; std::_Hashtable,std::__detail::_Identity,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::_M_insert_unique_node( (__int64)&v39.m_unknown2, v26, v25, (_QWORD *)v32); goto LABEL_35; } } } } LABEL_8: if ( a2->getTag(a2) == 2 ) { SetupKeyframePopup::refreshPreviewArt(a1); goto LABEL_43; } if ( a2->getTag(a2) == 4 ) { m_editorLayer = a1->m_editorLayer; if ( m_editorLayer ) { v31 = v40; if ( v40 ) { while ( 1 ) { LevelEditorLayer::reverseKeyframeAnimationOrder(m_editorLayer, *((_DWORD *)v31 + 2)); v31 = (__int64 *)*v31; if ( !v31 ) break; m_editorLayer = a1->m_editorLayer; } } } goto LABEL_42; } if ( a2->getTag(a2) == 3 ) { EditorUI::deselectAll(a1->m_editorLayer->m_editorUI); v34 = a1->m_editorLayer; if ( v34 ) { v35 = v40; if ( v40 ) { while ( 1 ) { v36 = LevelEditorLayer::duplicateKeyframeAnimation(v34, *((_DWORD *)v35 + 2)); EditorUI::selectObjects(a1->m_editorLayer->m_editorUI, v36, 0); v35 = (__int64 *)*v35; if ( !v35 ) break; v34 = a1->m_editorLayer; } } } LABEL_42: a1->onClose(a1, nullptr); goto LABEL_43; } if ( a2->getTag(a2) == 1 && a1->m_editorLayer ) { v10 = a1->m_gameObject; LODWORD(v39.__vftable) = 0; *(_QWORD *)&v39.m_uID = 0; *(_QWORD *)&v39.m_uIndexInArray = 0; *(_QWORD *)&v39.m_nTag = &v39; *(_QWORD *)&v39.m_uAutoReleaseCount = &v39; if ( v10 ) v11 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject((cocos2d::CCArray *)v10, &v39); else v11 = a1->m_gameObjects; if ( v11 ) { if ( (unsigned int)cocos2d::CCArray::count(v11) ) { v12 = v11->data; if ( v12->num ) { v13 = v12->arr; v14 = 8LL * v12->num - 8; v15 = (unsigned __int64)v13 + v14; if ( v13 <= (cocos2d::CCObject **)((char *)v13 + v14) ) { do { if ( !*v13 ) break; std::_Rb_tree,std::less,std::allocator>::_M_insert_unique( &v38, &(*v13++)[32].m_uOrderOfArrival); } while ( v15 >= (unsigned __int64)v13 ); } } } } EditorUI::deselectAll(a1->m_editorLayer->m_editorUI); for ( i = *(cocos2d::CCObject **)&v39.m_nTag; i != &v39; i = (cocos2d::CCObject *)sub_CFAB74(i) ) { v17 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey( a1->m_editorLayer->m_keyframeGroups, i->m_uIndexInArray); EditorUI::selectObjects(a1->m_editorLayer->m_editorUI, v17, 0); } a1->onClose(a1, nullptr); v18 = *(_QWORD *)&v39.m_uID; while ( v18 ) { std::_Rb_tree,std::less,std::allocator>::_M_erase( (__int64)&v38, *(_QWORD **)(v18 + 24)); v19 = (void *)v18; v18 = *(_QWORD *)(v18 + 16); operator delete(v19); } } LABEL_43: std::_Hashtable,std::__detail::_Identity,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::~_Hashtable((__int64)&v39.m_unknown2); }
GD Web Decomp Icon

GD Web Decomp

Raw Source