{"type": "func", "start": 4769832, "end": 4770084, "name": "EditorUI::onDeleteSelected", "pseudocode": "// \n// EditorUI::onDeleteSelected from 0x48c828 to 0x48c924 (252 bytes)\n// \n// 1 xrefs:\n// > EditorUI::handleEditorAction @ 0x6f1ad4\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:49:31 +0000\n// \n\nint __fastcall EditorUI::onDeleteSelected(EditorUI *this, cocos2d::CCObject *a2)\n{\n  EditorSFXManager *v3; // r0\n  EditorSFXManager *v4; // r0\n  unsigned int v5; // r6\n  cocos2d::CCArray *v6; // r0\n  cocos2d::CCArray *v7; // r5\n  cocos2d::CCObject *v8; // r7\n  unsigned int v9; // r6\n  int v10; // r7\n  unsigned int v11; // r1\n  GameObject *v12; // r1\n  UndoObject *v13; // r0\n  GameObject *v14; // r1\n\n  v3 = (EditorSFXManager *)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 167));\n  if ( v3 )\n  {\n    v4 = (EditorSFXManager *)EditorSFXManager::sharedState(v3);\n    EditorSFXManager::playAction(v4, 102);\n    v5 = 0;\n    v6 = (cocos2d::CCArray *)EditorBuildStats::noteAction((EditorBuildStats *)(*((_DWORD *)this + 236) + 12104));\n    v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v6);\n    while ( v5 < cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 167)) )\n    {\n      v8 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 167), v5);\n      if ( EditorUI::shouldDeleteObject(this, v8) )\n        cocos2d::CCArray::addObject(v7, v8);\n      ++v5;\n    }\n    v9 = 0;\n    v10 = 0;\n    while ( v9 < cocos2d::CCArray::count(v7) )\n    {\n      v11 = v9++;\n      v12 = (GameObject *)cocos2d::CCArray::objectAtIndex(v7, v11);\n      if ( *((_DWORD *)v12 + 223) == 747 )\n        v10 = 1;\n      EditorUI::deleteObject(this, v12, 1);\n    }\n    *(_DWORD *)(*((_DWORD *)this + 236) + 12112) += cocos2d::CCArray::count(v7);\n    v13 = UndoObject::createWithArray(v7, 4);\n    LevelEditorLayer::addToUndoList(*((cocos2d::CCArray ***)this + 236), v13, 0);\n    if ( v10 )\n      EditorUI::deselectTargetPortals(this);\n  }\n  else\n  {\n    v14 = *((GameObject **)this + 249);\n    if ( v14 && EditorUI::shouldDeleteObject(this, v14) )\n    {\n      EditorBuildStats::noteAction((EditorBuildStats *)(*((_DWORD *)this + 236) + 12104));\n      EditorUI::deleteObject(this, *((GameObject **)this + 249), 0);\n    }\n  }\n  EditorUI::updateSpecialUIElements((cocos2d::CCArray **)this);\n  return EditorUI::updateButtons((cocos2d::CCArray **)this);\n}", "assembly": "; \n; EditorUI::onDeleteSelected from 0x48c828 to 0x48c924 (252 bytes)\n; \n; 1 xrefs:\n; > EditorUI::handleEditorAction @ 0x6f1ad4\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:49:31 +0000\n; \nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x48c828\nMOV             R4, R0                                                 ; +0x4, 0x48c82c\nLDR.W           R0, [R0,#0x29C]; this                                  ; +0x6, 0x48c82e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xa, 0x48c832\nMOV             R5, R0                                                 ; +0xe, 0x48c836\nCMP             R0, #0                                                 ; +0x10, 0x48c838\nBEQ             loc_48C8EC                                             ; +0x12, 0x48c83a\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x14, 0x48c83c\nMOVS            R1, #0x66 ; 'f'; int                                   ; +0x18, 0x48c840\nBL              _ZN16EditorSFXManager10playActionEi; EditorSFXManager::playAction(int) ; +0x1a, 0x48c842\nLDR.W           R0, [R4,#0x3B0]                                        ; +0x1e, 0x48c846\nMOVS            R6, #0                                                 ; +0x22, 0x48c84a\nADD.W           R0, R0, #0x2F40                                        ; +0x24, 0x48c84c\nADDS            R0, #8; this                                           ; +0x28, 0x48c850\nBL              _ZN16EditorBuildStats10noteActionEv; EditorBuildStats::noteAction(void) ; +0x2a, 0x48c852\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x2e, 0x48c856\nMOV             R5, R0                                                 ; +0x32, 0x48c85a\nLDR.W           R0, [R4,#0x29C]; this                                  ; +0x34, 0x48c85c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x38, 0x48c860\nCMP             R6, R0                                                 ; +0x3c, 0x48c864\nBCS             loc_48C88A                                             ; +0x3e, 0x48c866\nMOV             R1, R6; unsigned int                                   ; +0x40, 0x48c868\nLDR.W           R0, [R4,#0x29C]; this                                  ; +0x42, 0x48c86a\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x46, 0x48c86e\nMOV             R7, R0                                                 ; +0x4a, 0x48c872\nMOV             R0, R4; this                                           ; +0x4c, 0x48c874\nMOV             R1, R7; GameObject *                                   ; +0x4e, 0x48c876\nBL              _ZN8EditorUI18shouldDeleteObjectEP10GameObject; EditorUI::shouldDeleteObject(GameObject *) ; +0x50, 0x48c878\nCBZ             R0, loc_48C886                                         ; +0x54, 0x48c87c\nMOV             R0, R5; this                                           ; +0x56, 0x48c87e\nMOV             R1, R7; cocos2d::CCObject *                            ; +0x58, 0x48c880\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x5a, 0x48c882\nADDS            R6, #1                                                 ; +0x5e, 0x48c886\nB               loc_48C85C                                             ; +0x60, 0x48c888\nMOVS            R6, #0                                                 ; +0x62, 0x48c88a\nMOVW            R8, #0x2EB                                             ; +0x64, 0x48c88c\nMOV             R7, R6                                                 ; +0x68, 0x48c890\nMOV             R0, R5; this                                           ; +0x6a, 0x48c892\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x6c, 0x48c894\nCMP             R6, R0                                                 ; +0x70, 0x48c898\nMOV             R0, R5; this                                           ; +0x72, 0x48c89a\nBCS             loc_48C8BC                                             ; +0x74, 0x48c89c\nMOV             R1, R6; unsigned int                                   ; +0x76, 0x48c89e\nADDS            R6, #1                                                 ; +0x78, 0x48c8a0\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x7a, 0x48c8a2\nMOVS            R2, #1; bool                                           ; +0x7e, 0x48c8a6\nLDR.W           R3, [R0,#0x37C]                                        ; +0x80, 0x48c8a8\nMOV             R1, R0; GameObject *                                   ; +0x84, 0x48c8ac\nMOV             R0, R4; this                                           ; +0x86, 0x48c8ae\nCMP             R3, R8                                                 ; +0x88, 0x48c8b0\nIT EQ                                                                  ; +0x8a, 0x48c8b2\nMOVEQ           R7, #1                                                 ; +0x8c, 0x48c8b4\nBL              _ZN8EditorUI12deleteObjectEP10GameObjectb; EditorUI::deleteObject(GameObject *,bool) ; +0x8e, 0x48c8b6\nB               loc_48C892                                             ; +0x92, 0x48c8ba\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x94, 0x48c8bc\nLDR.W           R1, [R4,#0x3B0]                                        ; +0x98, 0x48c8c0\nMOVW            R2, #0x2F50                                            ; +0x9c, 0x48c8c4\nLDR             R3, [R1,R2]                                            ; +0xa0, 0x48c8c8\nADD             R0, R3                                                 ; +0xa2, 0x48c8ca\nSTR             R0, [R1,R2]                                            ; +0xa4, 0x48c8cc\nMOVS            R1, #4                                                 ; +0xa6, 0x48c8ce\nMOV             R0, R5                                                 ; +0xa8, 0x48c8d0\nBL              _ZN10UndoObject15createWithArrayEPN7cocos2d7CCArrayE11UndoCommand; UndoObject::createWithArray(cocos2d::CCArray *,UndoCommand) ; +0xaa, 0x48c8d2\nMOVS            R2, #0; bool                                           ; +0xae, 0x48c8d6\nMOV             R1, R0; UndoObject *                                   ; +0xb0, 0x48c8d8\nLDR.W           R0, [R4,#0x3B0]; this                                  ; +0xb2, 0x48c8da\nBL              _ZN16LevelEditorLayer13addToUndoListEP10UndoObjectb; LevelEditorLayer::addToUndoList(UndoObject *,bool) ; +0xb6, 0x48c8de\nCBZ             R7, loc_48C914                                         ; +0xba, 0x48c8e2\nMOV             R0, R4; this                                           ; +0xbc, 0x48c8e4\nBL              _ZN8EditorUI21deselectTargetPortalsEv; EditorUI::deselectTargetPortals(void) ; +0xbe, 0x48c8e6\nB               loc_48C914                                             ; +0xc2, 0x48c8ea\nLDR.W           R1, [R4,#0x3E4]; GameObject *                          ; +0xc4, 0x48c8ec\nCBZ             R1, loc_48C914                                         ; +0xc8, 0x48c8f0\nMOV             R0, R4; this                                           ; +0xca, 0x48c8f2\nBL              _ZN8EditorUI18shouldDeleteObjectEP10GameObject; EditorUI::shouldDeleteObject(GameObject *) ; +0xcc, 0x48c8f4\nCBZ             R0, loc_48C914                                         ; +0xd0, 0x48c8f8\nLDR.W           R0, [R4,#0x3B0]                                        ; +0xd2, 0x48c8fa\nADD.W           R0, R0, #0x2F40                                        ; +0xd6, 0x48c8fe\nADDS            R0, #8; this                                           ; +0xda, 0x48c902\nBL              _ZN16EditorBuildStats10noteActionEv; EditorBuildStats::noteAction(void) ; +0xdc, 0x48c904\nMOV             R0, R4; this                                           ; +0xe0, 0x48c908\nLDR.W           R1, [R4,#0x3E4]; GameObject *                          ; +0xe2, 0x48c90a\nMOV             R2, R5; bool                                           ; +0xe6, 0x48c90e\nBL              _ZN8EditorUI12deleteObjectEP10GameObjectb; EditorUI::deleteObject(GameObject *,bool) ; +0xe8, 0x48c910\nMOV             R0, R4; this                                           ; +0xec, 0x48c914\nBL              _ZN8EditorUI23updateSpecialUIElementsEv; EditorUI::updateSpecialUIElements(void) ; +0xee, 0x48c916\nMOV             R0, R4; this                                           ; +0xf2, 0x48c91a\nPOP.W           {R4-R8,LR}                                             ; +0xf4, 0x48c91c\nB.W             _ZN8EditorUI13updateButtonsEv; EditorUI::updateButtons(void) ; +0xf8, 0x48c920", "xrefs": ["EditorUI::handleEditorAction @ 0x6f1ad4"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}