{"type": "func", "start": 5369644320, "end": 5369644630, "name": "EditorUI::onDeleteCustomItem", "pseudocode": "// \n// EditorUI::onDeleteCustomItem from 0x1400e4520 to 0x1400e4656 (310 bytes)\n// \n// 2 xrefs:\n// > EditorUI::createCustomItems @ 0x1400e4bdd\n// > <???> @ 0x1406c8c64\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\n// Hidden C++ exception states: #wind=2\nvoid EditorUI::onDeleteCustomItem(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  __int64 v3; // rdi\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rax\n  size_t v6; // r8\n  void *v7; // rcx\n  void *v8; // [rsp+20h] [rbp-38h]\n  void *Block[2]; // [rsp+28h] [rbp-30h] BYREF\n  __int64 v10; // [rsp+38h] [rbp-20h]\n  unsigned __int64 v11; // [rsp+40h] [rbp-18h]\n\n  if ( a1->m_selectedObjectIndex < 0 )\n  {\n    v3 = qword_1406C2ED8;\n    if ( !qword_1406C2ED8 )\n    {\n      v8 = operator new(0x668u);\n      qword_1406C2ED8 = sub_14017AB00(v8);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n      v3 = qword_1406C2ED8;\n    }\n    v4 = cocos2d::CCString::createWithFormat(\"%i\", a1->m_selectedObjectIndex);\n    CString = cocos2d::CCString::getCString(v4);\n    *(_OWORD *)Block = 0;\n    v10 = 0;\n    v11 = 0;\n    v6 = -1;\n    do\n      ++v6;\n    while ( CString[v6] );\n    sub_14003A930(Block, CString, v6);\n    cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(v3 + 424), Block);\n    if ( v11 > 0xF )\n    {\n      v7 = Block[0];\n      if ( v11 + 1 >= 0x1000 )\n      {\n        v7 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n          invalid_parameter_noinfo_noreturn();\n      }\n      j_j_free(v7);\n    }\n    a1->m_selectedObjectIndex = 0;\n    EditorUI::reloadCustomItems(a1);\n  }\n}", "assembly": "; \n; EditorUI::onDeleteCustomItem from 0x1400e4520 to 0x1400e4656 (310 bytes)\n; \n; 2 xrefs:\n; > EditorUI::createCustomItems @ 0x1400e4bdd\n; > <???> @ 0x1406c8c64\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1400e4520\npush    rdi                                                            ; +0x5, 0x1400e4525\nsub     rsp, 50h                                                       ; +0x6, 0x1400e4526\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x1400e452a\nxor     rax, rsp                                                       ; +0x11, 0x1400e4531\nmov     [rsp+58h+var_10], rax                                          ; +0x14, 0x1400e4534\nmov     rbx, rcx                                                       ; +0x19, 0x1400e4539\ncmp     dword ptr [rcx+4D8h], 0                                        ; +0x1c, 0x1400e453c\njge     loc_1400E463E                                                  ; +0x23, 0x1400e4543\nmov     rdi, cs:qword_1406C2ED8                                        ; +0x29, 0x1400e4549\ntest    rdi, rdi                                                       ; +0x30, 0x1400e4550\njnz     short loc_1400E4584                                            ; +0x33, 0x1400e4553\nmov     ecx, 668h; Size                                                ; +0x35, 0x1400e4555\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3a, 0x1400e455a\nmov     [rsp+58h+var_38], rax                                          ; +0x3f, 0x1400e455f\nmov     rcx, rax                                                       ; +0x44, 0x1400e4564\ncall    sub_14017AB00                                                  ; +0x47, 0x1400e4567\nnop                                                                    ; +0x4c, 0x1400e456c\nmov     cs:qword_1406C2ED8, rax                                        ; +0x4d, 0x1400e456d\nmov     rdx, [rax]                                                     ; +0x54, 0x1400e4574\nmov     rcx, rax                                                       ; +0x57, 0x1400e4577\ncall    qword ptr [rdx+48h]                                            ; +0x5a, 0x1400e457a\nmov     rdi, cs:qword_1406C2ED8                                        ; +0x5d, 0x1400e457d\nmov     edx, [rbx+4D8h]                                                ; +0x64, 0x1400e4584\nlea     rcx, aI_11; \"%i\"                                               ; +0x6a, 0x1400e458a\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x71, 0x1400e4591\nmov     rcx, rax                                                       ; +0x77, 0x1400e4597\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x7a, 0x1400e459a\nxorps   xmm0, xmm0                                                     ; +0x80, 0x1400e45a0\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x83, 0x1400e45a3\nmov     [rsp+58h+var_20], 0                                            ; +0x88, 0x1400e45a8\nmov     [rsp+58h+var_18], 0                                            ; +0x91, 0x1400e45b1\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x9a, 0x1400e45ba\ninc     r8                                                             ; +0xa1, 0x1400e45c1\ncmp     byte ptr [rax+r8], 0                                           ; +0xa4, 0x1400e45c4\njnz     short loc_1400E45C1                                            ; +0xa9, 0x1400e45c9\nmov     rdx, rax                                                       ; +0xab, 0x1400e45cb\nlea     rcx, [rsp+58h+Block]                                           ; +0xae, 0x1400e45ce\ncall    sub_14003A930                                                  ; +0xb3, 0x1400e45d3\nnop                                                                    ; +0xb8, 0x1400e45d8\nlea     rdx, [rsp+58h+Block]                                           ; +0xb9, 0x1400e45d9\nmov     rcx, [rdi+1A8h]                                                ; +0xbe, 0x1400e45de\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::removeObjectForKey(std::string const &) ; +0xc5, 0x1400e45e5\nnop                                                                    ; +0xcb, 0x1400e45eb\nmov     rdx, [rsp+58h+var_18]                                          ; +0xcc, 0x1400e45ec\ncmp     rdx, 0Fh                                                       ; +0xd1, 0x1400e45f1\njbe     short loc_1400E462C                                            ; +0xd5, 0x1400e45f5\ninc     rdx                                                            ; +0xd7, 0x1400e45f7\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0xda, 0x1400e45fa\nmov     rax, rcx                                                       ; +0xdf, 0x1400e45ff\ncmp     rdx, 1000h                                                     ; +0xe2, 0x1400e4602\njb      short loc_1400E4627                                            ; +0xe9, 0x1400e4609\nadd     rdx, 27h ; '''                                                 ; +0xeb, 0x1400e460b\nmov     rcx, [rcx-8]                                                   ; +0xef, 0x1400e460f\nsub     rax, rcx                                                       ; +0xf3, 0x1400e4613\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xf6, 0x1400e4616\ncmp     rax, 1Fh                                                       ; +0xfa, 0x1400e461a\njbe     short loc_1400E4627                                            ; +0xfe, 0x1400e461e\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x100, 0x1400e4620\ndb 0CCh                                                                ; +0x106, 0x1400e4626\ncall    j_j_free                                                       ; +0x107, 0x1400e4627\nmov     dword ptr [rbx+4D8h], 0                                        ; +0x10c, 0x1400e462c\nmov     rcx, rbx                                                       ; +0x116, 0x1400e4636\ncall    EditorUI__reloadCustomItems                                    ; +0x119, 0x1400e4639\nmov     rcx, [rsp+58h+var_10]                                          ; +0x11e, 0x1400e463e\nxor     rcx, rsp; StackCookie                                          ; +0x123, 0x1400e4643\ncall    __security_check_cookie                                        ; +0x126, 0x1400e4646\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x12b, 0x1400e464b\nadd     rsp, 50h                                                       ; +0x130, 0x1400e4650\npop     rdi                                                            ; +0x134, 0x1400e4654\nretn                                                                   ; +0x135, 0x1400e4655", "xrefs": ["EditorUI::createCustomItems @ 0x1400e4bdd", "<???> @ 0x1406c8c64"], "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"}