{"type": "func", "start": 5370765216, "end": 5370765546, "name": "EditorUI::onDeleteCustomItem", "pseudocode": "// \n// EditorUI::onDeleteCustomItem from 0x1401f5fa0 to 0x1401f60ea (330 bytes)\n// \n// 2 xrefs:\n// > EditorUI::createCustomItems @ 0x1401f66ac\n// > <???> @ 0x14091aa80\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:28:09 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall EditorUI::onDeleteCustomItem(__int64 a1)\n{\n  __int64 v2; // rdi\n  cocos2d::CCString *v3; // rax\n  const char *CString; // rax\n  size_t v5; // r8\n  void *v6; // rcx\n  void *v7; // [rsp+30h] [rbp-38h]\n  void *Block[2]; // [rsp+38h] [rbp-30h] BYREF\n  __int64 v9; // [rsp+48h] [rbp-20h]\n  unsigned __int64 v10; // [rsp+50h] [rbp-18h]\n\n  if ( *(int *)(a1 + 1392) < 0 )\n  {\n    v2 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v7 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v7);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v2 = qword_14090BFD0;\n    }\n    v3 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, *(unsigned int *)(a1 + 1392));\n    CString = cocos2d::CCString::getCString(v3);\n    *(_OWORD *)Block = 0;\n    v9 = 0;\n    v10 = 0;\n    v5 = -1;\n    do\n      ++v5;\n    while ( CString[v5] );\n    sub_14003D230(Block, CString, v5);\n    cocos2d::CCDictionary::removeObjectForKey(*(_QWORD *)(v2 + 464), Block);\n    if ( v10 > 0xF )\n    {\n      v6 = Block[0];\n      if ( v10 + 1 >= 0x1000 )\n      {\n        v6 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free(v6);\n    }\n    *(_DWORD *)(a1 + 1392) = 0;\n    EditorUI::reloadCustomItems(a1);\n  }\n}", "assembly": "; \n; EditorUI::onDeleteCustomItem from 0x1401f5fa0 to 0x1401f60ea (330 bytes)\n; \n; 2 xrefs:\n; > EditorUI::createCustomItems @ 0x1401f66ac\n; > <???> @ 0x14091aa80\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:28:09 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401f5fa0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1401f5fa5\npush    rdi                                                            ; +0xa, 0x1401f5faa\nsub     rsp, 60h                                                       ; +0xb, 0x1401f5fab\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1401f5faf\nxor     rax, rsp                                                       ; +0x16, 0x1401f5fb6\nmov     [rsp+68h+var_10], rax                                          ; +0x19, 0x1401f5fb9\nmov     rbx, rcx                                                       ; +0x1e, 0x1401f5fbe\ncmp     dword ptr [rcx+570h], 0                                        ; +0x21, 0x1401f5fc1\njge     loc_1401F60CA                                                  ; +0x28, 0x1401f5fc8\nmov     rdi, cs:qword_14090BFD0                                        ; +0x2e, 0x1401f5fce\ntest    rdi, rdi                                                       ; +0x35, 0x1401f5fd5\njnz     short loc_1401F600C                                            ; +0x38, 0x1401f5fd8\nmov     ecx, 6E8h; Size                                                ; +0x3a, 0x1401f5fda\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3f, 0x1401f5fdf\nmov     [rsp+68h+var_38], rax                                          ; +0x44, 0x1401f5fe4\nmov     rcx, rax                                                       ; +0x49, 0x1401f5fe9\ncall    GameManager__GameManager                                       ; +0x4c, 0x1401f5fec\nnop                                                                    ; +0x51, 0x1401f5ff1\nmov     cs:qword_14090BFD0, rax                                        ; +0x52, 0x1401f5ff2\nmov     rcx, [rax]                                                     ; +0x59, 0x1401f5ff9\nmov     rdx, [rcx+48h]                                                 ; +0x5c, 0x1401f5ffc\nmov     rcx, rax                                                       ; +0x60, 0x1401f6000\ncall    rdx                                                            ; +0x63, 0x1401f6003\nmov     rdi, cs:qword_14090BFD0                                        ; +0x65, 0x1401f6005\nmov     edx, [rbx+570h]                                                ; +0x6c, 0x1401f600c\nlea     rcx, word_1406ED6F8                                            ; +0x72, 0x1401f6012\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x79, 0x1401f6019\nmov     rcx, rax                                                       ; +0x7f, 0x1401f601f\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x82, 0x1401f6022\nxorps   xmm0, xmm0                                                     ; +0x88, 0x1401f6028\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x8b, 0x1401f602b\nxor     esi, esi                                                       ; +0x90, 0x1401f6030\nmov     [rsp+68h+var_20], rsi                                          ; +0x92, 0x1401f6032\nmov     [rsp+68h+var_18], rsi                                          ; +0x97, 0x1401f6037\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x9c, 0x1401f603c\ninc     r8                                                             ; +0xa3, 0x1401f6043\ncmp     [rax+r8], sil                                                  ; +0xa6, 0x1401f6046\njnz     short loc_1401F6043                                            ; +0xaa, 0x1401f604a\nmov     rdx, rax                                                       ; +0xac, 0x1401f604c\nlea     rcx, [rsp+68h+Block]                                           ; +0xaf, 0x1401f604f\ncall    sub_14003D230                                                  ; +0xb4, 0x1401f6054\nnop                                                                    ; +0xb9, 0x1401f6059\nlea     rdx, [rsp+68h+Block]                                           ; +0xba, 0x1401f605a\nmov     rcx, [rdi+1D0h]                                                ; +0xbf, 0x1401f605f\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 &) ; +0xc6, 0x1401f6066\nnop                                                                    ; +0xcc, 0x1401f606c\nmov     rdx, [rsp+68h+var_18]                                          ; +0xcd, 0x1401f606d\ncmp     rdx, 0Fh                                                       ; +0xd2, 0x1401f6072\njbe     short loc_1401F60BC                                            ; +0xd6, 0x1401f6076\ninc     rdx                                                            ; +0xd8, 0x1401f6078\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0xdb, 0x1401f607b\nmov     rax, rcx                                                       ; +0xe0, 0x1401f6080\ncmp     rdx, 1000h                                                     ; +0xe3, 0x1401f6083\njb      short loc_1401F60B7                                            ; +0xea, 0x1401f608a\nadd     rdx, 27h ; '''                                                 ; +0xec, 0x1401f608c\nmov     rcx, [rcx-8]                                                   ; +0xf0, 0x1401f6090\nsub     rax, rcx                                                       ; +0xf4, 0x1401f6094\nsub     rax, 8                                                         ; +0xf7, 0x1401f6097\ncmp     rax, 1Fh                                                       ; +0xfb, 0x1401f609b\njbe     short loc_1401F60B7                                            ; +0xff, 0x1401f609f\nmov     [rsp+68h+Reserved], rsi; Reserved                              ; +0x101, 0x1401f60a1\nxor     r9d, r9d; LineNo                                               ; +0x106, 0x1401f60a6\nxor     r8d, r8d; FileName                                             ; +0x109, 0x1401f60a9\nxor     edx, edx; FunctionName                                         ; +0x10c, 0x1401f60ac\nxor     ecx, ecx; Expression                                           ; +0x10e, 0x1401f60ae\ncall    cs:_invoke_watson                                              ; +0x110, 0x1401f60b0\ndb 0CCh                                                                ; +0x116, 0x1401f60b6\ncall    j_j_free                                                       ; +0x117, 0x1401f60b7\nmov     [rbx+570h], esi                                                ; +0x11c, 0x1401f60bc\nmov     rcx, rbx                                                       ; +0x122, 0x1401f60c2\ncall    EditorUI__reloadCustomItems                                    ; +0x125, 0x1401f60c5\nmov     rcx, [rsp+68h+var_10]                                          ; +0x12a, 0x1401f60ca\nxor     rcx, rsp; StackCookie                                          ; +0x12f, 0x1401f60cf\ncall    __security_check_cookie                                        ; +0x132, 0x1401f60d2\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x137, 0x1401f60d7\nmov     rsi, [rsp+68h+arg_10]                                          ; +0x13c, 0x1401f60dc\nadd     rsp, 60h                                                       ; +0x144, 0x1401f60e4\npop     rdi                                                            ; +0x148, 0x1401f60e8\nretn                                                                   ; +0x149, 0x1401f60e9", "xrefs": ["EditorUI::createCustomItems @ 0x1401f66ac", "<???> @ 0x14091aa80"], "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"}