{"type": "func", "start": 5369913680, "end": 5369914002, "name": "ColorSelectLiveOverlay::onSelectTab", "pseudocode": "// \n// ColorSelectLiveOverlay::onSelectTab from 0x140126150 to 0x140126292 (322 bytes)\n// \n// 5 xrefs:\n// > ColorSelectLiveOverlay::init @ 0x140125bbf\n// > ColorSelectLiveOverlay::init @ 0x140125ca3\n// > <???> @ 0x140898248\n// > <???> @ 0x140898284\n// > <???> @ 0x14091697c\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:26:58 +0000\n// \n\n__int64 __fastcall ColorSelectLiveOverlay::onSelectTab(__int64 a1, __int64 a2)\n{\n  __int64 result; // rax\n  __int64 v5; // rcx\n  __int64 v6; // rdx\n  unsigned int i; // ebp\n  struct cocos2d::CCObject *v8; // rdi\n  int v9; // ebx\n  int v10; // eax\n  const char *v11; // rdx\n  __int64 v12; // rdx\n  __int16 v13; // [rsp+40h] [rbp+8h] BYREF\n  char v14; // [rsp+42h] [rbp+Ah]\n\n  result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n  if ( *(_BYTE *)(a1 + 856) != ((_DWORD)result != 1) )\n  {\n    *(_BYTE *)(a1 + 856) = (_DWORD)result != 1;\n    v5 = 696;\n    if ( (_DWORD)result == 1 )\n      v5 = 688;\n    v6 = *(_QWORD *)(v5 + a1);\n    *(_DWORD *)(a1 + 728) = *(_DWORD *)(v6 + 96);\n    v13 = *(_WORD *)(v6 + 72);\n    v14 = *(_BYTE *)(v6 + 74);\n    ColorSelectLiveOverlay::selectColor(a1, &v13);\n    for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 680)); ++i )\n    {\n      v8 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 680), i);\n      v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2);\n      v10 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v8 + 56LL))(v8);\n      v11 = \"GJ_button_04.png\";\n      if ( v9 == v10 )\n        v11 = \"GJ_button_01.png\";\n      ButtonSprite::updateBGImage((__int64)v8, v11);\n    }\n    v12 = 707;\n    if ( !*(_BYTE *)(a1 + 856) )\n      v12 = 704;\n    (**(void (__fastcall ***)(__int64, __int64))(*(_QWORD *)(a1 + 792) + 320LL))(\n      *(_QWORD *)(a1 + 792) + 320LL,\n      a1 + v12);\n    return ColorSelectLiveOverlay::updateColorLabel(a1);\n  }\n  return result;\n}", "assembly": "; \n; ColorSelectLiveOverlay::onSelectTab from 0x140126150 to 0x140126292 (322 bytes)\n; \n; 5 xrefs:\n; > ColorSelectLiveOverlay::init @ 0x140125bbf\n; > ColorSelectLiveOverlay::init @ 0x140125ca3\n; > <???> @ 0x140898248\n; > <???> @ 0x140898284\n; > <???> @ 0x14091697c\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:26:58 +0000\n; \npush    rsi                                                            ; +0x0, 0x140126150\npush    r14                                                            ; +0x2, 0x140126152\nsub     rsp, 28h                                                       ; +0x4, 0x140126154\nmov     rax, [rdx]                                                     ; +0x8, 0x140126158\nmov     rsi, rcx                                                       ; +0xb, 0x14012615b\nmov     rcx, rdx                                                       ; +0xe, 0x14012615e\nmov     r14, rdx                                                       ; +0x11, 0x140126161\ncall    qword ptr [rax+38h]                                            ; +0x14, 0x140126164\ncmp     eax, 1                                                         ; +0x17, 0x140126167\nsetnz   cl                                                             ; +0x1a, 0x14012616a\ncmp     [rsi+358h], cl                                                 ; +0x1d, 0x14012616d\njz      loc_14012628A                                                  ; +0x23, 0x140126173\nmov     [rsi+358h], cl                                                 ; +0x29, 0x140126179\ncmp     eax, 1                                                         ; +0x2f, 0x14012617f\nmov     edx, 2B0h                                                      ; +0x32, 0x140126182\nmov     [rsp+38h+arg_10], rbp                                          ; +0x37, 0x140126187\nmov     ecx, 2B8h                                                      ; +0x3c, 0x14012618c\ncmovz   ecx, edx                                                       ; +0x41, 0x140126191\nmov     rdx, [rcx+rsi]                                                 ; +0x44, 0x140126194\nmov     rcx, rsi                                                       ; +0x48, 0x140126198\nmov     eax, [rdx+60h]                                                 ; +0x4b, 0x14012619b\nmov     [rsi+2D8h], eax                                                ; +0x4e, 0x14012619e\nmovzx   eax, word ptr [rdx+48h]                                        ; +0x54, 0x1401261a4\nmov     [rsp+38h+arg_0], ax                                            ; +0x58, 0x1401261a8\nmovzx   eax, byte ptr [rdx+4Ah]                                        ; +0x5d, 0x1401261ad\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x61, 0x1401261b1\nmov     [rsp+38h+arg_2], al                                            ; +0x66, 0x1401261b6\ncall    ColorSelectLiveOverlay__selectColor                            ; +0x6a, 0x1401261ba\nmov     rcx, [rsi+2A8h]                                                ; +0x6f, 0x1401261bf\nxor     ebp, ebp                                                       ; +0x76, 0x1401261c6\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x78, 0x1401261c8\ntest    eax, eax                                                       ; +0x7e, 0x1401261ce\njz      loc_140126253                                                  ; +0x80, 0x1401261d0\nmov     [rsp+38h+arg_8], rbx                                           ; +0x86, 0x1401261d6\nmov     [rsp+38h+arg_18], rdi                                          ; +0x8b, 0x1401261db\nmov     [rsp+38h+var_18], r15                                          ; +0x90, 0x1401261e0\nlea     r15, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x95, 0x1401261e5\nnop     dword ptr [rax+00h]                                            ; +0x9c, 0x1401261ec\nmov     rcx, [rsi+2A8h]                                                ; +0xa0, 0x1401261f0\nmov     edx, ebp                                                       ; +0xa7, 0x1401261f7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa9, 0x1401261f9\nmov     rcx, [r14]                                                     ; +0xaf, 0x1401261ff\nmov     rdi, rax                                                       ; +0xb2, 0x140126202\nmov     rdx, [rcx+38h]                                                 ; +0xb5, 0x140126205\nmov     rcx, r14                                                       ; +0xb9, 0x140126209\ncall    rdx                                                            ; +0xbc, 0x14012620c\nmov     rcx, [rdi]                                                     ; +0xbe, 0x14012620e\nmov     ebx, eax                                                       ; +0xc1, 0x140126211\nmov     rdx, [rcx+38h]                                                 ; +0xc3, 0x140126213\nmov     rcx, rdi                                                       ; +0xc7, 0x140126217\ncall    rdx                                                            ; +0xca, 0x14012621a\ncmp     ebx, eax                                                       ; +0xcc, 0x14012621c\nlea     rdx, aGjButton04Png; \"GJ_button_04.png\"                        ; +0xce, 0x14012621e\nmov     rcx, rdi                                                       ; +0xd5, 0x140126225\ncmovz   rdx, r15                                                       ; +0xd8, 0x140126228\ncall    ButtonSprite__updateBGImage                                    ; +0xdc, 0x14012622c\nmov     rcx, [rsi+2A8h]                                                ; +0xe1, 0x140126231\ninc     ebp                                                            ; +0xe8, 0x140126238\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xea, 0x14012623a\ncmp     ebp, eax                                                       ; +0xf0, 0x140126240\njb      short loc_1401261F0                                            ; +0xf2, 0x140126242\nmov     r15, [rsp+38h+var_18]                                          ; +0xf4, 0x140126244\nmov     rdi, [rsp+38h+arg_18]                                          ; +0xf9, 0x140126249\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xfe, 0x14012624e\nmov     rcx, [rsi+318h]                                                ; +0x103, 0x140126253\nmov     eax, 2C0h                                                      ; +0x10a, 0x14012625a\nadd     rcx, 140h                                                      ; +0x10f, 0x14012625f\nmov     edx, 2C3h                                                      ; +0x116, 0x140126266\ncmp     byte ptr [rsi+358h], 0                                         ; +0x11b, 0x14012626b\ncmovz   edx, eax                                                       ; +0x122, 0x140126272\nmov     rax, [rcx]                                                     ; +0x125, 0x140126275\nadd     rdx, rsi                                                       ; +0x128, 0x140126278\ncall    qword ptr [rax]                                                ; +0x12b, 0x14012627b\nmov     rcx, rsi                                                       ; +0x12d, 0x14012627d\ncall    ColorSelectLiveOverlay__updateColorLabel                       ; +0x130, 0x140126280\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x135, 0x140126285\nadd     rsp, 28h                                                       ; +0x13a, 0x14012628a\npop     r14                                                            ; +0x13e, 0x14012628e\npop     rsi                                                            ; +0x140, 0x140126290\nretn                                                                   ; +0x141, 0x140126291", "xrefs": ["ColorSelectLiveOverlay::init @ 0x140125bbf", "ColorSelectLiveOverlay::init @ 0x140125ca3", "<???> @ 0x140898248", "<???> @ 0x140898284", "<???> @ 0x14091697c"], "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"}