{"type": "func", "start": 4295035088, "end": 4295035459, "name": "EditorUI::selectBuildTab", "pseudocode": "// \n// EditorUI::selectBuildTab from 0x1000108d0 to 0x100010a43 (371 bytes)\n// \n// 4 xrefs:\n// > EditorUI::updateCreateMenu @ 0x10000d43b\n// > sub_1000124C0 @ 0x1000124dd\n// > EditorUI::handleEditorAction @ 0x10060c731\n// > EditorUI::setupCreateMenu @ 0x100637e49\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 12:18:52 +0000\n// \n\n__int64 __fastcall EditorUI::selectBuildTab(__int64 a1, unsigned int a2)\n{\n  __int64 result; // rax\n  unsigned int v3; // r14d\n  __int64 v5; // rdi\n  unsigned int v6; // ecx\n  unsigned int v7; // eax\n  __int64 v8; // rax\n  unsigned int v9; // r14d\n  __int64 v10; // r15\n  unsigned int v11; // r14d\n  __int64 v12; // rax\n\n  result = *(unsigned int *)(a1 + 1536);\n  if ( (_DWORD)result != a2 )\n  {\n    v3 = a2;\n    if ( (_DWORD)result == -1 || *(_DWORD *)(a1 + 1436) == 2 )\n    {\n      v5 = *(_QWORD *)(a1 + 1192);\n      v6 = sub_1007FEF90(v5) - 1;\n      v7 = a2;\n      if ( v6 <= a2 )\n      {\n        v5 = *(_QWORD *)(a1 + 1192);\n        v7 = sub_1007FEF90(v5) - 1;\n      }\n      if ( v7 )\n      {\n        v5 = *(_QWORD *)(a1 + 1192);\n        if ( (unsigned int)sub_1007FEF90(v5) - 1 <= a2 )\n        {\n          v5 = *(_QWORD *)(a1 + 1192);\n          v3 = sub_1007FEF90(v5) - 1;\n        }\n      }\n      else\n      {\n        v3 = 0;\n      }\n      v8 = EditorSFXManager::sharedState(v5);\n      EditorSFXManager::playAction_1(v8, 164);\n      *(_DWORD *)(a1 + 1536) = v3;\n      if ( (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 1192)) )\n      {\n        v9 = 0;\n        do\n        {\n          v10 = sub_1007FEFE0(*(_QWORD *)(a1 + 1192), v9);\n          (*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v10 + 344LL))(v10, v9 == *(_DWORD *)(a1 + 1536));\n          if ( v9 == *(_DWORD *)(a1 + 1536) )\n            *(_QWORD *)(a1 + 824) = v10;\n          ++v9;\n        }\n        while ( v9 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 1192)) );\n      }\n      result = sub_1007FEF90(*(_QWORD *)(a1 + 1208));\n      if ( (_DWORD)result )\n      {\n        v11 = 0;\n        do\n        {\n          v12 = sub_1007FEFE0(*(_QWORD *)(a1 + 1208), v11);\n          CCMenuItemToggler::toggle(v12, v11++ == *(_DWORD *)(a1 + 1536));\n          result = sub_1007FEF90(*(_QWORD *)(a1 + 1208));\n        }\n        while ( v11 < (unsigned int)result );\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::selectBuildTab from 0x1000108d0 to 0x100010a43 (371 bytes)\n; \n; 4 xrefs:\n; > EditorUI::updateCreateMenu @ 0x10000d43b\n; > sub_1000124C0 @ 0x1000124dd\n; > EditorUI::handleEditorAction @ 0x10060c731\n; > EditorUI::setupCreateMenu @ 0x100637e49\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 12:18:52 +0000\n; \nmov     eax, [rdi+600h]                                                ; +0x0, 0x1000108d0\ncmp     eax, esi                                                       ; +0x6, 0x1000108d6\njz      locret_100010A42                                               ; +0x8, 0x1000108d8\npush    rbp                                                            ; +0xe, 0x1000108de\nmov     rbp, rsp                                                       ; +0xf, 0x1000108df\npush    r15                                                            ; +0x12, 0x1000108e2\npush    r14                                                            ; +0x14, 0x1000108e4\npush    rbx                                                            ; +0x16, 0x1000108e6\npush    rax                                                            ; +0x17, 0x1000108e7\nmov     r14d, esi                                                      ; +0x18, 0x1000108e8\nmov     rbx, rdi                                                       ; +0x1b, 0x1000108eb\ncmp     eax, 0FFFFFFFFh                                                ; +0x1e, 0x1000108ee\njz      short loc_100010900                                            ; +0x21, 0x1000108f1\ncmp     dword ptr [rbx+59Ch], 2                                        ; +0x23, 0x1000108f3\njnz     loc_100010A38                                                  ; +0x2a, 0x1000108fa\nmov     rdi, [rbx+4A8h]                                                ; +0x30, 0x100010900\ncall    sub_1007FEF90                                                  ; +0x37, 0x100010907\nmov     ecx, eax                                                       ; +0x3c, 0x10001090c\ndec     ecx                                                            ; +0x3e, 0x10001090e\nmov     eax, r14d                                                      ; +0x40, 0x100010910\ncmp     ecx, r14d                                                      ; +0x43, 0x100010913\nja      short loc_100010926                                            ; +0x46, 0x100010916\nmov     rdi, [rbx+4A8h]                                                ; +0x48, 0x100010918\ncall    sub_1007FEF90                                                  ; +0x4f, 0x10001091f\ndec     eax                                                            ; +0x54, 0x100010924\ntest    eax, eax                                                       ; +0x56, 0x100010926\njz      short loc_100010951                                            ; +0x58, 0x100010928\nmov     rdi, [rbx+4A8h]                                                ; +0x5a, 0x10001092a\ncall    sub_1007FEF90                                                  ; +0x61, 0x100010931\ndec     eax                                                            ; +0x66, 0x100010936\ncmp     eax, r14d                                                      ; +0x68, 0x100010938\nja      short loc_100010954                                            ; +0x6b, 0x10001093b\nmov     rdi, [rbx+4A8h]                                                ; +0x6d, 0x10001093d\ncall    sub_1007FEF90                                                  ; +0x74, 0x100010944\nmov     r14d, eax                                                      ; +0x79, 0x100010949\ndec     r14d                                                           ; +0x7c, 0x10001094c\njmp     short loc_100010954                                            ; +0x7f, 0x10001094f\nxor     r14d, r14d                                                     ; +0x81, 0x100010951\ncall    EditorSFXManager__sharedState                                  ; +0x84, 0x100010954\nmov     rdi, rax                                                       ; +0x89, 0x100010959\nmov     esi, 0A4h                                                      ; +0x8c, 0x10001095c\ncall    EditorSFXManager__playAction_1                                 ; +0x91, 0x100010961\nmov     [rbx+600h], r14d                                               ; +0x96, 0x100010966\nmov     rdi, [rbx+4A8h]                                                ; +0x9d, 0x10001096d\ncall    sub_1007FEF90                                                  ; +0xa4, 0x100010974\ntest    eax, eax                                                       ; +0xa9, 0x100010979\njz      short loc_1000109E1                                            ; +0xab, 0x10001097b\nxor     r14d, r14d                                                     ; +0xad, 0x10001097d\njmp     short loc_1000109A4                                            ; +0xb0, 0x100010980\nalign 10h                                                              ; +0xb2, 0x100010982\ninc     r14d                                                           ; +0xc0, 0x100010990\nmov     rdi, [rbx+4A8h]                                                ; +0xc3, 0x100010993\ncall    sub_1007FEF90                                                  ; +0xca, 0x10001099a\ncmp     r14d, eax                                                      ; +0xcf, 0x10001099f\njnb     short loc_1000109E1                                            ; +0xd2, 0x1000109a2\nmov     rdi, [rbx+4A8h]                                                ; +0xd4, 0x1000109a4\nmov     esi, r14d                                                      ; +0xdb, 0x1000109ab\ncall    sub_1007FEFE0                                                  ; +0xde, 0x1000109ae\nmov     r15, rax                                                       ; +0xe3, 0x1000109b3\nxor     esi, esi                                                       ; +0xe6, 0x1000109b6\ncmp     r14d, [rbx+600h]                                               ; +0xe8, 0x1000109b8\nsetz    sil                                                            ; +0xef, 0x1000109bf\nmov     rax, [rax]                                                     ; +0xf3, 0x1000109c3\nmov     rdi, r15                                                       ; +0xf6, 0x1000109c6\ncall    qword ptr [rax+158h]                                           ; +0xf9, 0x1000109c9\ncmp     r14d, [rbx+600h]                                               ; +0xff, 0x1000109cf\njnz     short loc_100010990                                            ; +0x106, 0x1000109d6\nmov     [rbx+338h], r15                                                ; +0x108, 0x1000109d8\njmp     short loc_100010990                                            ; +0x10f, 0x1000109df\nmov     rdi, [rbx+4B8h]                                                ; +0x111, 0x1000109e1\ncall    sub_1007FEF90                                                  ; +0x118, 0x1000109e8\ntest    eax, eax                                                       ; +0x11d, 0x1000109ed\njz      short loc_100010A38                                            ; +0x11f, 0x1000109ef\nxor     r14d, r14d                                                     ; +0x121, 0x1000109f1\nnop     word ptr [rax+rax+00000000h]                                   ; +0x124, 0x1000109f4\nmov     rdi, [rbx+4B8h]                                                ; +0x130, 0x100010a00\nmov     esi, r14d                                                      ; +0x137, 0x100010a07\ncall    sub_1007FEFE0                                                  ; +0x13a, 0x100010a0a\nxor     esi, esi                                                       ; +0x13f, 0x100010a0f\ncmp     r14d, [rbx+600h]                                               ; +0x141, 0x100010a11\nsetz    sil                                                            ; +0x148, 0x100010a18\nmov     rdi, rax                                                       ; +0x14c, 0x100010a1c\ncall    CCMenuItemToggler__toggle                                      ; +0x14f, 0x100010a1f\ninc     r14d                                                           ; +0x154, 0x100010a24\nmov     rdi, [rbx+4B8h]                                                ; +0x157, 0x100010a27\ncall    sub_1007FEF90                                                  ; +0x15e, 0x100010a2e\ncmp     r14d, eax                                                      ; +0x163, 0x100010a33\njb      short loc_100010A00                                            ; +0x166, 0x100010a36\nadd     rsp, 8                                                         ; +0x168, 0x100010a38\npop     rbx                                                            ; +0x16c, 0x100010a3c\npop     r14                                                            ; +0x16d, 0x100010a3d\npop     r15                                                            ; +0x16f, 0x100010a3f\npop     rbp                                                            ; +0x171, 0x100010a41\nretn                                                                   ; +0x172, 0x100010a42", "xrefs": ["EditorUI::updateCreateMenu @ 0x10000d43b", "sub_1000124C0 @ 0x1000124dd", "EditorUI::handleEditorAction @ 0x10060c731", "EditorUI::setupCreateMenu @ 0x100637e49"], "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"}