{"type": "func", "start": 4299066400, "end": 4299067028, "name": "EditorUI::createCustomItems", "pseudocode": "// \n// EditorUI::createCustomItems from 0x1003e8c20 to 0x1003e8e94 (628 bytes)\n// \n// 2 xrefs:\n// > EditorUI::setupCreateMenu @ 0x1003e3b90\n// > EditorUI::reloadCustomItems @ 0x1003e8af4\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\ncocos2d::CCArray *__fastcall EditorUI::createCustomItems(EditorUI *a1)\n{\n  cocos2d::CCArray *v2; // x19\n  GameManager *v3; // x0\n  cocos2d::CCArray *OrderedCustomObjectKeys; // x21\n  int v5; // w0\n  int v6; // w22\n  unsigned int v7; // w23\n  cocos2d::CCString *v8; // x0\n  __int64 v9; // x24\n  GameManager *v10; // x0\n  char *v11; // x1\n  cocos2d::CCArray *m_customTabControls; // x1\n  cocos2d::CCArray *v13; // x0\n  cocos2d::CCSprite *v14; // x22\n  cocos2d::CCSprite *v15; // x22\n  cocos2d::CCSprite *v16; // x22\n  cocos2d::CCSprite *v17; // x22\n  void *__p[2]; // [xsp+0h] [xbp-70h] BYREF\n  char v20; // [xsp+17h] [xbp-59h]\n  char *__s[2]; // [xsp+18h] [xbp-58h] BYREF\n  char v22; // [xsp+2Fh] [xbp-41h]\n  cocos2d::SEL_MenuHandler v23; // 0:x2.16\n  cocos2d::SEL_MenuHandler v24; // 0:x2.16\n  cocos2d::SEL_MenuHandler v25; // 0:x2.16\n  cocos2d::SEL_MenuHandler v26; // 0:x2.16\n  cocos2d::CCPoint v27; // 0:s1.4,4:s2.4\n  cocos2d::CCPoint v28; // 0:s1.4,4:s2.4\n  cocos2d::CCPoint v29; // 0:s1.4,4:s2.4\n  cocos2d::CCPoint v30; // 0:s1.4,4:s2.4\n\n  sub_10024A45C((__int64)a1->m_customObjectButtonArray);\n  v2 = (cocos2d::CCArray *)sub_10024A15C();\n  v3 = GameManager::sharedState();\n  OrderedCustomObjectKeys = GameManager::getOrderedCustomObjectKeys(v3);\n  v5 = sub_10024A36C((__int64)OrderedCustomObjectKeys);\n  if ( v5 >= 1 )\n  {\n    v6 = v5;\n    v7 = 0;\n    while ( 1 )\n    {\n      v8 = cocos2d::CCArray::stringAtIndex(OrderedCustomObjectKeys, v7);\n      v9 = cocos2d::CCString::intValue(v8);\n      v10 = GameManager::sharedState();\n      GameManager::stringForCustomObject((__int64)v10, v9, __s);\n      if ( v22 < 0 )\n        break;\n      if ( v22 )\n      {\n        v11 = (char *)__s;\nLABEL_8:\n        sub_100009900(__p, v11);\n        EditorUI::menuItemFromObjectString(a1, __p, v9);\n        sub_10024A2D0((__int64)v2);\n        if ( v20 < 0 )\n          operator delete(__p[0]);\n        if ( (v22 & 0x80000000) == 0 )\n          goto LABEL_12;\n        goto LABEL_11;\n      }\nLABEL_12:\n      if ( v6 == ++v7 )\n        goto LABEL_13;\n    }\n    if ( __s[1] )\n    {\n      v11 = __s[0];\n      goto LABEL_8;\n    }\nLABEL_11:\n    operator delete(__s[0]);\n    goto LABEL_12;\n  }\nLABEL_13:\n  m_customTabControls = a1->m_customTabControls;\n  if ( !m_customTabControls )\n  {\n    v13 = (cocos2d::CCArray *)sub_10024A15C();\n    a1->m_customTabControls = v13;\n    cocos2d::CCObject::retain(v13);\n    v14 = cocos2d::CCSprite::createWithSpriteFrameName(\"edit_upBtn_001.png\");\n    sub_1000229B8((__int64 *)__s, (__int64 *)&dword_10086E8B0);\n    v23.ptr = (void (__cdecl *)(cocos2d::CCObject *))EditorUI::orderUpCustomItem;\n    v23.adj = 0;\n    EditorUI::getCreateMenuItemButton(a1, v14, v23, nullptr, 0.9, 5, v27);\n    sub_10024A2D0((__int64)a1->m_customTabControls);\n    v15 = cocos2d::CCSprite::createWithSpriteFrameName(\"edit_downBtn_001.png\");\n    sub_1000229B8((__int64 *)__s, (__int64 *)&dword_10086E8B0);\n    v24.ptr = (void (__cdecl *)(cocos2d::CCObject *))EditorUI::orderDownCustomItem;\n    v24.adj = 0;\n    EditorUI::getCreateMenuItemButton(a1, v15, v24, nullptr, 0.9, 5, v28);\n    sub_10024A2D0((__int64)a1->m_customTabControls);\n    v16 = cocos2d::CCSprite::createWithSpriteFrameName(\"edit_addCBtn_001.png\");\n    sub_1000229B8((__int64 *)__s, (__int64 *)&dword_10086E8B0);\n    v25.ptr = (void (__cdecl *)(cocos2d::CCObject *))EditorUI::onNewCustomItem;\n    v25.adj = 0;\n    EditorUI::getCreateMenuItemButton(a1, v16, v25, nullptr, 0.9, 1, v29);\n    sub_10024A2D0((__int64)a1->m_customTabControls);\n    v17 = cocos2d::CCSprite::createWithSpriteFrameName(\"edit_delCBtn_001.png\");\n    sub_1000229B8((__int64 *)__s, (__int64 *)&dword_10086E8B0);\n    v26.ptr = (void (__cdecl *)(cocos2d::CCObject *))EditorUI::onDeleteCustomItem;\n    v26.adj = 0;\n    EditorUI::getCreateMenuItemButton(a1, v17, v26, nullptr, 0.9, 6, v30);\n    sub_10024A2D0((__int64)a1->m_customTabControls);\n    m_customTabControls = a1->m_customTabControls;\n  }\n  sub_10024A360((__int64)v2, (__int64)m_customTabControls);\n  return v2;\n}", "assembly": "; \n; EditorUI::createCustomItems from 0x1003e8c20 to 0x1003e8e94 (628 bytes)\n; \n; 2 xrefs:\n; > EditorUI::setupCreateMenu @ 0x1003e3b90\n; > EditorUI::reloadCustomItems @ 0x1003e8af4\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\nSUB             SP, SP, #0x80                                          ; +0x0, 0x1003e8c20\nSTP             D9, D8, [SP,#0x70+var_40]                              ; +0x4, 0x1003e8c24\nSTP             X24, X23, [SP,#0x70+var_30]                            ; +0x8, 0x1003e8c28\nSTP             X22, X21, [SP,#0x70+var_20]                            ; +0xc, 0x1003e8c2c\nSTP             X20, X19, [SP,#0x70+var_10]                            ; +0x10, 0x1003e8c30\nSTP             X29, X30, [SP,#0x70+var_s0]                            ; +0x14, 0x1003e8c34\nADD             X29, SP, #0x70                                         ; +0x18, 0x1003e8c38\nMOV             X20, X0                                                ; +0x1c, 0x1003e8c3c\nLDR             X0, [X0,#0x4D0]                                        ; +0x20, 0x1003e8c40\nBL              sub_10024A45C                                          ; +0x24, 0x1003e8c44\nBL              sub_10024A15C                                          ; +0x28, 0x1003e8c48\nMOV             X19, X0                                                ; +0x2c, 0x1003e8c4c\nBL              GameManager__sharedState                               ; +0x30, 0x1003e8c50\nBL              GameManager__getOrderedCustomObjectKeys                ; +0x34, 0x1003e8c54\nMOV             X21, X0                                                ; +0x38, 0x1003e8c58\nBL              sub_10024A36C                                          ; +0x3c, 0x1003e8c5c\nCMP             W0, #1                                                 ; +0x40, 0x1003e8c60\nB.LT            loc_1003E8D04                                          ; +0x44, 0x1003e8c64\nMOV             X22, X0                                                ; +0x48, 0x1003e8c68\nMOV             W23, #0                                                ; +0x4c, 0x1003e8c6c\nMOV             X0, X21                                                ; +0x50, 0x1003e8c70\nMOV             X1, X23                                                ; +0x54, 0x1003e8c74\nBL              cocos2d__CCArray__stringAtIndex                        ; +0x58, 0x1003e8c78\nBL              cocos2d__CCString__intValue                            ; +0x5c, 0x1003e8c7c\nMOV             X24, X0                                                ; +0x60, 0x1003e8c80\nBL              GameManager__sharedState                               ; +0x64, 0x1003e8c84\nADD             X8, SP, #0x70+__s                                      ; +0x68, 0x1003e8c88\nMOV             X1, X24                                                ; +0x6c, 0x1003e8c8c\nBL              GameManager__stringForCustomObject                     ; +0x70, 0x1003e8c90\nLDRSB           W8, [SP,#0x70+var_41]                                  ; +0x74, 0x1003e8c94\nTBNZ            W8, #0x1F, loc_1003E8CA8                               ; +0x78, 0x1003e8c98\nCBZ             W8, loc_1003E8CF8                                      ; +0x7c, 0x1003e8c9c\nADD             X1, SP, #0x70+__s                                      ; +0x80, 0x1003e8ca0\nB               loc_1003E8CB4                                          ; +0x84, 0x1003e8ca4\nLDR             X8, [SP,#0x70+var_50]                                  ; +0x88, 0x1003e8ca8\nCBZ             X8, loc_1003E8CF0                                      ; +0x8c, 0x1003e8cac\nLDR             X1, [SP,#0x70+__s]; __s                                ; +0x90, 0x1003e8cb0\nMOV             X0, SP; int                                            ; +0x94, 0x1003e8cb4\nBL              sub_100009900                                          ; +0x98, 0x1003e8cb8\nMOV             X1, SP                                                 ; +0x9c, 0x1003e8cbc\nMOV             X0, X20                                                ; +0xa0, 0x1003e8cc0\nMOV             X2, X24                                                ; +0xa4, 0x1003e8cc4\nBL              EditorUI__menuItemFromObjectString                     ; +0xa8, 0x1003e8cc8\nMOV             X1, X0                                                 ; +0xac, 0x1003e8ccc\nMOV             X0, X19                                                ; +0xb0, 0x1003e8cd0\nBL              sub_10024A2D0                                          ; +0xb4, 0x1003e8cd4\nLDRSB           W8, [SP,#0x70+var_59]                                  ; +0xb8, 0x1003e8cd8\nTBZ             W8, #0x1F, loc_1003E8CE8                               ; +0xbc, 0x1003e8cdc\nLDR             X0, [SP,#0x70+__p]; __p                                ; +0xc0, 0x1003e8ce0\nBL              __ZdlPv; operator delete(void *)                       ; +0xc4, 0x1003e8ce4\nLDRSB           W8, [SP,#0x70+var_41]                                  ; +0xc8, 0x1003e8ce8\nTBZ             W8, #0x1F, loc_1003E8CF8                               ; +0xcc, 0x1003e8cec\nLDR             X0, [SP,#0x70+__s]; __p                                ; +0xd0, 0x1003e8cf0\nBL              __ZdlPv; operator delete(void *)                       ; +0xd4, 0x1003e8cf4\nADD             W23, W23, #1                                           ; +0xd8, 0x1003e8cf8\nCMP             W22, W23                                               ; +0xdc, 0x1003e8cfc\nB.NE            loc_1003E8C70                                          ; +0xe0, 0x1003e8d00\nLDR             X1, [X20,#0x338]                                       ; +0xe4, 0x1003e8d04\nCBNZ            X1, loc_1003E8E6C                                      ; +0xe8, 0x1003e8d08\nBL              sub_10024A15C                                          ; +0xec, 0x1003e8d0c\nSTR             X0, [X20,#0x338]                                       ; +0xf0, 0x1003e8d10\nBL              cocos2d__CCObject__retain                              ; +0xf4, 0x1003e8d14\nADRL            X0, aEditUpbtn001Pn; \"edit_upBtn_001.png\"              ; +0xf8, 0x1003e8d18\nBL              cocos2d__CCSprite__createWithSpriteFrameName           ; +0x100, 0x1003e8d20\nMOV             X22, X0                                                ; +0x104, 0x1003e8d24\nADRL            X21, dword_10086E8B0                                   ; +0x108, 0x1003e8d28\nADD             X0, SP, #0x70+__s                                      ; +0x110, 0x1003e8d30\nMOV             X1, X21                                                ; +0x114, 0x1003e8d34\nBL              sub_1000229B8                                          ; +0x118, 0x1003e8d38\nADRL            X2, EditorUI__orderUpCustomItem                        ; +0x11c, 0x1003e8d3c\nADRP            X8, #dword_100635564@PAGE                              ; +0x124, 0x1003e8d44\nLDR             S8, [X8,#dword_100635564@PAGEOFF]                      ; +0x128, 0x1003e8d48\nADD             X6, SP, #0x70+__s                                      ; +0x12c, 0x1003e8d4c\nMOV             X0, X20                                                ; +0x130, 0x1003e8d50\nMOV             X1, X22                                                ; +0x134, 0x1003e8d54\nMOV             X3, #0                                                 ; +0x138, 0x1003e8d58\nMOV             X4, #0                                                 ; +0x13c, 0x1003e8d5c\nFMOV            S0, S8                                                 ; +0x140, 0x1003e8d60\nMOV             W5, #5                                                 ; +0x144, 0x1003e8d64\nBL              EditorUI__getCreateMenuItemButton                      ; +0x148, 0x1003e8d68\nMOV             X1, X0                                                 ; +0x14c, 0x1003e8d6c\nLDR             X0, [X20,#0x338]                                       ; +0x150, 0x1003e8d70\nBL              sub_10024A2D0                                          ; +0x154, 0x1003e8d74\nADRL            X0, aEditDownbtn001; \"edit_downBtn_001.png\"            ; +0x158, 0x1003e8d78\nBL              cocos2d__CCSprite__createWithSpriteFrameName           ; +0x160, 0x1003e8d80\nMOV             X22, X0                                                ; +0x164, 0x1003e8d84\nADD             X0, SP, #0x70+__s                                      ; +0x168, 0x1003e8d88\nMOV             X1, X21                                                ; +0x16c, 0x1003e8d8c\nBL              sub_1000229B8                                          ; +0x170, 0x1003e8d90\nADRL            X2, EditorUI__orderDownCustomItem                      ; +0x174, 0x1003e8d94\nADD             X6, SP, #0x70+__s                                      ; +0x17c, 0x1003e8d9c\nMOV             X0, X20                                                ; +0x180, 0x1003e8da0\nMOV             X1, X22                                                ; +0x184, 0x1003e8da4\nMOV             X3, #0                                                 ; +0x188, 0x1003e8da8\nMOV             X4, #0                                                 ; +0x18c, 0x1003e8dac\nFMOV            S0, S8                                                 ; +0x190, 0x1003e8db0\nMOV             W5, #5                                                 ; +0x194, 0x1003e8db4\nBL              EditorUI__getCreateMenuItemButton                      ; +0x198, 0x1003e8db8\nMOV             X1, X0                                                 ; +0x19c, 0x1003e8dbc\nLDR             X0, [X20,#0x338]                                       ; +0x1a0, 0x1003e8dc0\nBL              sub_10024A2D0                                          ; +0x1a4, 0x1003e8dc4\nADRL            X0, aEditAddcbtn001; \"edit_addCBtn_001.png\"            ; +0x1a8, 0x1003e8dc8\nBL              cocos2d__CCSprite__createWithSpriteFrameName           ; +0x1b0, 0x1003e8dd0\nMOV             X22, X0                                                ; +0x1b4, 0x1003e8dd4\nADD             X0, SP, #0x70+__s                                      ; +0x1b8, 0x1003e8dd8\nMOV             X1, X21                                                ; +0x1bc, 0x1003e8ddc\nBL              sub_1000229B8                                          ; +0x1c0, 0x1003e8de0\nADRL            X2, EditorUI__onNewCustomItem                          ; +0x1c4, 0x1003e8de4\nADD             X6, SP, #0x70+__s                                      ; +0x1cc, 0x1003e8dec\nMOV             X0, X20                                                ; +0x1d0, 0x1003e8df0\nMOV             X1, X22                                                ; +0x1d4, 0x1003e8df4\nMOV             X3, #0                                                 ; +0x1d8, 0x1003e8df8\nMOV             X4, #0                                                 ; +0x1dc, 0x1003e8dfc\nFMOV            S0, S8                                                 ; +0x1e0, 0x1003e8e00\nMOV             W5, #1                                                 ; +0x1e4, 0x1003e8e04\nBL              EditorUI__getCreateMenuItemButton                      ; +0x1e8, 0x1003e8e08\nMOV             X1, X0                                                 ; +0x1ec, 0x1003e8e0c\nLDR             X0, [X20,#0x338]                                       ; +0x1f0, 0x1003e8e10\nBL              sub_10024A2D0                                          ; +0x1f4, 0x1003e8e14\nADRL            X0, aEditDelcbtn001; \"edit_delCBtn_001.png\"            ; +0x1f8, 0x1003e8e18\nBL              cocos2d__CCSprite__createWithSpriteFrameName           ; +0x200, 0x1003e8e20\nMOV             X22, X0                                                ; +0x204, 0x1003e8e24\nADD             X0, SP, #0x70+__s                                      ; +0x208, 0x1003e8e28\nMOV             X1, X21                                                ; +0x20c, 0x1003e8e2c\nBL              sub_1000229B8                                          ; +0x210, 0x1003e8e30\nADRL            X2, EditorUI__onDeleteCustomItem                       ; +0x214, 0x1003e8e34\nADD             X6, SP, #0x70+__s                                      ; +0x21c, 0x1003e8e3c\nMOV             X0, X20                                                ; +0x220, 0x1003e8e40\nMOV             X1, X22                                                ; +0x224, 0x1003e8e44\nMOV             X3, #0                                                 ; +0x228, 0x1003e8e48\nMOV             X4, #0                                                 ; +0x22c, 0x1003e8e4c\nFMOV            S0, S8                                                 ; +0x230, 0x1003e8e50\nMOV             W5, #6                                                 ; +0x234, 0x1003e8e54\nBL              EditorUI__getCreateMenuItemButton                      ; +0x238, 0x1003e8e58\nMOV             X1, X0                                                 ; +0x23c, 0x1003e8e5c\nLDR             X0, [X20,#0x338]                                       ; +0x240, 0x1003e8e60\nBL              sub_10024A2D0                                          ; +0x244, 0x1003e8e64\nLDR             X1, [X20,#0x338]                                       ; +0x248, 0x1003e8e68\nMOV             X0, X19                                                ; +0x24c, 0x1003e8e6c\nBL              sub_10024A360                                          ; +0x250, 0x1003e8e70\nMOV             X0, X19                                                ; +0x254, 0x1003e8e74\nLDP             X29, X30, [SP,#0x70+var_s0]                            ; +0x258, 0x1003e8e78\nLDP             X20, X19, [SP,#0x70+var_10]                            ; +0x25c, 0x1003e8e7c\nLDP             X22, X21, [SP,#0x70+var_20]                            ; +0x260, 0x1003e8e80\nLDP             X24, X23, [SP,#0x70+var_30]                            ; +0x264, 0x1003e8e84\nLDP             D9, D8, [SP,#0x70+var_40]                              ; +0x268, 0x1003e8e88\nADD             SP, SP, #0x80                                          ; +0x26c, 0x1003e8e8c\nRET                                                                    ; +0x270, 0x1003e8e90", "xrefs": ["EditorUI::setupCreateMenu @ 0x1003e3b90", "EditorUI::reloadCustomItems @ 0x1003e8af4"], "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"}