// // EditorUI::updateCreateMenu from 0x14010efa0 to 0x14010f3e6 (1094 bytes) // // 9 xrefs: // > EditorUI::clickOnPosition @ 0x1400e27ad // > EditorUI::orderUpCustomItem @ 0x1400e46dc // > EditorUI::orderDownCustomItem @ 0x1400e476c // > EditorUI::resetUI @ 0x1400e4e51 // > EditorUI::setupCreateMenu @ 0x14010de36 // > EditorUI::onCreateButton @ 0x14010ef85 // > @ 0x14066ee64 // > @ 0x14066ee7c // > @ 0x1406c8e38 // // 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 EditorUI::updateCreateMenu(EditorUI *a1, bool a2) { EditButtonBar *m_createButtonBar; // rcx EditButtonBar_vtbl *v4; // rax _BOOL8 v5; // rdx int i; // r12d cocos2d::CCArray *m_customObjectButtonArray; // r14 unsigned int v8; // esi cocos2d::CCArray **p_m_createButtonArray; // rdi struct cocos2d::CCObject *v10; // rdi __int64 v11; // rax __int64 v12; // rbx __int64 v13; // rcx __int64 *v14; // rbx __int16 v15; // ax int v17; // ecx int v18; // ecx int v19; // ecx int v20; // ecx bool v21; // zf int *v22; // rax int v23; // ecx int v24; // eax __int64 v25; // rax int v26; // r14d cocos2d::CCArray *v27; // rdi unsigned int v28; // ebx struct cocos2d::CCObject *v29; // rax int *v30; // rsi __int64 v31; // rax __int64 v32; // rbx __int64 v33; // rcx __int64 v34; // rbx __int16 v35; // ax int v37; // ecx EditButtonBar *v38; // rbx int v39; // edi BoomScrollLayer *m_scrollLayer; // rcx cocos2d::CCArray *m_dynamicObjects; // rcx __int16 v42; // [rsp+70h] [rbp+18h] BYREF char v43; // [rsp+72h] [rbp+1Ah] bool v44; // [rsp+78h] [rbp+20h] __int16 v45; // [rsp+80h] [rbp+28h] BYREF char v46; // [rsp+82h] [rbp+2Ah] __int16 v47; // [rsp+88h] [rbp+30h] BYREF char v48; // [rsp+8Ah] [rbp+32h] v44 = a2; m_createButtonBar = a1->m_createButtonBar; v4 = m_createButtonBar->__vftable; if ( a1->m_selectedMode != 2 ) { v4->setVisible(m_createButtonBar, 0); a1->m_tabsMenu->setVisible(a1->m_tabsMenu, 0); return; } v4->setVisible(m_createButtonBar, 1); LOBYTE(v5) = 1; a1->m_tabsMenu->setVisible(a1->m_tabsMenu, v5); for ( i = 0; i < 2; ++i ) { if ( i ) m_customObjectButtonArray = a1->m_customObjectButtonArray; else m_customObjectButtonArray = a1->m_createButtonArray; v8 = 0; p_m_createButtonArray = &a1->m_createButtonArray; if ( cocos2d::CCArray::count(m_customObjectButtonArray) ) { while ( 1 ) { v10 = cocos2d::CCArray::objectAtIndex(m_customObjectButtonArray, v8); v11 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v10->__vftable[13].copyWithZone)(v10); v12 = v11; v13 = *(_QWORD *)(v11 + 640); if ( v13 || (v13 = *(_QWORD *)(v11 + 648)) != 0 ) (**(void (__fastcall ***)(__int64, __int16 *))(v13 + 320))(v13 + 320, &word_140529A48); if ( v10[9].m_uOrderOfArrival < 0 ) goto LABEL_37; v14 = *(__int64 **)(v12 + 632); v42 = -1; v43 = -1; if ( *((_DWORD *)v14 + 314) != 1 ) break; v15 = *((_WORD *)v14 + 524); if ( v15 ? v15 == 1 : *((_BYTE *)v14 + 1300) ) break; if ( v14[112] ) break; v17 = *(_DWORD *)(v14[138] + 4); if ( v17 == 1004 || !v17 || !*((_BYTE *)v14 + 1784) ) break; v42 = -14136; v43 = -1; LABEL_36: (*(void (__fastcall **)(__int64 *, __int16 *))(*v14 + 1328))(v14, &v42); v25 = *v14; v45 = -14136; v46 = -1; (*(void (__fastcall **)(__int64 *, __int16 *))(v25 + 928))(v14, &v45); LABEL_37: if ( ++v8 >= cocos2d::CCArray::count(m_customObjectButtonArray) ) { p_m_createButtonArray = &a1->m_createButtonArray; goto LABEL_39; } } v18 = *((_DWORD *)v14 + 259); if ( v18 > 1328 ) { if ( v18 != 1584 ) { v21 = v18 == 2012; goto LABEL_29; } } else if ( v18 != 1328 ) { v19 = v18 - 918; if ( v19 ) { v20 = v19 - 1; if ( v20 ) { v21 = v20 == 408; LABEL_29: if ( !v21 ) { v22 = (int *)v14[138]; if ( !v22 ) goto LABEL_36; v23 = v22[1]; v24 = *v22; if ( v23 == v24 || !v24 ) v24 = v23; if ( v24 != 1010 ) goto LABEL_36; } } } } v42 = 0; v43 = 0; goto LABEL_36; } LABEL_39: ; } v26 = 0; while ( 1 ) { v27 = v26 ? a1->m_customObjectButtonArray : *p_m_createButtonArray; v28 = 0; if ( cocos2d::CCArray::count(v27) ) break; LABEL_47: ++v26; p_m_createButtonArray = &a1->m_createButtonArray; if ( v26 >= 2 ) return; } while ( 1 ) { v29 = cocos2d::CCArray::objectAtIndex(v27, v28); v30 = (int *)v29; if ( v29[9].m_uOrderOfArrival == a1->m_selectedObjectIndex ) break; if ( ++v28 >= cocos2d::CCArray::count(v27) ) goto LABEL_47; } v31 = ((__int64 (__fastcall *)(struct cocos2d::CCObject *))v29->__vftable[13].copyWithZone)(v29); v32 = v31; v33 = *(_QWORD *)(v31 + 640); if ( v33 || (v33 = *(_QWORD *)(v31 + 648)) != 0 ) { v47 = 32639; v48 = 127; (**(void (__fastcall ***)(__int64, __int16 *))(v33 + 320))(v33 + 320, &v47); } if ( v30[138] >= 0 ) { v34 = *(_QWORD *)(v32 + 632); v42 = 32639; v43 = 127; v45 = 25700; v46 = 127; if ( *(_DWORD *)(v34 + 1256) == 1 ) { v35 = *(_WORD *)(v34 + 1048); if ( !(v35 ? v35 == 1 : *(_BYTE *)(v34 + 1300)) && !*(_QWORD *)(v34 + 896) ) { v37 = *(_DWORD *)(*(_QWORD *)(v34 + 1104) + 4LL); if ( v37 != 1004 && v37 && *(_BYTE *)(v34 + 1784) ) { v42 = v45; v43 = 127; } } } (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v34 + 1328LL))(v34, &v42); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v34 + 928LL))(v34, &v45); } if ( v44 ) { EditorUI::selectBuildTab(a1, v30[140]); v38 = a1->m_createButtonBar; v39 = v30[139]; m_scrollLayer = v38->m_scrollLayer; if ( m_scrollLayer->m_dynamic ) m_dynamicObjects = m_scrollLayer->m_dynamicObjects; else m_dynamicObjects = m_scrollLayer->m_pages; cocos2d::CCArray::count(m_dynamicObjects); BoomScrollLayer::instantMoveToPage(v38->m_scrollLayer, v39 - 1); BoomScrollLayer::instantMoveToPage(v38->m_scrollLayer, v39); } }