{"type": "func", "start": 4295174688, "end": 4295175237, "name": "EditorUI::deleteObject", "pseudocode": "// \n// EditorUI::deleteObject from 0x100032a20 to 0x100032c45 (549 bytes)\n// \n// 8 xrefs:\n// > EditorUI::onDeleteSelected @ 0x10000c216\n// > EditorUI::onDeleteSelected @ 0x10000c27a\n// > EditorUI::onDelete @ 0x10002de4d\n// > EditorUI::deleteSmartBlocksFromObjects @ 0x1000346dd\n// > EditorUI::deleteTypeFromObjects @ 0x10003479d\n// > EditorUI::addObjectsToSmartTemplate @ 0x100042691\n// > EditorUI::createSmartObjectsFromTemplate @ 0x1000432e5\n// > EditorUI::createSmartObjectsFromType @ 0x1000441a5\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall EditorUI::deleteObject(EditorUI *a1, GameObject *a2, bool a3)\n{\n  GameObject *m_selectedObject; // rax\n  GJRotationControl *m_rotationControl; // r15\n  cocos2d::CCSprite *m_controlSprite; // r14\n  cocos2d::CCSpriteFrameCache *v8; // rax\n  cocos2d::CCSpriteFrame *v9; // rax\n  GJRotationControlDelegate *m_delegate; // rdi\n  char v11; // al\n  GJScaleControl *m_scaleControl; // rdi\n  GJScaleControlDelegate *v13; // rax\n  GJTransformControl *m_transformControl; // rax\n  GJTransformControlDelegate *v15; // rdi\n\n  if ( a2 )\n  {\n    a2->m_wasSelected = a2->m_isSelected;\n    m_selectedObject = a1->m_selectedObject;\n    if ( m_selectedObject && m_selectedObject->m_uniqueID == a2->m_uniqueID )\n    {\n      EditorUI::deselectObject_1(a1);\n      a1->m_canActivateControls = 1;\n    }\n    else\n    {\n      GameObject::deselectObject(a2);\n      if ( (unsigned __int8)sub_100720160(a1->m_selectedObjects, a2) )\n      {\n        a1->m_canActivateControls = 1;\n        sub_100720220(a1->m_selectedObjects, a2, 1);\n      }\n    }\n    LevelEditorLayer::removeObject(a1->m_editorLayer, a2, a3);\n    a1->m_rotationTouchID = -1;\n    if ( ((unsigned __int8 (__fastcall *)(GJRotationControl *))a1->m_rotationControl->isVisible)(a1->m_rotationControl) )\n    {\n      ((void (__fastcall *)(GJRotationControl *, _QWORD))a1->m_rotationControl->setVisible)(a1->m_rotationControl, 0);\n      m_rotationControl = a1->m_rotationControl;\n      if ( m_rotationControl->m_touchID != -1 )\n      {\n        m_rotationControl->m_touchID = -1;\n        m_controlSprite = m_rotationControl->m_controlSprite;\n        v8 = cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache();\n        v9 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v8, \"GJ_rotationControlBtn01_001.png\");\n        ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCSpriteFrame *))m_controlSprite->setDisplayFrame)(\n          m_controlSprite,\n          v9);\n        m_delegate = m_rotationControl->m_delegate;\n        if ( m_delegate )\n          ((void (__fastcall *)(GJRotationControlDelegate *))m_delegate->angleChangeEnded)(m_delegate);\n      }\n    }\n    v11 = ((__int64 (__fastcall *)(GJScaleControl *))a1->m_scaleControl->isVisible)(a1->m_scaleControl);\n    m_scaleControl = a1->m_scaleControl;\n    if ( v11 )\n    {\n      ((void (__fastcall *)(GJScaleControl *, _QWORD))m_scaleControl->setVisible)(m_scaleControl, 0);\n      m_scaleControl = a1->m_scaleControl;\n      if ( m_scaleControl->m_touchID != -1 )\n      {\n        m_scaleControl->m_touchID = -1;\n        v13 = m_scaleControl->m_delegate;\n        if ( v13 )\n        {\n          ((void (__fastcall *)(GJScaleControlDelegate *))v13->scaleChangeEnded)(m_scaleControl->m_delegate);\n          m_scaleControl = a1->m_scaleControl;\n        }\n      }\n      *(_QWORD *)&m_scaleControl->m_upperBound = 0x3F00000040000000LL;\n    }\n    EditorUI::updateEditButtonColor(a1, m_scaleControl->m_senderTag, (cocos2d::ccColor3B)-1);\n    a1->m_scaleControl->m_senderTag = 0;\n    if ( ((unsigned __int8 (__fastcall *)(GJTransformControl *))a1->m_transformControl->isVisible)(a1->m_transformControl) )\n    {\n      ((void (__fastcall *)(GJTransformControl *, _QWORD))a1->m_transformControl->setVisible)(a1->m_transformControl, 0);\n      m_transformControl = a1->m_transformControl;\n      if ( m_transformControl->m_touchID != -1 )\n      {\n        m_transformControl->m_touchID = -1;\n        v15 = m_transformControl->m_delegate;\n        if ( v15 )\n          ((void (__fastcall *)(GJTransformControlDelegate *))v15->transformChangeEnded)(v15);\n      }\n    }\n    EditorUI::updateEditButtonColor(a1, 31, (cocos2d::ccColor3B)-1);\n  }\n}", "assembly": "; \n; EditorUI::deleteObject from 0x100032a20 to 0x100032c45 (549 bytes)\n; \n; 8 xrefs:\n; > EditorUI::onDeleteSelected @ 0x10000c216\n; > EditorUI::onDeleteSelected @ 0x10000c27a\n; > EditorUI::onDelete @ 0x10002de4d\n; > EditorUI::deleteSmartBlocksFromObjects @ 0x1000346dd\n; > EditorUI::deleteTypeFromObjects @ 0x10003479d\n; > EditorUI::addObjectsToSmartTemplate @ 0x100042691\n; > EditorUI::createSmartObjectsFromTemplate @ 0x1000432e5\n; > EditorUI::createSmartObjectsFromType @ 0x1000441a5\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\ntest    rsi, rsi                                                       ; +0x0, 0x100032a20\njz      locret_100032C44                                               ; +0x3, 0x100032a23\npush    rbp                                                            ; +0x9, 0x100032a29\nmov     rbp, rsp                                                       ; +0xa, 0x100032a2a\npush    r15                                                            ; +0xd, 0x100032a2d\npush    r14                                                            ; +0xf, 0x100032a2f\npush    rbx                                                            ; +0x11, 0x100032a31\npush    rax                                                            ; +0x12, 0x100032a32\nmov     r15d, edx                                                      ; +0x13, 0x100032a33\nmov     r14, rsi                                                       ; +0x16, 0x100032a36\nmov     rbx, rdi                                                       ; +0x19, 0x100032a39\nmovzx   eax, byte ptr [rsi+46Dh]                                       ; +0x1c, 0x100032a3c\nmov     [rsi+46Ch], al                                                 ; +0x23, 0x100032a43\nmov     rax, [rdi+520h]                                                ; +0x29, 0x100032a49\ntest    rax, rax                                                       ; +0x30, 0x100032a50\njz      short loc_100032A75                                            ; +0x33, 0x100032a53\nmov     eax, [rax+394h]                                                ; +0x35, 0x100032a55\ncmp     eax, [r14+394h]                                                ; +0x3b, 0x100032a5b\njnz     short loc_100032A75                                            ; +0x42, 0x100032a62\nmov     rdi, rbx                                                       ; +0x44, 0x100032a64\ncall    EditorUI__deselectObject_1                                     ; +0x47, 0x100032a67\nmov     byte ptr [rbx+2B0h], 1                                         ; +0x4c, 0x100032a6c\njmp     short loc_100032AAB                                            ; +0x53, 0x100032a73\nmov     rdi, r14                                                       ; +0x55, 0x100032a75\ncall    GameObject__deselectObject                                     ; +0x58, 0x100032a78\nmov     rdi, [rbx+328h]                                                ; +0x5d, 0x100032a7d\nmov     rsi, r14                                                       ; +0x64, 0x100032a84\ncall    sub_100720160                                                  ; +0x67, 0x100032a87\ntest    al, al                                                         ; +0x6c, 0x100032a8c\njz      short loc_100032AAB                                            ; +0x6e, 0x100032a8e\nmov     byte ptr [rbx+2B0h], 1                                         ; +0x70, 0x100032a90\nmov     rdi, [rbx+328h]                                                ; +0x77, 0x100032a97\nmov     rsi, r14                                                       ; +0x7e, 0x100032a9e\nmov     edx, 1                                                         ; +0x81, 0x100032aa1\ncall    sub_100720220                                                  ; +0x86, 0x100032aa6\nmov     rdi, [rbx+4E8h]                                                ; +0x8b, 0x100032aab\nmovzx   edx, r15b                                                      ; +0x92, 0x100032ab2\nmov     rsi, r14                                                       ; +0x96, 0x100032ab6\ncall    LevelEditorLayer__removeObject                                 ; +0x99, 0x100032ab9\nmov     dword ptr [rbx+288h], 0FFFFFFFFh                               ; +0x9e, 0x100032abe\nmov     rdi, [rbx+2A0h]                                                ; +0xa8, 0x100032ac8\nmov     rax, [rdi]                                                     ; +0xaf, 0x100032acf\ncall    qword ptr [rax+150h]                                           ; +0xb2, 0x100032ad2\ntest    al, al                                                         ; +0xb8, 0x100032ad8\njz      short loc_100032B46                                            ; +0xba, 0x100032ada\nmov     rdi, [rbx+2A0h]                                                ; +0xbc, 0x100032adc\nmov     rax, [rdi]                                                     ; +0xc3, 0x100032ae3\nxor     esi, esi                                                       ; +0xc6, 0x100032ae6\ncall    qword ptr [rax+148h]                                           ; +0xc8, 0x100032ae8\nmov     r15, [rbx+2A0h]                                                ; +0xce, 0x100032aee\ncmp     dword ptr [r15+1B8h], 0FFFFFFFFh                               ; +0xd5, 0x100032af5\njz      short loc_100032B46                                            ; +0xdd, 0x100032afd\nmov     dword ptr [r15+1B8h], 0FFFFFFFFh                               ; +0xdf, 0x100032aff\nmov     r14, [r15+1A8h]                                                ; +0xea, 0x100032b0a\ncall    cocos2d__CCSpriteFrameCache__sharedSpriteFrameCache            ; +0xf1, 0x100032b11\nlea     rsi, aGjRotationcont; \"GJ_rotationControlBtn01_001.png\"        ; +0xf6, 0x100032b16\nmov     rdi, rax                                                       ; +0xfd, 0x100032b1d\ncall    cocos2d__CCSpriteFrameCache__spriteFrameByName                 ; +0x100, 0x100032b20\nmov     rcx, [r14]                                                     ; +0x105, 0x100032b25\nmov     rdi, r14                                                       ; +0x108, 0x100032b28\nmov     rsi, rax                                                       ; +0x10b, 0x100032b2b\ncall    qword ptr [rcx+478h]                                           ; +0x10e, 0x100032b2e\nmov     rdi, [r15+1C0h]                                                ; +0x114, 0x100032b34\ntest    rdi, rdi                                                       ; +0x11b, 0x100032b3b\njz      short loc_100032B46                                            ; +0x11e, 0x100032b3e\nmov     rax, [rdi]                                                     ; +0x120, 0x100032b40\ncall    qword ptr [rax+10h]                                            ; +0x123, 0x100032b43\nmov     rdi, [rbx+2B8h]                                                ; +0x126, 0x100032b46\nmov     rax, [rdi]                                                     ; +0x12d, 0x100032b4d\ncall    qword ptr [rax+150h]                                           ; +0x130, 0x100032b50\nmov     rdi, [rbx+2B8h]                                                ; +0x136, 0x100032b56\ntest    al, al                                                         ; +0x13d, 0x100032b5d\njz      short loc_100032BB2                                            ; +0x13f, 0x100032b5f\nmov     rax, [rdi]                                                     ; +0x141, 0x100032b61\nxor     esi, esi                                                       ; +0x144, 0x100032b64\ncall    qword ptr [rax+148h]                                           ; +0x146, 0x100032b66\nmov     rdi, [rbx+2B8h]                                                ; +0x14c, 0x100032b6c\ncmp     dword ptr [rdi+1B0h], 0FFFFFFFFh                               ; +0x153, 0x100032b73\njz      short loc_100032BA2                                            ; +0x15a, 0x100032b7a\nmov     dword ptr [rdi+1B0h], 0FFFFFFFFh                               ; +0x15c, 0x100032b7c\nmov     rax, [rdi+1E8h]                                                ; +0x166, 0x100032b86\ntest    rax, rax                                                       ; +0x16d, 0x100032b8d\njz      short loc_100032BA2                                            ; +0x170, 0x100032b90\nmov     rcx, [rax]                                                     ; +0x172, 0x100032b92\nmov     rdi, rax                                                       ; +0x175, 0x100032b95\ncall    qword ptr [rcx+20h]                                            ; +0x178, 0x100032b98\nmov     rdi, [rbx+2B8h]                                                ; +0x17b, 0x100032b9b\nmovsd   xmm0, cs:qword_100815440                                       ; +0x182, 0x100032ba2\nmovsd   qword ptr [rdi+1F0h], xmm0                                     ; +0x18a, 0x100032baa\nmov     esi, [rdi+1F8h]                                                ; +0x192, 0x100032bb2\nmov     rdi, rbx                                                       ; +0x198, 0x100032bb8\nmov     edx, 0FFFFFFh                                                  ; +0x19b, 0x100032bbb\ncall    EditorUI__updateEditButtonColor                                ; +0x1a0, 0x100032bc0\nmov     rax, [rbx+2B8h]                                                ; +0x1a5, 0x100032bc5\nmov     dword ptr [rax+1F8h], 0                                        ; +0x1ac, 0x100032bcc\nmov     rdi, [rbx+2C0h]                                                ; +0x1b6, 0x100032bd6\nmov     rax, [rdi]                                                     ; +0x1bd, 0x100032bdd\ncall    qword ptr [rax+150h]                                           ; +0x1c0, 0x100032be0\ntest    al, al                                                         ; +0x1c6, 0x100032be6\njz      short loc_100032C28                                            ; +0x1c8, 0x100032be8\nmov     rdi, [rbx+2C0h]                                                ; +0x1ca, 0x100032bea\nmov     rax, [rdi]                                                     ; +0x1d1, 0x100032bf1\nxor     esi, esi                                                       ; +0x1d4, 0x100032bf4\ncall    qword ptr [rax+148h]                                           ; +0x1d6, 0x100032bf6\nmov     rax, [rbx+2C0h]                                                ; +0x1dc, 0x100032bfc\ncmp     dword ptr [rax+1B0h], 0FFFFFFFFh                               ; +0x1e3, 0x100032c03\njz      short loc_100032C28                                            ; +0x1ea, 0x100032c0a\nmov     dword ptr [rax+1B0h], 0FFFFFFFFh                               ; +0x1ec, 0x100032c0c\nmov     rdi, [rax+1B8h]                                                ; +0x1f6, 0x100032c16\ntest    rdi, rdi                                                       ; +0x1fd, 0x100032c1d\njz      short loc_100032C28                                            ; +0x200, 0x100032c20\nmov     rax, [rdi]                                                     ; +0x202, 0x100032c22\ncall    qword ptr [rax+58h]                                            ; +0x205, 0x100032c25\nmov     rdi, rbx                                                       ; +0x208, 0x100032c28\nmov     esi, 1Fh                                                       ; +0x20b, 0x100032c2b\nmov     edx, 0FFFFFFh                                                  ; +0x210, 0x100032c30\nadd     rsp, 8                                                         ; +0x215, 0x100032c35\npop     rbx                                                            ; +0x219, 0x100032c39\npop     r14                                                            ; +0x21a, 0x100032c3a\npop     r15                                                            ; +0x21c, 0x100032c3c\npop     rbp                                                            ; +0x21e, 0x100032c3e\njmp     EditorUI__updateEditButtonColor                                ; +0x21f, 0x100032c3f\nretn                                                                   ; +0x224, 0x100032c44", "xrefs": ["EditorUI::onDeleteSelected @ 0x10000c216", "EditorUI::onDeleteSelected @ 0x10000c27a", "EditorUI::onDelete @ 0x10002de4d", "EditorUI::deleteSmartBlocksFromObjects @ 0x1000346dd", "EditorUI::deleteTypeFromObjects @ 0x10003479d", "EditorUI::addObjectsToSmartTemplate @ 0x100042691", "EditorUI::createSmartObjectsFromTemplate @ 0x1000432e5", "EditorUI::createSmartObjectsFromType @ 0x1000441a5"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}