{"type": "func", "start": 5370767216, "end": 5370767826, "name": "EditorUI::reloadCustomItems", "pseudocode": "// \n// EditorUI::reloadCustomItems from 0x1401f6770 to 0x1401f69d2 (610 bytes)\n// \n// 5 xrefs:\n// > EditorUI::onNewCustomItem @ 0x1401f5f53\n// > EditorUI::onDeleteCustomItem @ 0x1401f60c5\n// > EditorUI::orderUpCustomItem @ 0x1401f615f\n// > EditorUI::orderDownCustomItem @ 0x1401f61ef\n// > <???> @ 0x14091aab0\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=4\nvoid __fastcall EditorUI::reloadCustomItems(__int64 a1)\n{\n  __int64 v2; // rbx\n  cocos2d::CCString *v3; // rax\n  int v4; // r14d\n  void *v5; // r8\n  __int64 v6; // rdi\n  cocos2d::CCString *v7; // rax\n  int v8; // edi\n  void *v9; // r8\n  __int64 v10; // rbx\n  cocos2d::CCObject *CustomItems; // rax\n  void *v12; // [rsp+30h] [rbp-50h]\n  void *v13; // [rsp+30h] [rbp-50h]\n  void *Block[2]; // [rsp+38h] [rbp-48h] BYREF\n  __int64 v15; // [rsp+48h] [rbp-38h]\n  unsigned __int64 v16; // [rsp+50h] [rbp-30h]\n  void *Src[2]; // [rsp+58h] [rbp-28h] BYREF\n  __int64 v18; // [rsp+68h] [rbp-18h]\n  unsigned __int64 v19; // [rsp+70h] [rbp-10h]\n\n  v2 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v12 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v12);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v2 = qword_14090BFD0;\n  }\n  *(_OWORD *)Block = 0;\n  v15 = 3;\n  v16 = 15;\n  LODWORD(Block[0]) = 6256231;\n  sub_140044D80(Block, \"0049\", 4u);\n  v3 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v2 + 432), Block);\n  v4 = cocos2d::CCString::intValue(v3);\n  if ( v16 > 0xF )\n  {\n    v5 = Block[0];\n    if ( v16 + 1 >= 0x1000 )\n    {\n      v5 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v5);\n  }\n  v15 = 0;\n  v16 = 15;\n  LOBYTE(Block[0]) = 0;\n  v6 = qword_14090BFD0;\n  if ( !qword_14090BFD0 )\n  {\n    v13 = operator new(0x6E8u);\n    qword_14090BFD0 = GameManager::GameManager(v13);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n    v6 = qword_14090BFD0;\n  }\n  *(_OWORD *)Src = 0;\n  v18 = 3;\n  v19 = 15;\n  LODWORD(Src[0]) = 6256231;\n  sub_140044D80(Src, \"0050\", 4u);\n  v7 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(*(_QWORD *)(v6 + 432), Src);\n  v8 = cocos2d::CCString::intValue(v7);\n  if ( v19 > 0xF )\n  {\n    v9 = Src[0];\n    if ( v19 + 1 >= 0x1000 )\n    {\n      v9 = *((void **)Src[0] - 1);\n      if ( (unsigned __int64)((char *)Src[0] - (char *)v9 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v9);\n  }\n  v10 = *(_QWORD *)(a1 + 672);\n  CustomItems = EditorUI::createCustomItems(a1);\n  EditButtonBar::loadFromItems(v10, CustomItems, v4, v8, 1);\n}", "assembly": "; \n; EditorUI::reloadCustomItems from 0x1401f6770 to 0x1401f69d2 (610 bytes)\n; \n; 5 xrefs:\n; > EditorUI::onNewCustomItem @ 0x1401f5f53\n; > EditorUI::onDeleteCustomItem @ 0x1401f60c5\n; > EditorUI::orderUpCustomItem @ 0x1401f615f\n; > EditorUI::orderDownCustomItem @ 0x1401f61ef\n; > <???> @ 0x14091aab0\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-18h+arg_8], rbx                                           ; +0x0, 0x1401f6770\nmov     [rsp-18h+arg_10], rsi                                          ; +0x5, 0x1401f6775\npush    rbp                                                            ; +0xa, 0x1401f677a\npush    rdi                                                            ; +0xb, 0x1401f677b\npush    r14                                                            ; +0xc, 0x1401f677c\nmov     rbp, rsp                                                       ; +0xe, 0x1401f677e\nsub     rsp, 80h                                                       ; +0x11, 0x1401f6781\nmov     rax, cs:__security_cookie                                      ; +0x18, 0x1401f6788\nxor     rax, rsp                                                       ; +0x1f, 0x1401f678f\nmov     [rbp+var_8], rax                                               ; +0x22, 0x1401f6792\nmov     rsi, rcx                                                       ; +0x26, 0x1401f6796\nmov     rbx, cs:qword_14090BFD0                                        ; +0x29, 0x1401f6799\ntest    rbx, rbx                                                       ; +0x30, 0x1401f67a0\njnz     short loc_1401F67D6                                            ; +0x33, 0x1401f67a3\nmov     ecx, 6E8h; Size                                                ; +0x35, 0x1401f67a5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3a, 0x1401f67aa\nmov     [rbp+var_50], rax                                              ; +0x3f, 0x1401f67af\nmov     rcx, rax                                                       ; +0x43, 0x1401f67b3\ncall    GameManager__GameManager                                       ; +0x46, 0x1401f67b6\nnop                                                                    ; +0x4b, 0x1401f67bb\nmov     cs:qword_14090BFD0, rax                                        ; +0x4c, 0x1401f67bc\nmov     rcx, [rax]                                                     ; +0x53, 0x1401f67c3\nmov     rdx, [rcx+48h]                                                 ; +0x56, 0x1401f67c6\nmov     rcx, rax                                                       ; +0x5a, 0x1401f67ca\ncall    rdx                                                            ; +0x5d, 0x1401f67cd\nmov     rbx, cs:qword_14090BFD0                                        ; +0x5f, 0x1401f67cf\nxorps   xmm0, xmm0                                                     ; +0x66, 0x1401f67d6\nmovups  xmmword ptr [rbp+Block], xmm0                                  ; +0x69, 0x1401f67d9\nmov     [rbp+var_38], 3                                                ; +0x6d, 0x1401f67dd\nmov     [rbp+var_30], 0Fh                                              ; +0x75, 0x1401f67e5\nmov     eax, cs:dword_140757618                                        ; +0x7d, 0x1401f67ed\nmov     word ptr [rbp+Block], ax                                       ; +0x83, 0x1401f67f3\nmovzx   eax, byte ptr cs:dword_140757618+2                             ; +0x87, 0x1401f67f7\nmov     byte ptr [rbp+Block+2], al                                     ; +0x8e, 0x1401f67fe\nmov     byte ptr [rbp+Block+3], 0                                      ; +0x91, 0x1401f6801\nmov     r8d, 4; Size                                                   ; +0x95, 0x1401f6805\nlea     rdx, a0049; \"0049\"                                             ; +0x9b, 0x1401f680b\nlea     rcx, [rbp+Block]; Src                                          ; +0xa2, 0x1401f6812\ncall    sub_140044D80                                                  ; +0xa6, 0x1401f6816\nlea     rdx, [rbp+Block]                                               ; +0xab, 0x1401f681b\nmov     rcx, [rbx+1B0h]                                                ; +0xaf, 0x1401f681f\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0xb6, 0x1401f6826\nmov     rcx, rax                                                       ; +0xbc, 0x1401f682c\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0xbf, 0x1401f682f\nmov     r14d, eax                                                      ; +0xc5, 0x1401f6835\nmov     rdx, [rbp+var_30]                                              ; +0xc8, 0x1401f6838\ncmp     rdx, 0Fh                                                       ; +0xcc, 0x1401f683c\njbe     short loc_1401F688A                                            ; +0xd0, 0x1401f6840\ninc     rdx                                                            ; +0xd2, 0x1401f6842\nmov     r8, [rbp+Block]                                                ; +0xd5, 0x1401f6845\nmov     rcx, r8                                                        ; +0xd9, 0x1401f6849\ncmp     rdx, 1000h                                                     ; +0xdc, 0x1401f684c\njb      short loc_1401F6882                                            ; +0xe3, 0x1401f6853\nadd     rdx, 27h ; '''                                                 ; +0xe5, 0x1401f6855\nmov     r8, [r8-8]                                                     ; +0xe9, 0x1401f6859\nsub     rcx, r8                                                        ; +0xed, 0x1401f685d\nsub     rcx, 8                                                         ; +0xf0, 0x1401f6860\ncmp     rcx, 1Fh                                                       ; +0xf4, 0x1401f6864\njbe     short loc_1401F6882                                            ; +0xf8, 0x1401f6868\nxor     ebx, ebx                                                       ; +0xfa, 0x1401f686a\nmov     [rsp+80h+Reserved], rbx; Reserved                              ; +0xfc, 0x1401f686c\nxor     r9d, r9d; LineNo                                               ; +0x101, 0x1401f6871\nxor     r8d, r8d; FileName                                             ; +0x104, 0x1401f6874\nxor     edx, edx; FunctionName                                         ; +0x107, 0x1401f6877\nxor     ecx, ecx; Expression                                           ; +0x109, 0x1401f6879\ncall    cs:_invoke_watson                                              ; +0x10b, 0x1401f687b\nalign 2                                                                ; +0x111, 0x1401f6881\nmov     rcx, r8; Block                                                 ; +0x112, 0x1401f6882\ncall    j_j_free                                                       ; +0x115, 0x1401f6885\nxor     ebx, ebx                                                       ; +0x11a, 0x1401f688a\nmov     [rbp+var_38], rbx                                              ; +0x11c, 0x1401f688c\nmov     [rbp+var_30], 0Fh                                              ; +0x120, 0x1401f6890\nmov     byte ptr [rbp+Block], bl                                       ; +0x128, 0x1401f6898\nmov     rdi, cs:qword_14090BFD0                                        ; +0x12b, 0x1401f689b\ntest    rdi, rdi                                                       ; +0x132, 0x1401f68a2\njnz     short loc_1401F68D8                                            ; +0x135, 0x1401f68a5\nmov     ecx, 6E8h; Size                                                ; +0x137, 0x1401f68a7\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x13c, 0x1401f68ac\nmov     [rbp+var_50], rax                                              ; +0x141, 0x1401f68b1\nmov     rcx, rax                                                       ; +0x145, 0x1401f68b5\ncall    GameManager__GameManager                                       ; +0x148, 0x1401f68b8\nnop                                                                    ; +0x14d, 0x1401f68bd\nmov     cs:qword_14090BFD0, rax                                        ; +0x14e, 0x1401f68be\nmov     rcx, [rax]                                                     ; +0x155, 0x1401f68c5\nmov     rdx, [rcx+48h]                                                 ; +0x158, 0x1401f68c8\nmov     rcx, rax                                                       ; +0x15c, 0x1401f68cc\ncall    rdx                                                            ; +0x15f, 0x1401f68cf\nmov     rdi, cs:qword_14090BFD0                                        ; +0x161, 0x1401f68d1\nxorps   xmm0, xmm0                                                     ; +0x168, 0x1401f68d8\nmovups  xmmword ptr [rbp+Src], xmm0                                    ; +0x16b, 0x1401f68db\nmov     [rbp+var_18], 3                                                ; +0x16f, 0x1401f68df\nmov     [rbp+var_10], 0Fh                                              ; +0x177, 0x1401f68e7\nmov     eax, cs:dword_140757618                                        ; +0x17f, 0x1401f68ef\nmov     word ptr [rbp+Src], ax                                         ; +0x185, 0x1401f68f5\nmovzx   eax, byte ptr cs:dword_140757618+2                             ; +0x189, 0x1401f68f9\nmov     byte ptr [rbp+Src+2], al                                       ; +0x190, 0x1401f6900\nmov     byte ptr [rbp+Src+3], 0                                        ; +0x193, 0x1401f6903\nmov     r8d, 4; Size                                                   ; +0x197, 0x1401f6907\nlea     rdx, a0050; \"0050\"                                             ; +0x19d, 0x1401f690d\nlea     rcx, [rbp+Src]; Src                                            ; +0x1a4, 0x1401f6914\ncall    sub_140044D80                                                  ; +0x1a8, 0x1401f6918\nlea     rdx, [rbp+Src]                                                 ; +0x1ad, 0x1401f691d\nmov     rcx, [rdi+1B0h]                                                ; +0x1b1, 0x1401f6921\ncall    cs:?valueForKey@CCDictionary@cocos2d@@QEAAPEBVCCString@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::valueForKey(std::string const &) ; +0x1b8, 0x1401f6928\nmov     rcx, rax                                                       ; +0x1be, 0x1401f692e\ncall    cs:?intValue@CCString@cocos2d@@QEBAHXZ; cocos2d::CCString::intValue(void) ; +0x1c1, 0x1401f6931\nmov     edi, eax                                                       ; +0x1c7, 0x1401f6937\nmov     rdx, [rbp+var_10]                                              ; +0x1c9, 0x1401f6939\ncmp     rdx, 0Fh                                                       ; +0x1cd, 0x1401f693d\njbe     short loc_1401F6989                                            ; +0x1d1, 0x1401f6941\ninc     rdx                                                            ; +0x1d3, 0x1401f6943\nmov     r8, [rbp+Src]                                                  ; +0x1d6, 0x1401f6946\nmov     rcx, r8                                                        ; +0x1da, 0x1401f694a\ncmp     rdx, 1000h                                                     ; +0x1dd, 0x1401f694d\njb      short loc_1401F6981                                            ; +0x1e4, 0x1401f6954\nadd     rdx, 27h ; '''                                                 ; +0x1e6, 0x1401f6956\nmov     r8, [r8-8]                                                     ; +0x1ea, 0x1401f695a\nsub     rcx, r8                                                        ; +0x1ee, 0x1401f695e\nsub     rcx, 8                                                         ; +0x1f1, 0x1401f6961\ncmp     rcx, 1Fh                                                       ; +0x1f5, 0x1401f6965\njbe     short loc_1401F6981                                            ; +0x1f9, 0x1401f6969\nmov     [rsp+80h+Reserved], rbx; Reserved                              ; +0x1fb, 0x1401f696b\nxor     r9d, r9d; LineNo                                               ; +0x200, 0x1401f6970\nxor     r8d, r8d; FileName                                             ; +0x203, 0x1401f6973\nxor     edx, edx; FunctionName                                         ; +0x206, 0x1401f6976\nxor     ecx, ecx; Expression                                           ; +0x208, 0x1401f6978\ncall    cs:_invoke_watson                                              ; +0x20a, 0x1401f697a\ndb 0CCh                                                                ; +0x210, 0x1401f6980\nmov     rcx, r8; Block                                                 ; +0x211, 0x1401f6981\ncall    j_j_free                                                       ; +0x214, 0x1401f6984\nmov     rbx, [rsi+2A0h]                                                ; +0x219, 0x1401f6989\nmov     rcx, rsi                                                       ; +0x220, 0x1401f6990\ncall    EditorUI__createCustomItems                                    ; +0x223, 0x1401f6993\nmov     rdx, rax                                                       ; +0x228, 0x1401f6998\nmov     byte ptr [rsp+80h+Reserved], 1                                 ; +0x22b, 0x1401f699b\nmov     r9d, edi                                                       ; +0x230, 0x1401f69a0\nmov     r8d, r14d                                                      ; +0x233, 0x1401f69a3\nmov     rcx, rbx                                                       ; +0x236, 0x1401f69a6\ncall    EditButtonBar__loadFromItems                                   ; +0x239, 0x1401f69a9\nmov     rcx, [rbp+var_8]                                               ; +0x23e, 0x1401f69ae\nxor     rcx, rsp; StackCookie                                          ; +0x242, 0x1401f69b2\ncall    __security_check_cookie                                        ; +0x245, 0x1401f69b5\nlea     r11, [rsp+80h+var_s0]                                          ; +0x24a, 0x1401f69ba\nmov     rbx, [r11+28h]                                                 ; +0x252, 0x1401f69c2\nmov     rsi, [r11+30h]                                                 ; +0x256, 0x1401f69c6\nmov     rsp, r11                                                       ; +0x25a, 0x1401f69ca\npop     r14                                                            ; +0x25d, 0x1401f69cd\npop     rdi                                                            ; +0x25f, 0x1401f69cf\npop     rbp                                                            ; +0x260, 0x1401f69d0\nretn                                                                   ; +0x261, 0x1401f69d1", "xrefs": ["EditorUI::onNewCustomItem @ 0x1401f5f53", "EditorUI::onDeleteCustomItem @ 0x1401f60c5", "EditorUI::orderUpCustomItem @ 0x1401f615f", "EditorUI::orderDownCustomItem @ 0x1401f61ef", "<???> @ 0x14091aab0"], "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"}