{"type": "func", "start": 13352812, "end": 13353340, "name": "EditorCommandsPopup::onCommand", "pseudocode": "// \n// EditorCommandsPopup::onCommand from 0xcbbf6c to 0xcbc17c (528 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x88fc0\n// > EditorCommandsPopup::addCommandButton @ 0xcbc60c\n// > <???> @ 0x1543988\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 13:06:15 +0000\n// \n\n__int64 __fastcall EditorCommandsPopup::onCommand(__int64 this, cocos2d::CCObject *a2)\n{\n  __int64 v2; // x19\n  EditorUI *v3; // x19\n  cocos2d::CCArray *SelectedObjects; // x1\n  EditorUI *v5; // x19\n  cocos2d::CCArray *v6; // x1\n  EditorUI *v7; // x19\n  cocos2d::CCArray *v8; // x1\n  EditorUI *v9; // x19\n  cocos2d::CCArray *v10; // x1\n  EditorUI *v11; // x19\n  cocos2d::CCArray *v12; // x0\n\n  if ( *(_QWORD *)(this + 1016) )\n  {\n    v2 = this;\n    this = (*(unsigned int (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2) - 1;\n    switch ( (int)this )\n    {\n      case 0:\n        this = EditorUI::dynamicGroupUpdate(*(EditorUI **)(v2 + 1016), 1u);\n        break;\n      case 1:\n        this = EditorUI::dynamicGroupUpdate(*(EditorUI **)(v2 + 1016), 0);\n        break;\n      case 2:\n        this = EditorUI::createLoop(*(EditorUI **)(v2 + 1016));\n        break;\n      case 3:\n        v3 = *(EditorUI **)(v2 + 1016);\n        SelectedObjects = EditorUI::getSelectedObjects(v3);\n        this = EditorUI::alignObjectsOnAxis((cocos2d::CCDictionary ***)v3, SelectedObjects, 0);\n        break;\n      case 4:\n        v5 = *(EditorUI **)(v2 + 1016);\n        v6 = EditorUI::getSelectedObjects(v5);\n        this = EditorUI::alignObjectsOnAxis((cocos2d::CCDictionary ***)v5, v6, 1u);\n        break;\n      case 5:\n        v7 = *(EditorUI **)(v2 + 1016);\n        v8 = EditorUI::getSelectedObjects(v7);\n        this = EditorUI::alignObjects((cocos2d::CCDictionary ***)v7, v8, 0);\n        break;\n      case 6:\n        v9 = *(EditorUI **)(v2 + 1016);\n        v10 = EditorUI::getSelectedObjects(v9);\n        this = EditorUI::alignObjects((cocos2d::CCDictionary ***)v9, v10, 1u);\n        break;\n      case 7:\n        this = EditorUI::selectAll(*(LevelEditorLayer ***)(v2 + 1016));\n        break;\n      case 8:\n        this = EditorUI::selectAllWithDirection(*(LevelEditorLayer ***)(v2 + 1016), 1u);\n        break;\n      case 9:\n        this = EditorUI::selectAllWithDirection(*(LevelEditorLayer ***)(v2 + 1016), 0);\n        break;\n      case 10:\n        this = EditorUI::assignNewGroups(*(EditorUI **)(v2 + 1016), 0);\n        break;\n      case 11:\n        this = EditorUI::assignNewGroups(*(EditorUI **)(v2 + 1016), 1u);\n        break;\n      case 12:\n        this = EditorUI::doCopyObjects(*(EditorUI **)(v2 + 1016), 1u);\n        break;\n      case 13:\n        this = EditorUI::doPasteObjects(*(EditorUI **)(v2 + 1016), 1u);\n        break;\n      case 14:\n        v11 = *(EditorUI **)(v2 + 1016);\n        v12 = EditorUI::getSelectedObjects(v11);\n        this = (__int64)EditorUI::createRockBases(v11, v12);\n        break;\n      case 15:\n        this = LevelEditorLayer::unlockAllLayers(*(_QWORD *)(*(_QWORD *)(v2 + 1016) + 1440LL));\n        break;\n      case 16:\n        this = LevelEditorLayer::resetUnusedColorChannels(*(LevelEditorLayer **)(*(_QWORD *)(v2 + 1016) + 1440LL));\n        break;\n      case 17:\n        this = EditorUI::uncheckPortals(*(LevelEditorLayer ***)(v2 + 1016));\n        break;\n      case 18:\n        this = EditorUI::createGradientFromSelection(*(EditorUI **)(v2 + 1016));\n        break;\n      default:\n        return this;\n    }\n  }\n  return this;\n}", "assembly": "; \n; EditorCommandsPopup::onCommand from 0xcbbf6c to 0xcbc17c (528 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x88fc0\n; > EditorCommandsPopup::addCommandButton @ 0xcbc60c\n; > <???> @ 0x1543988\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 13:06:15 +0000\n; \nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0xcbbf6c\nMOV             X29, SP                                                ; +0x4, 0xcbbf70\nSTR             X19, [SP,#0x20+var_10]                                 ; +0x8, 0xcbbf74\nLDR             X2, [X0,#0x3F8]                                        ; +0xc, 0xcbbf78\nCBZ             X2, def_CBBFC0; jumptable 0000000000CBBFC0 default case ; +0x10, 0xcbbf7c\nLDR             X2, [X1]                                               ; +0x14, 0xcbbf80\nMOV             X19, X0                                                ; +0x18, 0xcbbf84\nMOV             X0, X1                                                 ; +0x1c, 0xcbbf88\nLDR             X1, [X2,#0x40]                                         ; +0x20, 0xcbbf8c\nBLR             X1                                                     ; +0x24, 0xcbbf90\nSUB             W0, W0, #1; switch 19 cases                            ; +0x28, 0xcbbf94\nCMP             W0, #0x12                                              ; +0x2c, 0xcbbf98\nB.LS            loc_CBBFAC                                             ; +0x30, 0xcbbf9c\nLDR             X19, [SP,#0x20+var_10]; jumptable 0000000000CBBFC0 default case ; +0x34, 0xcbbfa0\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x38, 0xcbbfa4\nRET                                                                    ; +0x3c, 0xcbbfa8\nADRL            X1, jpt_CBBFC0                                         ; +0x40, 0xcbbfac\nLDRB            W0, [X1,W0,UXTW]                                       ; +0x48, 0xcbbfb4\nADR             X1, loc_CBBFC4; jumptable 0000000000CBBFC0 case 18     ; +0x4c, 0xcbbfb8\nADD             X0, X1, W0,SXTB#2                                      ; +0x50, 0xcbbfbc\nBR              X0; switch jump                                        ; +0x54, 0xcbbfc0\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 18   ; +0x58, 0xcbbfc4\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x5c, 0xcbbfc8\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x60, 0xcbbfcc\nB               _ZN8EditorUI14uncheckPortalsEv; EditorUI::uncheckPortals(void) ; +0x64, 0xcbbfd0\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 19   ; +0x68, 0xcbbfd4\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x6c, 0xcbbfd8\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x70, 0xcbbfdc\nB               _ZN8EditorUI27createGradientFromSelectionEv; EditorUI::createGradientFromSelection(void) ; +0x74, 0xcbbfe0\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 1    ; +0x78, 0xcbbfe4\nMOV             W1, #1; bool                                           ; +0x7c, 0xcbbfe8\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x80, 0xcbbfec\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x84, 0xcbbff0\nB               _ZN8EditorUI18dynamicGroupUpdateEb; EditorUI::dynamicGroupUpdate(bool) ; +0x88, 0xcbbff4\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 2    ; +0x8c, 0xcbbff8\nMOV             W1, #0; bool                                           ; +0x90, 0xcbbffc\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x94, 0xcbc000\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x98, 0xcbc004\nB               _ZN8EditorUI18dynamicGroupUpdateEb; EditorUI::dynamicGroupUpdate(bool) ; +0x9c, 0xcbc008\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 3    ; +0xa0, 0xcbc00c\nLDR             X19, [SP,#0x20+var_10]                                 ; +0xa4, 0xcbc010\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0xa8, 0xcbc014\nB               _ZN8EditorUI10createLoopEv; EditorUI::createLoop(void) ; +0xac, 0xcbc018\nLDR             X19, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 4   ; +0xb0, 0xcbc01c\nMOV             X0, X19; this                                          ; +0xb4, 0xcbc020\nBL              _ZN8EditorUI18getSelectedObjectsEv; EditorUI::getSelectedObjects(void) ; +0xb8, 0xcbc024\nMOV             X1, X0; cocos2d::CCArray *                             ; +0xbc, 0xcbc028\nMOV             X0, X19; this                                          ; +0xc0, 0xcbc02c\nLDR             X19, [SP,#0x20+var_10]                                 ; +0xc4, 0xcbc030\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0xc8, 0xcbc034\nMOV             W2, #0; bool                                           ; +0xcc, 0xcbc038\nB               _ZN8EditorUI18alignObjectsOnAxisEPN7cocos2d7CCArrayEb; EditorUI::alignObjectsOnAxis(cocos2d::CCArray *,bool) ; +0xd0, 0xcbc03c\nLDR             X19, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 5   ; +0xd4, 0xcbc040\nMOV             X0, X19; this                                          ; +0xd8, 0xcbc044\nBL              _ZN8EditorUI18getSelectedObjectsEv; EditorUI::getSelectedObjects(void) ; +0xdc, 0xcbc048\nMOV             X1, X0; cocos2d::CCArray *                             ; +0xe0, 0xcbc04c\nMOV             X0, X19; this                                          ; +0xe4, 0xcbc050\nLDR             X19, [SP,#0x20+var_10]                                 ; +0xe8, 0xcbc054\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0xec, 0xcbc058\nMOV             W2, #1; bool                                           ; +0xf0, 0xcbc05c\nB               _ZN8EditorUI18alignObjectsOnAxisEPN7cocos2d7CCArrayEb; EditorUI::alignObjectsOnAxis(cocos2d::CCArray *,bool) ; +0xf4, 0xcbc060\nLDR             X19, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 6   ; +0xf8, 0xcbc064\nMOV             X0, X19; this                                          ; +0xfc, 0xcbc068\nBL              _ZN8EditorUI18getSelectedObjectsEv; EditorUI::getSelectedObjects(void) ; +0x100, 0xcbc06c\nMOV             X1, X0; cocos2d::CCArray *                             ; +0x104, 0xcbc070\nMOV             X0, X19; this                                          ; +0x108, 0xcbc074\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x10c, 0xcbc078\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x110, 0xcbc07c\nMOV             W2, #0; bool                                           ; +0x114, 0xcbc080\nB               _ZN8EditorUI12alignObjectsEPN7cocos2d7CCArrayEb; EditorUI::alignObjects(cocos2d::CCArray *,bool) ; +0x118, 0xcbc084\nLDR             X19, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 7   ; +0x11c, 0xcbc088\nMOV             X0, X19; this                                          ; +0x120, 0xcbc08c\nBL              _ZN8EditorUI18getSelectedObjectsEv; EditorUI::getSelectedObjects(void) ; +0x124, 0xcbc090\nMOV             X1, X0; cocos2d::CCArray *                             ; +0x128, 0xcbc094\nMOV             X0, X19; this                                          ; +0x12c, 0xcbc098\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x130, 0xcbc09c\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x134, 0xcbc0a0\nMOV             W2, #1; bool                                           ; +0x138, 0xcbc0a4\nB               _ZN8EditorUI12alignObjectsEPN7cocos2d7CCArrayEb; EditorUI::alignObjects(cocos2d::CCArray *,bool) ; +0x13c, 0xcbc0a8\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 8    ; +0x140, 0xcbc0ac\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x144, 0xcbc0b0\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x148, 0xcbc0b4\nB               _ZN8EditorUI9selectAllEv; EditorUI::selectAll(void)    ; +0x14c, 0xcbc0b8\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 9    ; +0x150, 0xcbc0bc\nMOV             W1, #1; bool                                           ; +0x154, 0xcbc0c0\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x158, 0xcbc0c4\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x15c, 0xcbc0c8\nB               _ZN8EditorUI22selectAllWithDirectionEb; EditorUI::selectAllWithDirection(bool) ; +0x160, 0xcbc0cc\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 10   ; +0x164, 0xcbc0d0\nMOV             W1, #0; bool                                           ; +0x168, 0xcbc0d4\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x16c, 0xcbc0d8\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x170, 0xcbc0dc\nB               _ZN8EditorUI22selectAllWithDirectionEb; EditorUI::selectAllWithDirection(bool) ; +0x174, 0xcbc0e0\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 11   ; +0x178, 0xcbc0e4\nMOV             W1, #0; bool                                           ; +0x17c, 0xcbc0e8\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x180, 0xcbc0ec\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x184, 0xcbc0f0\nB               _ZN8EditorUI15assignNewGroupsEb; EditorUI::assignNewGroups(bool) ; +0x188, 0xcbc0f4\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 12   ; +0x18c, 0xcbc0f8\nMOV             W1, #1; bool                                           ; +0x190, 0xcbc0fc\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x194, 0xcbc100\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x198, 0xcbc104\nB               _ZN8EditorUI15assignNewGroupsEb; EditorUI::assignNewGroups(bool) ; +0x19c, 0xcbc108\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 13   ; +0x1a0, 0xcbc10c\nMOV             W1, #1; bool                                           ; +0x1a4, 0xcbc110\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x1a8, 0xcbc114\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x1ac, 0xcbc118\nB               _ZN8EditorUI13doCopyObjectsEb; EditorUI::doCopyObjects(bool) ; +0x1b0, 0xcbc11c\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 14   ; +0x1b4, 0xcbc120\nMOV             W1, #1; bool                                           ; +0x1b8, 0xcbc124\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x1bc, 0xcbc128\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x1c0, 0xcbc12c\nB               _ZN8EditorUI14doPasteObjectsEb; EditorUI::doPasteObjects(bool) ; +0x1c4, 0xcbc130\nLDR             X19, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 15  ; +0x1c8, 0xcbc134\nMOV             X0, X19; this                                          ; +0x1cc, 0xcbc138\nBL              _ZN8EditorUI18getSelectedObjectsEv; EditorUI::getSelectedObjects(void) ; +0x1d0, 0xcbc13c\nMOV             X1, X0; cocos2d::CCArray *                             ; +0x1d4, 0xcbc140\nMOV             X0, X19; this                                          ; +0x1d8, 0xcbc144\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x1dc, 0xcbc148\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x1e0, 0xcbc14c\nB               _ZN8EditorUI15createRockBasesEPN7cocos2d7CCArrayE; EditorUI::createRockBases(cocos2d::CCArray *) ; +0x1e4, 0xcbc150\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 16   ; +0x1e8, 0xcbc154\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x1ec, 0xcbc158\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x1f0, 0xcbc15c\nLDR             X0, [X0,#0x5A0]; this                                  ; +0x1f4, 0xcbc160\nB               _ZN16LevelEditorLayer15unlockAllLayersEv; LevelEditorLayer::unlockAllLayers(void) ; +0x1f8, 0xcbc164\nLDR             X0, [X19,#0x3F8]; jumptable 0000000000CBBFC0 case 17   ; +0x1fc, 0xcbc168\nLDR             X19, [SP,#0x20+var_10]                                 ; +0x200, 0xcbc16c\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x204, 0xcbc170\nLDR             X0, [X0,#0x5A0]; this                                  ; +0x208, 0xcbc174\nB               _ZN16LevelEditorLayer24resetUnusedColorChannelsEv; LevelEditorLayer::resetUnusedColorChannels(void) ; +0x20c, 0xcbc178", "xrefs": ["<???> @ 0x88fc0", "EditorCommandsPopup::addCommandButton @ 0xcbc60c", "<???> @ 0x1543988"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}