{"type": "func", "start": 5372373168, "end": 5372373358, "name": "GJGarageLayer::selectTab", "pseudocode": "// \n// GJGarageLayer::selectTab from 0x14037e8b0 to 0x14037e96e (190 bytes)\n// \n// 5 xrefs:\n// > GJGarageLayer::setupIconSelect @ 0x14037e71d\n// > GJGarageLayer::onSelectTab @ 0x14037e89c\n// > <???> @ 0x1408bcf44\n// > <???> @ 0x1408bcf54\n// > <???> @ 0x140922868\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:31:04 +0000\n// \n\n__int64 __fastcall GJGarageLayer::selectTab(__int64 a1, unsigned int a2)\n{\n  unsigned int i; // ebp\n  struct cocos2d::CCObject *v4; // rdi\n  int v5; // ebx\n  __int64 v6; // rdx\n  __int64 v7; // rdx\n  unsigned int *v8; // rax\n  unsigned int v10; // [rsp+38h] [rbp+10h] BYREF\n\n  v10 = a2;\n  for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 480)); ++i )\n  {\n    v4 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 480), i);\n    v5 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v4 + 56LL))(v4);\n    LOBYTE(v6) = v10 == v5;\n    CCMenuItemToggler::toggle((__int64)v4, v6);\n    LOBYTE(v7) = v10 != v5;\n    (*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v4 + 936LL))(v4, v7);\n  }\n  v8 = (unsigned int *)sub_14010ECC0((__int64 *)(a1 + 520), (int *)&v10);\n  return GJGarageLayer::setupPage(a1, *v8, v10);\n}", "assembly": "; \n; GJGarageLayer::selectTab from 0x14037e8b0 to 0x14037e96e (190 bytes)\n; \n; 5 xrefs:\n; > GJGarageLayer::setupIconSelect @ 0x14037e71d\n; > GJGarageLayer::onSelectTab @ 0x14037e89c\n; > <???> @ 0x1408bcf44\n; > <???> @ 0x1408bcf54\n; > <???> @ 0x140922868\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:31:04 +0000\n; \nmov     [rsp+arg_18], rbp                                              ; +0x0, 0x14037e8b0\nmov     [rsp+arg_8], edx                                               ; +0x5, 0x14037e8b5\npush    rsi                                                            ; +0x9, 0x14037e8b9\nsub     rsp, 20h                                                       ; +0xa, 0x14037e8ba\nmov     rsi, rcx                                                       ; +0xe, 0x14037e8be\nxor     ebp, ebp                                                       ; +0x11, 0x14037e8c1\nmov     rcx, [rcx+1E0h]                                                ; +0x13, 0x14037e8c3\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1a, 0x14037e8ca\ntest    eax, eax                                                       ; +0x20, 0x14037e8d0\njz      short loc_14037E943                                            ; +0x22, 0x14037e8d2\nmov     [rsp+28h+arg_0], rbx                                           ; +0x24, 0x14037e8d4\nmov     [rsp+28h+arg_10], rdi                                          ; +0x29, 0x14037e8d9\nxchg    ax, ax                                                         ; +0x2e, 0x14037e8de\nmov     rcx, [rsi+1E0h]                                                ; +0x30, 0x14037e8e0\nmov     edx, ebp                                                       ; +0x37, 0x14037e8e7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x39, 0x14037e8e9\nmov     rdi, rax                                                       ; +0x3f, 0x14037e8ef\nmov     rcx, [rax]                                                     ; +0x42, 0x14037e8f2\nmov     rdx, [rcx+38h]                                                 ; +0x45, 0x14037e8f5\nmov     rcx, rax                                                       ; +0x49, 0x14037e8f9\ncall    rdx                                                            ; +0x4c, 0x14037e8fc\ncmp     [rsp+28h+arg_8], eax                                           ; +0x4e, 0x14037e8fe\nmov     rcx, rdi                                                       ; +0x52, 0x14037e902\nmov     ebx, eax                                                       ; +0x55, 0x14037e905\nsetz    dl                                                             ; +0x57, 0x14037e907\ncall    CCMenuItemToggler__toggle                                      ; +0x5a, 0x14037e90a\nmov     rcx, [rdi]                                                     ; +0x5f, 0x14037e90f\ncmp     [rsp+28h+arg_8], ebx                                           ; +0x62, 0x14037e912\nsetnz   dl                                                             ; +0x66, 0x14037e916\nmov     r8, [rcx+3A8h]                                                 ; +0x69, 0x14037e919\nmov     rcx, rdi                                                       ; +0x70, 0x14037e920\ncall    r8                                                             ; +0x73, 0x14037e923\nmov     rcx, [rsi+1E0h]                                                ; +0x76, 0x14037e926\ninc     ebp                                                            ; +0x7d, 0x14037e92d\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7f, 0x14037e92f\ncmp     ebp, eax                                                       ; +0x85, 0x14037e935\njb      short loc_14037E8E0                                            ; +0x87, 0x14037e937\nmov     rdi, [rsp+28h+arg_10]                                          ; +0x89, 0x14037e939\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x8e, 0x14037e93e\nlea     rcx, [rsi+208h]                                                ; +0x93, 0x14037e943\nlea     rdx, [rsp+28h+arg_8]                                           ; +0x9a, 0x14037e94a\ncall    sub_14010ECC0                                                  ; +0x9f, 0x14037e94f\nmov     r8d, [rsp+28h+arg_8]                                           ; +0xa4, 0x14037e954\nmov     rcx, rsi                                                       ; +0xa9, 0x14037e959\nmov     edx, [rax]                                                     ; +0xac, 0x14037e95c\ncall    GJGarageLayer__setupPage                                       ; +0xae, 0x14037e95e\nmov     rbp, [rsp+28h+arg_18]                                          ; +0xb3, 0x14037e963\nadd     rsp, 20h                                                       ; +0xb8, 0x14037e968\npop     rsi                                                            ; +0xbc, 0x14037e96c\nretn                                                                   ; +0xbd, 0x14037e96d", "xrefs": ["GJGarageLayer::setupIconSelect @ 0x14037e71d", "GJGarageLayer::onSelectTab @ 0x14037e89c", "<???> @ 0x1408bcf44", "<???> @ 0x1408bcf54", "<???> @ 0x140922868"], "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"}