{"type": "func", "start": 5370509120, "end": 5370509412, "name": "EditorUI::deleteSmartBlocksFromObjects", "pseudocode": "// \n// EditorUI::deleteSmartBlocksFromObjects from 0x1401b7740 to 0x1401b7864 (292 bytes)\n// \n// 6 xrefs:\n// > EditorUI::createSmartObjectsFromTemplate @ 0x1401b6f1a\n// > EditorUI::createPrefab @ 0x1401b76c6\n// > EditorUI::spriteFromObjectString @ 0x1401f0b11\n// > <???> @ 0x1408a1d64\n// > <???> @ 0x1408a1d74\n// > <???> @ 0x14091a24c\n// \n// This function is hookable on this platform (idp: pc, 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 11:27:58 +0000\n// \n\nunsigned int __fastcall EditorUI::deleteSmartBlocksFromObjects(__int64 a1, cocos2d::CCArray *a2)\n{\n  unsigned int v4; // esi\n  unsigned int result; // eax\n  struct cocos2d::CCObject *v6; // rax\n  struct cocos2d::CCObject *v7; // rbx\n  __int64 v8; // rax\n  cocos2d::CCArray *v9; // rax\n  __int64 v10; // rdx\n  __int64 v11; // rdi\n\n  v4 = 0;\n  result = cocos2d::CCArray::count(a2);\n  if ( result )\n  {\n    do\n    {\n      v6 = cocos2d::CCArray::objectAtIndex(a2, v4);\n      v7 = v6;\n      if ( *((_DWORD *)v6 + 314) == 5 )\n      {\n        v8 = *((int *)v6 + 220);\n        if ( (int)v8 > 0 )\n        {\n          v9 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(*(_QWORD *)(a1 + 1512) + 4256LL), v8);\n          if ( v9 )\n            cocos2d::CCArray::removeObject(v9, v7, 1);\n        }\n        *((_BYTE *)v7 + 1140) = *((_BYTE *)v7 + 1141);\n        EditorUI::deselectObject(a1, v7);\n        LOBYTE(v10) = 1;\n        v11 = *(_QWORD *)(a1 + 1512);\n        (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v7 + 1160LL))(v7, v10);\n        GJBaseGameLayer::removeObjectFromSection(v11, v7);\n        LevelEditorLayer::removeSpecial(v11, v7);\n        *(_BYTE *)(v11 + 15666) = 1;\n        EditorUI::deactivateRotationControl(a1);\n        EditorUI::deactivateScaleControl(a1);\n        EditorUI::deactivateTransformControl(a1);\n        cocos2d::CCArray::removeObjectAtIndex(a2, v4, 1);\n      }\n      else\n      {\n        ++v4;\n      }\n      result = cocos2d::CCArray::count(a2);\n    }\n    while ( v4 < result );\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::deleteSmartBlocksFromObjects from 0x1401b7740 to 0x1401b7864 (292 bytes)\n; \n; 6 xrefs:\n; > EditorUI::createSmartObjectsFromTemplate @ 0x1401b6f1a\n; > EditorUI::createPrefab @ 0x1401b76c6\n; > EditorUI::spriteFromObjectString @ 0x1401f0b11\n; > <???> @ 0x1408a1d64\n; > <???> @ 0x1408a1d74\n; > <???> @ 0x14091a24c\n; \n; This function is hookable on this platform (idp: pc, 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 11:27:58 +0000\n; \nmov     [rsp+arg_10], rbp                                              ; +0x0, 0x1401b7740\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1401b7745\npush    r14                                                            ; +0xa, 0x1401b774a\nsub     rsp, 20h                                                       ; +0xc, 0x1401b774c\nmov     r14, rcx                                                       ; +0x10, 0x1401b7750\nmov     rbp, rdx                                                       ; +0x13, 0x1401b7753\nmov     rcx, rdx                                                       ; +0x16, 0x1401b7756\nxor     esi, esi                                                       ; +0x19, 0x1401b7759\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1b, 0x1401b775b\ntest    eax, eax                                                       ; +0x21, 0x1401b7761\njz      loc_1401B7853                                                  ; +0x23, 0x1401b7763\nmov     [rsp+28h+arg_0], rbx                                           ; +0x29, 0x1401b7769\nmov     [rsp+28h+arg_8], rdi                                           ; +0x2e, 0x1401b776e\nmov     edx, esi                                                       ; +0x33, 0x1401b7773\nmov     rcx, rbp                                                       ; +0x35, 0x1401b7775\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x38, 0x1401b7778\nmov     rbx, rax                                                       ; +0x3e, 0x1401b777e\ncmp     dword ptr [rax+4E8h], 5                                        ; +0x41, 0x1401b7781\njnz     loc_1401B7836                                                  ; +0x48, 0x1401b7788\nmovsxd  rax, dword ptr [rax+370h]                                      ; +0x4e, 0x1401b778e\ntest    eax, eax                                                       ; +0x55, 0x1401b7795\njle     short loc_1401B77C4                                            ; +0x57, 0x1401b7797\nmov     rcx, [r14+5E8h]                                                ; +0x59, 0x1401b7799\nmov     rdx, rax                                                       ; +0x60, 0x1401b77a0\nmov     rcx, [rcx+10A0h]                                               ; +0x63, 0x1401b77a3\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x6a, 0x1401b77aa\ntest    rax, rax                                                       ; +0x70, 0x1401b77b0\njz      short loc_1401B77C4                                            ; +0x73, 0x1401b77b3\nmov     r8b, 1                                                         ; +0x75, 0x1401b77b5\nmov     rdx, rbx                                                       ; +0x78, 0x1401b77b8\nmov     rcx, rax                                                       ; +0x7b, 0x1401b77bb\ncall    cs:?removeObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@_N@Z; cocos2d::CCArray::removeObject(cocos2d::CCObject *,bool) ; +0x7e, 0x1401b77be\nmovzx   eax, byte ptr [rbx+475h]                                       ; +0x84, 0x1401b77c4\nmov     rdx, rbx                                                       ; +0x8b, 0x1401b77cb\nmov     rcx, r14                                                       ; +0x8e, 0x1401b77ce\nmov     [rbx+474h], al                                                 ; +0x91, 0x1401b77d1\ncall    EditorUI__deselectObject                                       ; +0x97, 0x1401b77d7\nmov     rax, [rbx]                                                     ; +0x9c, 0x1401b77dc\nmov     dl, 1                                                          ; +0x9f, 0x1401b77df\nmov     rdi, [r14+5E8h]                                                ; +0xa1, 0x1401b77e1\nmov     rcx, rbx                                                       ; +0xa8, 0x1401b77e8\ncall    qword ptr [rax+488h]                                           ; +0xab, 0x1401b77eb\nmov     rdx, rbx                                                       ; +0xb1, 0x1401b77f1\nmov     rcx, rdi                                                       ; +0xb4, 0x1401b77f4\ncall    GJBaseGameLayer__removeObjectFromSection                       ; +0xb7, 0x1401b77f7\nmov     rdx, rbx                                                       ; +0xbc, 0x1401b77fc\nmov     rcx, rdi                                                       ; +0xbf, 0x1401b77ff\ncall    LevelEditorLayer__removeSpecial                                ; +0xc2, 0x1401b7802\nmov     rcx, r14                                                       ; +0xc7, 0x1401b7807\nmov     byte ptr [rdi+3D32h], 1                                        ; +0xca, 0x1401b780a\ncall    EditorUI__deactivateRotationControl                            ; +0xd1, 0x1401b7811\nmov     rcx, r14                                                       ; +0xd6, 0x1401b7816\ncall    EditorUI__deactivateScaleControl                               ; +0xd9, 0x1401b7819\nmov     rcx, r14                                                       ; +0xde, 0x1401b781e\ncall    EditorUI__deactivateTransformControl                           ; +0xe1, 0x1401b7821\nmov     r8b, 1                                                         ; +0xe6, 0x1401b7826\nmov     edx, esi                                                       ; +0xe9, 0x1401b7829\nmov     rcx, rbp                                                       ; +0xeb, 0x1401b782b\ncall    cs:?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0xee, 0x1401b782e\njmp     short loc_1401B7838                                            ; +0xf4, 0x1401b7834\ninc     esi                                                            ; +0xf6, 0x1401b7836\nmov     rcx, rbp                                                       ; +0xf8, 0x1401b7838\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xfb, 0x1401b783b\ncmp     esi, eax                                                       ; +0x101, 0x1401b7841\njb      loc_1401B7773                                                  ; +0x103, 0x1401b7843\nmov     rdi, [rsp+28h+arg_8]                                           ; +0x109, 0x1401b7849\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x10e, 0x1401b784e\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x113, 0x1401b7853\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x118, 0x1401b7858\nadd     rsp, 20h                                                       ; +0x11d, 0x1401b785d\npop     r14                                                            ; +0x121, 0x1401b7861\nretn                                                                   ; +0x123, 0x1401b7863", "xrefs": ["EditorUI::createSmartObjectsFromTemplate @ 0x1401b6f1a", "EditorUI::createPrefab @ 0x1401b76c6", "EditorUI::spriteFromObjectString @ 0x1401f0b11", "<???> @ 0x1408a1d64", "<???> @ 0x1408a1d74", "<???> @ 0x14091a24c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}