{"type": "func", "start": 5370500848, "end": 5370501203, "name": "EditorUI::selectBuildTab", "pseudocode": "// \n// EditorUI::selectBuildTab from 0x1401b56f0 to 0x1401b5853 (355 bytes)\n// \n// 8 xrefs:\n// > EditorUI::updateCreateMenu @ 0x1401b23cd\n// > EditorUI::onSelectBuildTab @ 0x1401b56dc\n// > EditorUI::handleEditorAction @ 0x1401c44a2\n// > EditorUI::handleEditorAction @ 0x1401c44c1\n// > EditorUI::setupCreateMenu @ 0x1401f07c9\n// > <???> @ 0x1408a1bb8\n// > <???> @ 0x1408a1bec\n// > <???> @ 0x14091a1ec\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:27:57 +0000\n// \n\nunsigned int __fastcall EditorUI::selectBuildTab(__int64 a1, unsigned int a2)\n{\n  unsigned int result; // eax\n  unsigned int v3; // edi\n  __int64 v5; // rax\n  cocos2d::CCArray *v6; // rcx\n  unsigned int v7; // esi\n  unsigned int v8; // edi\n  struct cocos2d::CCObject *v9; // r14\n  __int64 v10; // rdx\n  struct cocos2d::CCObject *v11; // rax\n  __int64 v12; // rdx\n\n  result = *(_DWORD *)(a1 + 1608);\n  v3 = a2;\n  if ( result != a2 && (*(_DWORD *)(a1 + 1508) == 2 || result == -1) )\n  {\n    if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1240)) - 1 < a2 )\n      cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1240));\n    if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1240)) - 1 < v3 )\n      v3 = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1240)) - 1;\n    v5 = EditorSFXManager::sharedState();\n    EditorSFXManager::playAction(v5, 164);\n    v6 = *(cocos2d::CCArray **)(a1 + 1240);\n    v7 = 0;\n    *(_DWORD *)(a1 + 1608) = v3;\n    v8 = 0;\n    if ( cocos2d::CCArray::count(v6) )\n    {\n      do\n      {\n        v9 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 1240), v8);\n        LOBYTE(v10) = v8 == *(_DWORD *)(a1 + 1608);\n        (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v9 + 336LL))(v9, v10);\n        if ( v8 == *(_DWORD *)(a1 + 1608) )\n          *(_QWORD *)(a1 + 872) = v9;\n        ++v8;\n      }\n      while ( v8 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1240)) );\n    }\n    result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1256));\n    if ( result )\n    {\n      do\n      {\n        v11 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 1256), v7);\n        LOBYTE(v12) = v7 == *(_DWORD *)(a1 + 1608);\n        CCMenuItemToggler::toggle((__int64)v11, v12);\n        ++v7;\n        result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 1256));\n      }\n      while ( v7 < result );\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::selectBuildTab from 0x1401b56f0 to 0x1401b5853 (355 bytes)\n; \n; 8 xrefs:\n; > EditorUI::updateCreateMenu @ 0x1401b23cd\n; > EditorUI::onSelectBuildTab @ 0x1401b56dc\n; > EditorUI::handleEditorAction @ 0x1401c44a2\n; > EditorUI::handleEditorAction @ 0x1401c44c1\n; > EditorUI::setupCreateMenu @ 0x1401f07c9\n; > <???> @ 0x1408a1bb8\n; > <???> @ 0x1408a1bec\n; > <???> @ 0x14091a1ec\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:27:57 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1401b56f0\npush    rdi                                                            ; +0x5, 0x1401b56f5\nsub     rsp, 20h                                                       ; +0x6, 0x1401b56f6\nmov     eax, [rcx+648h]                                                ; +0xa, 0x1401b56fa\nmov     edi, edx                                                       ; +0x10, 0x1401b5700\nmov     rbx, rcx                                                       ; +0x12, 0x1401b5702\ncmp     eax, edx                                                       ; +0x15, 0x1401b5705\njz      loc_1401B5848                                                  ; +0x17, 0x1401b5707\ncmp     dword ptr [rcx+5E4h], 2                                        ; +0x1d, 0x1401b570d\njz      short loc_1401B571F                                            ; +0x24, 0x1401b5714\ncmp     eax, 0FFFFFFFFh                                                ; +0x26, 0x1401b5716\njnz     loc_1401B5848                                                  ; +0x29, 0x1401b5719\nmov     rcx, [rcx+4D8h]                                                ; +0x2f, 0x1401b571f\nmov     [rsp+28h+arg_0], rsi                                           ; +0x36, 0x1401b5726\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x3b, 0x1401b572b\ndec     eax                                                            ; +0x41, 0x1401b5731\ncmp     eax, edi                                                       ; +0x43, 0x1401b5733\njnb     short loc_1401B5744                                            ; +0x45, 0x1401b5735\nmov     rcx, [rbx+4D8h]                                                ; +0x47, 0x1401b5737\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x4e, 0x1401b573e\nmov     rcx, [rbx+4D8h]                                                ; +0x54, 0x1401b5744\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x5b, 0x1401b574b\ndec     eax                                                            ; +0x61, 0x1401b5751\ncmp     eax, edi                                                       ; +0x63, 0x1401b5753\njnb     short loc_1401B5767                                            ; +0x65, 0x1401b5755\nmov     rcx, [rbx+4D8h]                                                ; +0x67, 0x1401b5757\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x6e, 0x1401b575e\nlea     edi, [rax-1]                                                   ; +0x74, 0x1401b5764\ncall    EditorSFXManager__sharedState                                  ; +0x77, 0x1401b5767\nmov     rcx, rax                                                       ; +0x7c, 0x1401b576c\nmov     edx, 0A4h                                                      ; +0x7f, 0x1401b576f\ncall    EditorSFXManager__playAction                                   ; +0x84, 0x1401b5774\nmov     rcx, [rbx+4D8h]                                                ; +0x89, 0x1401b5779\nxor     esi, esi                                                       ; +0x90, 0x1401b5780\nmov     [rbx+648h], edi                                                ; +0x92, 0x1401b5782\nmov     edi, esi                                                       ; +0x98, 0x1401b5788\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x9a, 0x1401b578a\ntest    eax, eax                                                       ; +0xa0, 0x1401b5790\njz      short loc_1401B57F2                                            ; +0xa2, 0x1401b5792\nmov     [rsp+28h+arg_8], r14                                           ; +0xa4, 0x1401b5794\nnop     dword ptr [rax+00000000h]                                      ; +0xa9, 0x1401b5799\nmov     rcx, [rbx+4D8h]                                                ; +0xb0, 0x1401b57a0\nmov     edx, edi                                                       ; +0xb7, 0x1401b57a7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xb9, 0x1401b57a9\ncmp     edi, [rbx+648h]                                                ; +0xbf, 0x1401b57af\nmov     r14, rax                                                       ; +0xc5, 0x1401b57b5\nsetz    dl                                                             ; +0xc8, 0x1401b57b8\nmov     rcx, [rax]                                                     ; +0xcb, 0x1401b57bb\nmov     r8, [rcx+150h]                                                 ; +0xce, 0x1401b57be\nmov     rcx, rax                                                       ; +0xd5, 0x1401b57c5\ncall    r8                                                             ; +0xd8, 0x1401b57c8\ncmp     edi, [rbx+648h]                                                ; +0xdb, 0x1401b57cb\njnz     short loc_1401B57DA                                            ; +0xe1, 0x1401b57d1\nmov     [rbx+368h], r14                                                ; +0xe3, 0x1401b57d3\nmov     rcx, [rbx+4D8h]                                                ; +0xea, 0x1401b57da\ninc     edi                                                            ; +0xf1, 0x1401b57e1\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xf3, 0x1401b57e3\ncmp     edi, eax                                                       ; +0xf9, 0x1401b57e9\njb      short loc_1401B57A0                                            ; +0xfb, 0x1401b57eb\nmov     r14, [rsp+28h+arg_8]                                           ; +0xfd, 0x1401b57ed\nmov     rcx, [rbx+4E8h]                                                ; +0x102, 0x1401b57f2\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x109, 0x1401b57f9\ntest    eax, eax                                                       ; +0x10f, 0x1401b57ff\njz      short loc_1401B5843                                            ; +0x111, 0x1401b5801\nnop     dword ptr [rax+00h]                                            ; +0x113, 0x1401b5803\nnop     word ptr [rax+rax+00000000h]                                   ; +0x117, 0x1401b5807\nmov     rcx, [rbx+4E8h]                                                ; +0x120, 0x1401b5810\nmov     edx, esi                                                       ; +0x127, 0x1401b5817\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x129, 0x1401b5819\ncmp     esi, [rbx+648h]                                                ; +0x12f, 0x1401b581f\nmov     rcx, rax                                                       ; +0x135, 0x1401b5825\nsetz    dl                                                             ; +0x138, 0x1401b5828\ncall    CCMenuItemToggler__toggle                                      ; +0x13b, 0x1401b582b\nmov     rcx, [rbx+4E8h]                                                ; +0x140, 0x1401b5830\ninc     esi                                                            ; +0x147, 0x1401b5837\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x149, 0x1401b5839\ncmp     esi, eax                                                       ; +0x14f, 0x1401b583f\njb      short loc_1401B5810                                            ; +0x151, 0x1401b5841\nmov     rsi, [rsp+28h+arg_0]                                           ; +0x153, 0x1401b5843\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x158, 0x1401b5848\nadd     rsp, 20h                                                       ; +0x15d, 0x1401b584d\npop     rdi                                                            ; +0x161, 0x1401b5851\nretn                                                                   ; +0x162, 0x1401b5852", "xrefs": ["EditorUI::updateCreateMenu @ 0x1401b23cd", "EditorUI::onSelectBuildTab @ 0x1401b56dc", "EditorUI::handleEditorAction @ 0x1401c44a2", "EditorUI::handleEditorAction @ 0x1401c44c1", "EditorUI::setupCreateMenu @ 0x1401f07c9", "<???> @ 0x1408a1bb8", "<???> @ 0x1408a1bec", "<???> @ 0x14091a1ec"], "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"}