{"type": "func", "start": 4728482, "end": 4728754, "name": "EditorUI::updateCreateMenu", "pseudocode": "// \n// EditorUI::updateCreateMenu from 0x4826a2 to 0x4827b2 (272 bytes)\n// \n// 8 xrefs:\n// > EditorUI::onCreateButton @ 0x4827d8\n// > EditorUI::resetUI @ 0x489cd6\n// > EditorUI::onShowUIBtn @ 0x489e04\n// > EditorUI::clickOnPosition @ 0x48c7ee\n// > EditorUI::handleEditorAction @ 0x6f1f36\n// > EditorUI::orderUpCustomItem @ 0x6f68b4\n// > EditorUI::orderDownCustomItem @ 0x6f68f0\n// > EditorUI::setupCreateMenu @ 0x70c26c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:23 +0000\n// \n\nunsigned int __fastcall EditorUI::updateCreateMenu(EditorUI *this, int a2)\n{\n  unsigned int v3; // r5\n  int v5; // r0\n  unsigned int result; // r0\n  cocos2d::CCArray *v7; // r6\n  int *v8; // r0\n  int v9; // r2\n  int v10; // r3\n  cocos2d::CCArray *v11; // r6\n  unsigned int i; // r5\n  int *v13; // r0\n  int v14; // r2\n  int v15; // r3\n  cocos2d::CCArray *v16; // r8\n  unsigned int j; // r6\n  int v18; // r0\n  int v19; // r3\n  int v20; // r2\n  int v21; // r5\n  cocos2d::CCArray *v22; // r8\n  unsigned int k; // r6\n  int v24; // r0\n\n  v3 = *((unsigned __int8 *)this + 1053);\n  v5 = *((_DWORD *)this + 153);\n  if ( !v3 && *((_DWORD *)this + 235) == 2 )\n  {\n    (*(void (__fastcall **)(int, int))(*(_DWORD *)v5 + 172))(v5, 1);\n    (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 205) + 172))(*((_DWORD *)this + 205), 1);\n    v7 = *((cocos2d::CCArray **)this + 224);\n    while ( v3 < cocos2d::CCArray::count(v7) )\n    {\n      v8 = (int *)cocos2d::CCArray::objectAtIndex(v7, v3++);\n      EditorUI::enableButton((int)this, v8, v9, v10);\n    }\n    v11 = *((cocos2d::CCArray **)this + 225);\n    for ( i = 0; i < cocos2d::CCArray::count(v11); ++i )\n    {\n      v13 = (int *)cocos2d::CCArray::objectAtIndex(v11, i);\n      EditorUI::enableButton((int)this, v13, v14, v15);\n    }\n    v16 = *((cocos2d::CCArray **)this + 224);\n    for ( j = 0; j < cocos2d::CCArray::count(v16); ++j )\n    {\n      v18 = cocos2d::CCArray::objectAtIndex(v16, j);\n      v19 = *((_DWORD *)this + 223);\n      v20 = *(_DWORD *)(v18 + 404);\n      v21 = v18;\n      if ( v20 == v19 )\n      {\nLABEL_15:\n        result = EditorUI::disableButton((int)this, (int *)v21, v20, v19);\n        if ( a2 )\n        {\n          EditorUI::selectBuildTab((unsigned int)this, *(_DWORD *)(v21 + 412));\n          return EditButtonBar::goToPage(*((EditButtonBar **)this + 153), *(_DWORD *)(v21 + 408));\n        }\n        return result;\n      }\n    }\n    v22 = *((cocos2d::CCArray **)this + 225);\n    for ( k = 0; ; ++k )\n    {\n      result = cocos2d::CCArray::count(v22);\n      if ( k >= result )\n        break;\n      v24 = cocos2d::CCArray::objectAtIndex(v22, k);\n      v19 = *((_DWORD *)this + 223);\n      v20 = *(_DWORD *)(v24 + 404);\n      v21 = v24;\n      if ( v20 == v19 )\n        goto LABEL_15;\n    }\n  }\n  else\n  {\n    (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v5 + 172))(v5, 0);\n    return (*(int (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 205) + 172))(*((_DWORD *)this + 205), 0);\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::updateCreateMenu from 0x4826a2 to 0x4827b2 (272 bytes)\n; \n; 8 xrefs:\n; > EditorUI::onCreateButton @ 0x4827d8\n; > EditorUI::resetUI @ 0x489cd6\n; > EditorUI::onShowUIBtn @ 0x489e04\n; > EditorUI::clickOnPosition @ 0x48c7ee\n; > EditorUI::handleEditorAction @ 0x6f1f36\n; > EditorUI::orderUpCustomItem @ 0x6f68b4\n; > EditorUI::orderDownCustomItem @ 0x6f68f0\n; > EditorUI::setupCreateMenu @ 0x70c26c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:23 +0000\n; \nPUSH.W          {R4-R8,LR}                                             ; +0x0, 0x4826a2\nMOV             R4, R0                                                 ; +0x4, 0x4826a6\nLDRB.W          R5, [R0,#0x41D]                                        ; +0x6, 0x4826a8\nMOV             R7, R1                                                 ; +0xa, 0x4826ac\nLDR.W           R0, [R0,#0x264]                                        ; +0xc, 0x4826ae\nCBNZ            R5, loc_4826BC                                         ; +0x10, 0x4826b2\nLDR.W           R3, [R4,#0x3AC]                                        ; +0x12, 0x4826b4\nCMP             R3, #2                                                 ; +0x16, 0x4826b8\nBEQ             loc_4826D8                                             ; +0x18, 0x4826ba\nLDR             R3, [R0]                                               ; +0x1a, 0x4826bc\nMOVS            R1, #0                                                 ; +0x1c, 0x4826be\nLDR.W           R3, [R3,#0xAC]                                         ; +0x1e, 0x4826c0\nBLX             R3                                                     ; +0x22, 0x4826c4\nLDR.W           R0, [R4,#0x334]                                        ; +0x24, 0x4826c6\nMOVS            R1, #0                                                 ; +0x28, 0x4826ca\nPOP.W           {R4-R8,LR}                                             ; +0x2a, 0x4826cc\nLDR             R3, [R0]                                               ; +0x2e, 0x4826d0\nLDR.W           R3, [R3,#0xAC]                                         ; +0x30, 0x4826d2\nBX              R3                                                     ; +0x34, 0x4826d6\nLDR             R3, [R0]                                               ; +0x36, 0x4826d8\nMOVS            R1, #1                                                 ; +0x38, 0x4826da\nLDR.W           R3, [R3,#0xAC]                                         ; +0x3a, 0x4826dc\nBLX             R3                                                     ; +0x3e, 0x4826e0\nLDR.W           R0, [R4,#0x334]                                        ; +0x40, 0x4826e2\nMOVS            R1, #1                                                 ; +0x44, 0x4826e6\nLDR             R3, [R0]                                               ; +0x46, 0x4826e8\nLDR.W           R3, [R3,#0xAC]                                         ; +0x48, 0x4826ea\nBLX             R3                                                     ; +0x4c, 0x4826ee\nLDR.W           R6, [R4,#0x380]                                        ; +0x4e, 0x4826f0\nMOV             R0, R6; this                                           ; +0x52, 0x4826f4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x54, 0x4826f6\nCMP             R5, R0                                                 ; +0x58, 0x4826fa\nBCS             loc_482712                                             ; +0x5a, 0x4826fc\nMOV             R1, R5; unsigned int                                   ; +0x5c, 0x4826fe\nMOV             R0, R6; this                                           ; +0x5e, 0x482700\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x60, 0x482702\nADDS            R5, #1                                                 ; +0x64, 0x482706\nMOV             R1, R0                                                 ; +0x66, 0x482708\nMOV             R0, R4                                                 ; +0x68, 0x48270a\nBL              _ZN8EditorUI12enableButtonEP14CreateMenuItem; EditorUI::enableButton(CreateMenuItem *) ; +0x6a, 0x48270c\nB               loc_4826F4                                             ; +0x6e, 0x482710\nLDR.W           R6, [R4,#0x384]                                        ; +0x70, 0x482712\nMOVS            R5, #0                                                 ; +0x74, 0x482716\nMOV             R0, R6; this                                           ; +0x76, 0x482718\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x78, 0x48271a\nCMP             R5, R0                                                 ; +0x7c, 0x48271e\nBCS             loc_482736                                             ; +0x7e, 0x482720\nMOV             R1, R5; unsigned int                                   ; +0x80, 0x482722\nMOV             R0, R6; this                                           ; +0x82, 0x482724\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x84, 0x482726\nADDS            R5, #1                                                 ; +0x88, 0x48272a\nMOV             R1, R0                                                 ; +0x8a, 0x48272c\nMOV             R0, R4                                                 ; +0x8c, 0x48272e\nBL              _ZN8EditorUI12enableButtonEP14CreateMenuItem; EditorUI::enableButton(CreateMenuItem *) ; +0x8e, 0x482730\nB               loc_482718                                             ; +0x92, 0x482734\nLDR.W           R8, [R4,#0x380]                                        ; +0x94, 0x482736\nMOVS            R6, #0                                                 ; +0x98, 0x48273a\nMOV             R0, R8; this                                           ; +0x9a, 0x48273c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x9c, 0x48273e\nCMP             R6, R0                                                 ; +0xa0, 0x482742\nBCS             loc_482760                                             ; +0xa2, 0x482744\nMOV             R0, R8; this                                           ; +0xa4, 0x482746\nMOV             R1, R6; unsigned int                                   ; +0xa6, 0x482748\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xa8, 0x48274a\nLDR.W           R3, [R4,#0x37C]                                        ; +0xac, 0x48274e\nLDR.W           R2, [R0,#0x194]                                        ; +0xb0, 0x482752\nMOV             R5, R0                                                 ; +0xb4, 0x482756\nCMP             R2, R3                                                 ; +0xb6, 0x482758\nBEQ             loc_482768                                             ; +0xb8, 0x48275a\nADDS            R6, #1                                                 ; +0xba, 0x48275c\nB               loc_48273C                                             ; +0xbc, 0x48275e\nLDR.W           R8, [R4,#0x384]                                        ; +0xbe, 0x482760\nMOVS            R6, #0                                                 ; +0xc2, 0x482764\nB               loc_4827A4                                             ; +0xc4, 0x482766\nMOV             R0, R4                                                 ; +0xc6, 0x482768\nMOV             R1, R5                                                 ; +0xc8, 0x48276a\nBL              _ZN8EditorUI13disableButtonEP14CreateMenuItem; EditorUI::disableButton(CreateMenuItem *) ; +0xca, 0x48276c\nCBZ             R7, locret_4827AE                                      ; +0xce, 0x482770\nMOV             R0, R4; this                                           ; +0xd0, 0x482772\nLDR.W           R1, [R5,#0x19C]; int                                   ; +0xd2, 0x482774\nBL              _ZN8EditorUI14selectBuildTabEi; EditorUI::selectBuildTab(int) ; +0xd6, 0x482778\nLDR.W           R0, [R4,#0x264]; this                                  ; +0xda, 0x48277c\nLDR.W           R1, [R5,#0x198]; int                                   ; +0xde, 0x482780\nPOP.W           {R4-R8,LR}                                             ; +0xe2, 0x482784\nB.W             _ZN13EditButtonBar8goToPageEi; EditButtonBar::goToPage(int) ; +0xe6, 0x482788\nMOV             R0, R8; this                                           ; +0xea, 0x48278c\nMOV             R1, R6; unsigned int                                   ; +0xec, 0x48278e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xee, 0x482790\nLDR.W           R3, [R4,#0x37C]                                        ; +0xf2, 0x482794\nLDR.W           R2, [R0,#0x194]                                        ; +0xf6, 0x482798\nMOV             R5, R0                                                 ; +0xfa, 0x48279c\nCMP             R2, R3                                                 ; +0xfc, 0x48279e\nBEQ             loc_482768                                             ; +0xfe, 0x4827a0\nADDS            R6, #1                                                 ; +0x100, 0x4827a2\nMOV             R0, R8; this                                           ; +0x102, 0x4827a4\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x104, 0x4827a6\nCMP             R6, R0                                                 ; +0x108, 0x4827aa\nBCC             loc_48278C                                             ; +0x10a, 0x4827ac\nPOP.W           {R4-R8,PC}                                             ; +0x10c, 0x4827ae", "xrefs": ["EditorUI::onCreateButton @ 0x4827d8", "EditorUI::resetUI @ 0x489cd6", "EditorUI::onShowUIBtn @ 0x489e04", "EditorUI::clickOnPosition @ 0x48c7ee", "EditorUI::handleEditorAction @ 0x6f1f36", "EditorUI::orderUpCustomItem @ 0x6f68b4", "EditorUI::orderDownCustomItem @ 0x6f68f0", "EditorUI::setupCreateMenu @ 0x70c26c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}