{"type": "func", "start": 4728272, "end": 4728482, "name": "EditorUI::selectBuildTab", "pseudocode": "// \n// EditorUI::selectBuildTab from 0x4825d0 to 0x4826a2 (210 bytes)\n// \n// 5 xrefs:\n// > EditorUI::updateCreateMenu @ 0x482778\n// > EditorUI::onSelectBuildTab @ 0x4827fa\n// > EditorUI::handleEditorAction @ 0x6f2438\n// > EditorUI::handleEditorAction @ 0x6f244c\n// > EditorUI::setupCreateMenu @ 0x70c23e\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::selectBuildTab(unsigned int this, unsigned int a2)\n{\n  unsigned int v2; // r4\n  int v3; // r3\n  unsigned int v4; // r5\n  bool v5; // zf\n  EditorSFXManager *v6; // r0\n  EditorSFXManager *v7; // r0\n  unsigned int i; // r5\n  int v9; // r6\n  unsigned int j; // r5\n  CCMenuItemToggler *v11; // r0\n  unsigned int v12; // r3\n\n  v2 = this;\n  v3 = *(_DWORD *)(this + 1016);\n  v4 = a2;\n  if ( v3 != a2 && (*(_DWORD *)(this + 940) == 2 || v3 == -1) )\n  {\n    if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(this + 816)) - 1 <= a2 )\n    {\n      v6 = (EditorSFXManager *)(cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 816)) - 1);\n      v5 = v6 == nullptr;\n    }\n    else\n    {\n      v6 = (EditorSFXManager *)v4;\n      v5 = v4 == 0;\n    }\n    if ( !v5 )\n      v6 = (EditorSFXManager *)((char *)&dword_0 + 1);\n    if ( v6 )\n    {\n      v6 = (EditorSFXManager *)(cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 816)) - 1);\n      if ( (unsigned int)v6 <= v4 )\n      {\n        v6 = (EditorSFXManager *)cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 816));\n        v4 = (unsigned int)v6 - 1;\n      }\n    }\n    else\n    {\n      v4 = 0;\n    }\n    v7 = (EditorSFXManager *)EditorSFXManager::sharedState(v6);\n    EditorSFXManager::playAction(v7, 164);\n    *(_DWORD *)(v2 + 1016) = v4;\n    for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 816)); ++i )\n    {\n      v9 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v2 + 816), i);\n      (*(void (__fastcall **)(int, bool))(*(_DWORD *)v9 + 172))(v9, i == *(_DWORD *)(v2 + 1016));\n      v5 = i == *(_DWORD *)(v2 + 1016);\n      if ( v5 )\n        *(_DWORD *)(v2 + 612) = v9;\n    }\n    for ( j = 0; ; ++j )\n    {\n      this = cocos2d::CCArray::count(*(cocos2d::CCArray **)(v2 + 824));\n      if ( j >= this )\n        break;\n      v11 = (CCMenuItemToggler *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v2 + 824), j);\n      v12 = j - *(_DWORD *)(v2 + 1016);\n      CCMenuItemToggler::toggle(v11, v12 == 0);\n    }\n  }\n  return this;\n}", "assembly": "; \n; EditorUI::selectBuildTab from 0x4825d0 to 0x4826a2 (210 bytes)\n; \n; 5 xrefs:\n; > EditorUI::updateCreateMenu @ 0x482778\n; > EditorUI::onSelectBuildTab @ 0x4827fa\n; > EditorUI::handleEditorAction @ 0x6f2438\n; > EditorUI::handleEditorAction @ 0x6f244c\n; > EditorUI::setupCreateMenu @ 0x70c23e\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            {R4-R6,LR}                                             ; +0x0, 0x4825d0\nMOV             R4, R0                                                 ; +0x2, 0x4825d2\nLDR.W           R3, [R0,#0x3F8]                                        ; +0x4, 0x4825d4\nMOV             R5, R1                                                 ; +0x8, 0x4825d8\nCMP             R3, R1                                                 ; +0xa, 0x4825da\nBEQ             locret_4826A0                                          ; +0xc, 0x4825dc\nLDR.W           R2, [R0,#0x3AC]                                        ; +0xe, 0x4825de\nCMP             R2, #2                                                 ; +0x12, 0x4825e2\nBEQ             loc_4825EA                                             ; +0x14, 0x4825e4\nADDS            R3, #1                                                 ; +0x16, 0x4825e6\nBNE             locret_4826A0                                          ; +0x18, 0x4825e8\nLDR.W           R0, [R4,#0x330]; this                                  ; +0x1a, 0x4825ea\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x1e, 0x4825ee\nSUBS            R0, #1                                                 ; +0x22, 0x4825f2\nCMP             R0, R5                                                 ; +0x24, 0x4825f4\nBLS             loc_4825FC                                             ; +0x26, 0x4825f6\nMOVS            R0, R5                                                 ; +0x28, 0x4825f8\nB               loc_482608                                             ; +0x2a, 0x4825fa\nLDR.W           R0, [R4,#0x330]; this                                  ; +0x2c, 0x4825fc\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x30, 0x482600\nADDS.W          R0, R0, #0xFFFFFFFF                                    ; +0x34, 0x482604\nIT NE                                                                  ; +0x38, 0x482608\nMOVNE           R0, #(dword_0+1); this                                 ; +0x3a, 0x48260a\nCBZ             R0, loc_482628                                         ; +0x3c, 0x48260c\nLDR.W           R0, [R4,#0x330]; this                                  ; +0x3e, 0x48260e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x42, 0x482612\nSUBS            R0, #1                                                 ; +0x46, 0x482616\nCMP             R0, R5                                                 ; +0x48, 0x482618\nBHI             loc_48262A                                             ; +0x4a, 0x48261a\nLDR.W           R0, [R4,#0x330]; this                                  ; +0x4c, 0x48261c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x50, 0x482620\nSUBS            R5, R0, #1                                             ; +0x54, 0x482624\nB               loc_48262A                                             ; +0x56, 0x482626\nMOV             R5, R0                                                 ; +0x58, 0x482628\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x5a, 0x48262a\nMOVS            R1, #0xA4; int                                         ; +0x5e, 0x48262e\nBL              _ZN16EditorSFXManager10playActionEi; EditorSFXManager::playAction(int) ; +0x60, 0x482630\nSTR.W           R5, [R4,#0x3F8]                                        ; +0x64, 0x482634\nMOVS            R5, #0                                                 ; +0x68, 0x482638\nLDR.W           R0, [R4,#0x330]; this                                  ; +0x6a, 0x48263a\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x6e, 0x48263e\nCMP             R5, R0                                                 ; +0x72, 0x482642\nBCS             loc_482676                                             ; +0x74, 0x482644\nMOV             R1, R5; unsigned int                                   ; +0x76, 0x482646\nLDR.W           R0, [R4,#0x330]; this                                  ; +0x78, 0x482648\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x7c, 0x48264c\nLDR.W           R1, [R4,#0x3F8]                                        ; +0x80, 0x482650\nSUBS            R2, R5, R1                                             ; +0x84, 0x482654\nNEGS            R1, R2                                                 ; +0x86, 0x482656\nADCS            R1, R2                                                 ; +0x88, 0x482658\nLDR             R3, [R0]                                               ; +0x8a, 0x48265a\nMOV             R6, R0                                                 ; +0x8c, 0x48265c\nLDR.W           R3, [R3,#0xAC]                                         ; +0x8e, 0x48265e\nBLX             R3                                                     ; +0x92, 0x482662\nLDR.W           R3, [R4,#0x3F8]                                        ; +0x94, 0x482664\nCMP             R5, R3                                                 ; +0x98, 0x482668\nADD.W           R5, R5, #1                                             ; +0x9a, 0x48266a\nIT EQ                                                                  ; +0x9e, 0x48266e\nSTREQ.W         R6, [R4,#0x264]                                        ; +0xa0, 0x482670\nB               loc_48263A                                             ; +0xa4, 0x482674\nMOVS            R5, #0                                                 ; +0xa6, 0x482676\nLDR.W           R0, [R4,#0x338]; this                                  ; +0xa8, 0x482678\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xac, 0x48267c\nCMP             R5, R0                                                 ; +0xb0, 0x482680\nBCS             locret_4826A0                                          ; +0xb2, 0x482682\nMOV             R1, R5; unsigned int                                   ; +0xb4, 0x482684\nLDR.W           R0, [R4,#0x338]; this                                  ; +0xb6, 0x482686\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xba, 0x48268a\nLDR.W           R1, [R4,#0x3F8]                                        ; +0xbe, 0x48268e\nSUBS            R3, R5, R1                                             ; +0xc2, 0x482692\nADDS            R5, #1                                                 ; +0xc4, 0x482694\nNEGS            R1, R3                                                 ; +0xc6, 0x482696\nADCS            R1, R3; bool                                           ; +0xc8, 0x482698\nBL              _ZN17CCMenuItemToggler6toggleEb; CCMenuItemToggler::toggle(bool) ; +0xca, 0x48269a\nB               loc_482678                                             ; +0xce, 0x48269e\nPOP             {R4-R6,PC}                                             ; +0xd0, 0x4826a0", "xrefs": ["EditorUI::updateCreateMenu @ 0x482778", "EditorUI::onSelectBuildTab @ 0x4827fa", "EditorUI::handleEditorAction @ 0x6f2438", "EditorUI::handleEditorAction @ 0x6f244c", "EditorUI::setupCreateMenu @ 0x70c23e"], "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"}