// // SetupKeyframePopup::onCustomButton from 0x140426710 to 0x140426b6b (1115 bytes) // // 2 xrefs: // > @ 0x1405e6cb8 // > @ 0x1406d9740 // // 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=3 void SetupKeyframePopup::onCustomButton(SetupKeyframePopup *a1, cocos2d::CCObject *a2) { __int64 v2; // r8 EffectGameObject *m_gameObject; // rcx cocos2d::CCArray *m_gameObjects; // rbx cocos2d::ccArray *data; // rbx __int64 num; // rax cocos2d::CCObject **arr; // rbx cocos2d::CCObject **i; // rsi __int64 *v11; // r15 __int64 *j; // rbx int v13; // edi LevelEditorLayer *m_editorLayer; // rsi cocos2d::CCArray *v15; // rax __int64 *v16; // rdi __int64 *k; // rbx cocos2d::CCArray *v18; // rax _QWORD *v19; // rax EffectGameObject *v20; // rcx cocos2d::CCArray *v21; // rbx __int64 m_uAutoReleaseCount; // rdx __int64 v23; // r8 cocos2d::ccArray *v24; // rbx __int64 v25; // rax cocos2d::CCObject **v26; // rbx cocos2d::CCObject **v27; // r15 _QWORD *v28; // rsi cocos2d::CCObject *v29; // rdi __int64 *v30; // rax _QWORD *v31; // rcx _DWORD *v32; // rax __int64 *v33; // rbx cocos2d::CCArray *v34; // rax __int64 **v35; // rax __int64 *m; // rax __int64 *n; // rcx _QWORD *v38; // [rsp+20h] [rbp-49h] BYREF __int64 v39; // [rsp+28h] [rbp-41h] _QWORD **v40; // [rsp+30h] [rbp-39h] __int64 v41; // [rsp+38h] [rbp-31h] __int64 *v42; // [rsp+40h] [rbp-29h] BYREF int v43; // [rsp+48h] [rbp-21h] char v44[8]; // [rsp+60h] [rbp-9h] BYREF __int64 *v45; // [rsp+68h] [rbp-1h] BYREF char v46[40]; // [rsp+78h] [rbp+Fh] BYREF int v47; // [rsp+D0h] [rbp+67h] BYREF v47 = 0; sub_14005E660((__int64)v44, &v47, v2); m_gameObject = a1->m_gameObject; if ( m_gameObject ) m_gameObjects = cocos2d::CCArray::createWithObject(m_gameObject); else m_gameObjects = a1->m_gameObjects; if ( m_gameObjects ) { if ( cocos2d::CCArray::count(m_gameObjects) ) { data = m_gameObjects->data; num = data->num; if ( (_DWORD)num ) { arr = data->arr; for ( i = &arr[num - 1]; arr <= i; ++arr ) { if ( !*arr ) break; sub_140060D70((__int64)v44, (__int64)&v42, (unsigned __int8 *)&(*arr)[33].m_uAutoReleaseCount); } } } } if ( a2->getTag(a2) == 2 ) { SetupKeyframePopup::refreshPreviewArt(a1); goto LABEL_54; } if ( a2->getTag(a2) == 4 ) { if ( a1->m_editorLayer ) { v11 = v45; for ( j = (__int64 *)*v45; j != v11; j = (__int64 *)*j ) { v13 = *((_DWORD *)j + 4); m_editorLayer = a1->m_editorLayer; v15 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(m_editorLayer->m_keyframeGroups, v13); cocos2d::CCArray::reverseObjects(v15); GJBaseGameLayer::updateKeyframeOrder(m_editorLayer, v13); } } LABEL_16: a1->onClose(a1, nullptr); goto LABEL_54; } if ( a2->getTag(a2) == 3 ) { EditorUI::deselectAll(a1->m_editorLayer->m_editorUI); if ( a1->m_editorLayer ) { v16 = v45; for ( k = (__int64 *)*v45; k != v16; k = (__int64 *)*k ) { v18 = LevelEditorLayer::duplicateKeyframeAnimation(a1->m_editorLayer, *((_DWORD *)k + 4)); EditorUI::selectObjects(a1->m_editorLayer->m_editorUI, v18, 0); } } goto LABEL_16; } if ( a2->getTag(a2) == 1 && a1->m_editorLayer ) { v39 = 0; v19 = operator new(0x20u); *v19 = v19; v19[1] = v19; v19[2] = v19; *((_WORD *)v19 + 12) = 257; v38 = v19; v20 = a1->m_gameObject; if ( v20 ) v21 = cocos2d::CCArray::createWithObject(v20); else v21 = a1->m_gameObjects; if ( v21 ) { if ( cocos2d::CCArray::count(v21) ) { v24 = v21->data; v25 = v24->num; if ( (_DWORD)v25 ) { v26 = v24->arr; v27 = &v26[v25 - 1]; if ( v26 <= v27 ) { v28 = v38; do { v29 = *v26; if ( !*v26 ) break; v30 = (__int64 *)v28[1]; v42 = v30; v43 = 0; v31 = v28; if ( !*((_BYTE *)v30 + 25) ) { m_uAutoReleaseCount = v29[33].m_uAutoReleaseCount; do { v42 = v30; if ( *((_DWORD *)v30 + 7) >= (int)m_uAutoReleaseCount ) { v43 = 1; v31 = v30; v30 = (__int64 *)*v30; } else { v43 = 0; v30 = (__int64 *)v30[2]; } } while ( !*((_BYTE *)v30 + 25) ); } if ( *((_BYTE *)v31 + 25) || (signed int)v29[33].m_uAutoReleaseCount < *((_DWORD *)v31 + 7) ) { if ( v39 == 0x7FFFFFFFFFFFFFFLL ) sub_140052E40(v31, m_uAutoReleaseCount, v23); v40 = &v38; v41 = 0; v32 = operator new(0x20u); v32[7] = v29[33].m_uAutoReleaseCount; *(_QWORD *)v32 = v28; *((_QWORD *)v32 + 1) = v28; *((_QWORD *)v32 + 2) = v28; *((_WORD *)v32 + 12) = 0; v41 = 0; sub_1400636D0(&v38, (__int64)&v42, (__int64)v32); v28 = v38; } ++v26; } while ( v26 <= v27 ); } } } } EditorUI::deselectAll(a1->m_editorLayer->m_editorUI); v33 = (__int64 *)*v38; if ( !*(_BYTE *)(*v38 + 25LL) ) { do { v34 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey( a1->m_editorLayer->m_keyframeGroups, *((int *)v33 + 7)); EditorUI::selectObjects(a1->m_editorLayer->m_editorUI, v34, 0); v35 = (__int64 **)v33[2]; if ( *((_BYTE *)v35 + 25) ) { for ( m = (__int64 *)v33[1]; !*((_BYTE *)m + 25); m = (__int64 *)m[1] ) { if ( v33 != (__int64 *)m[2] ) break; v33 = m; } v33 = m; } else { v33 = (__int64 *)v33[2]; for ( n = *v35; !*((_BYTE *)n + 25); n = (__int64 *)*n ) v33 = n; } } while ( !*((_BYTE *)v33 + 25) ); } a1->onClose(a1, nullptr); sub_1400CDB90((void **)&v38); } LABEL_54: sub_14005D100((__int64)v46); sub_14005D870((void **)&v45); }
GD Web Decomp Icon

GD Web Decomp

Raw Source