{"type": "func", "start": 5369286960, "end": 5369287278, "name": "ColorSelectLiveOverlay::onSelectTab", "pseudocode": "// \n// ColorSelectLiveOverlay::onSelectTab from 0x14008d130 to 0x14008d26e (318 bytes)\n// \n// 5 xrefs:\n// > ColorSelectLiveOverlay::init @ 0x14008cbbf\n// > ColorSelectLiveOverlay::init @ 0x14008cc9a\n// > <???> @ 0x140669014\n// > <???> @ 0x140669050\n// > <???> @ 0x1406c6e34\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid ColorSelectLiveOverlay::onSelectTab(ColorSelectLiveOverlay *a1, cocos2d::CCObject *a2)\n{\n  int v4; // eax\n  ColorAction *m_baseColorAction; // rcx\n  unsigned int i; // ebp\n  ButtonSprite *v7; // rdi\n  int v8; // ebx\n  int v9; // eax\n  const char *v10; // rdx\n  __int64 v11; // rdx\n  cocos2d::ccColor3B m_fromColor; // [rsp+40h] [rbp+8h] BYREF\n\n  v4 = a2->getTag(a2);\n  if ( a1->m_detailColorSelected != (v4 != 1) )\n  {\n    a1->m_detailColorSelected = v4 != 1;\n    if ( v4 == 1 )\n      m_baseColorAction = a1->m_baseColorAction;\n    else\n      m_baseColorAction = a1->m_detailColorAction;\n    a1->m_opacity = m_baseColorAction->m_fromOpacity;\n    m_fromColor = m_baseColorAction->m_fromColor;\n    ColorSelectLiveOverlay::selectColor(a1, &m_fromColor);\n    for ( i = 0; i < cocos2d::CCArray::count(a1->m_12buttons); ++i )\n    {\n      v7 = (ButtonSprite *)cocos2d::CCArray::objectAtIndex(a1->m_12buttons, i);\n      v8 = a2->getTag(a2);\n      v9 = v7->getTag(v7);\n      v10 = \"GJ_button_04.png\";\n      if ( v8 == v9 )\n        v10 = \"GJ_button_01.png\";\n      ButtonSprite::updateBGImage(v7, v10);\n    }\n    v11 = 675;\n    if ( !a1->m_detailColorSelected )\n      v11 = 672;\n    a1->m_oldColorSprite->setColor(\n      &a1->m_oldColorSprite->cocos2d::CCRGBAProtocol,\n      (const cocos2d::ccColor3B *)((char *)a1 + v11));\n    ColorSelectLiveOverlay::updateColorLabel(a1);\n  }\n}", "assembly": "; \n; ColorSelectLiveOverlay::onSelectTab from 0x14008d130 to 0x14008d26e (318 bytes)\n; \n; 5 xrefs:\n; > ColorSelectLiveOverlay::init @ 0x14008cbbf\n; > ColorSelectLiveOverlay::init @ 0x14008cc9a\n; > <???> @ 0x140669014\n; > <???> @ 0x140669050\n; > <???> @ 0x1406c6e34\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\npush    rsi                                                            ; +0x0, 0x14008d130\npush    r14                                                            ; +0x2, 0x14008d132\nsub     rsp, 28h                                                       ; +0x4, 0x14008d134\nmov     rax, [rdx]                                                     ; +0x8, 0x14008d138\nmov     rsi, rcx                                                       ; +0xb, 0x14008d13b\nmov     rcx, rdx                                                       ; +0xe, 0x14008d13e\nmov     r14, rdx                                                       ; +0x11, 0x14008d141\ncall    qword ptr [rax+38h]                                            ; +0x14, 0x14008d144\ncmp     eax, 1                                                         ; +0x17, 0x14008d147\nsetnz   cl                                                             ; +0x1a, 0x14008d14a\ncmp     [rsi+338h], cl                                                 ; +0x1d, 0x14008d14d\njz      loc_14008D266                                                  ; +0x23, 0x14008d153\nmov     [rsp+38h+arg_10], rbp                                          ; +0x29, 0x14008d159\nmov     [rsi+338h], cl                                                 ; +0x2e, 0x14008d15e\ncmp     eax, 1                                                         ; +0x34, 0x14008d164\njz      short loc_14008D172                                            ; +0x37, 0x14008d167\nmov     rcx, [rsi+298h]                                                ; +0x39, 0x14008d169\njmp     short loc_14008D179                                            ; +0x40, 0x14008d170\nmov     rcx, [rsi+290h]                                                ; +0x42, 0x14008d172\nmov     eax, [rcx+60h]                                                 ; +0x49, 0x14008d179\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x4c, 0x14008d17c\nmov     [rsi+2B8h], eax                                                ; +0x51, 0x14008d181\nmovzx   eax, word ptr [rcx+48h]                                        ; +0x57, 0x14008d187\nmov     [rsp+38h+arg_0], ax                                            ; +0x5b, 0x14008d18b\nmovzx   eax, byte ptr [rcx+4Ah]                                        ; +0x60, 0x14008d190\nmov     rcx, rsi                                                       ; +0x64, 0x14008d194\nmov     [rsp+38h+arg_2], al                                            ; +0x67, 0x14008d197\ncall    ColorSelectLiveOverlay__selectColor                            ; +0x6b, 0x14008d19b\nmov     rcx, [rsi+288h]                                                ; +0x70, 0x14008d1a0\nxor     ebp, ebp                                                       ; +0x77, 0x14008d1a7\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x79, 0x14008d1a9\ntest    eax, eax                                                       ; +0x7f, 0x14008d1af\njz      short loc_14008D22D                                            ; +0x81, 0x14008d1b1\nmov     [rsp+38h+arg_8], rbx                                           ; +0x83, 0x14008d1b3\nmov     [rsp+38h+arg_18], rdi                                          ; +0x88, 0x14008d1b8\nmov     [rsp+38h+var_18], r15                                          ; +0x8d, 0x14008d1bd\nlea     r15, aGjButton01Png; \"GJ_button_01.png\"                        ; +0x92, 0x14008d1c2\nnop     dword ptr [rax+00000000h]                                      ; +0x99, 0x14008d1c9\nmov     rcx, [rsi+288h]                                                ; +0xa0, 0x14008d1d0\nmov     edx, ebp                                                       ; +0xa7, 0x14008d1d7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa9, 0x14008d1d9\nmov     rdx, [r14]                                                     ; +0xaf, 0x14008d1df\nmov     rcx, r14                                                       ; +0xb2, 0x14008d1e2\nmov     rdi, rax                                                       ; +0xb5, 0x14008d1e5\ncall    qword ptr [rdx+38h]                                            ; +0xb8, 0x14008d1e8\nmov     rdx, [rdi]                                                     ; +0xbb, 0x14008d1eb\nmov     rcx, rdi                                                       ; +0xbe, 0x14008d1ee\nmov     ebx, eax                                                       ; +0xc1, 0x14008d1f1\ncall    qword ptr [rdx+38h]                                            ; +0xc3, 0x14008d1f3\nlea     rdx, aGjButton04Png; \"GJ_button_04.png\"                        ; +0xc6, 0x14008d1f6\nmov     rcx, rdi                                                       ; +0xcd, 0x14008d1fd\ncmp     ebx, eax                                                       ; +0xd0, 0x14008d200\ncmovz   rdx, r15                                                       ; +0xd2, 0x14008d202\ncall    ButtonSprite__updateBGImage                                    ; +0xd6, 0x14008d206\nmov     rcx, [rsi+288h]                                                ; +0xdb, 0x14008d20b\ninc     ebp                                                            ; +0xe2, 0x14008d212\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xe4, 0x14008d214\ncmp     ebp, eax                                                       ; +0xea, 0x14008d21a\njb      short loc_14008D1D0                                            ; +0xec, 0x14008d21c\nmov     r15, [rsp+38h+var_18]                                          ; +0xee, 0x14008d21e\nmov     rdi, [rsp+38h+arg_18]                                          ; +0xf3, 0x14008d223\nmov     rbx, [rsp+38h+arg_8]                                           ; +0xf8, 0x14008d228\nmov     rcx, [rsi+2F8h]                                                ; +0xfd, 0x14008d22d\nmov     r8d, 2A0h                                                      ; +0x104, 0x14008d234\nadd     rcx, 140h                                                      ; +0x10a, 0x14008d23a\nmov     edx, 2A3h                                                      ; +0x111, 0x14008d241\ncmp     byte ptr [rsi+338h], 0                                         ; +0x116, 0x14008d246\ncmovz   edx, r8d                                                       ; +0x11d, 0x14008d24d\nmov     rax, [rcx]                                                     ; +0x121, 0x14008d251\nadd     rdx, rsi                                                       ; +0x124, 0x14008d254\ncall    qword ptr [rax]                                                ; +0x127, 0x14008d257\nmov     rcx, rsi                                                       ; +0x129, 0x14008d259\ncall    ColorSelectLiveOverlay__updateColorLabel                       ; +0x12c, 0x14008d25c\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x131, 0x14008d261\nadd     rsp, 28h                                                       ; +0x136, 0x14008d266\npop     r14                                                            ; +0x13a, 0x14008d26a\npop     rsi                                                            ; +0x13c, 0x14008d26c\nretn                                                                   ; +0x13d, 0x14008d26d", "xrefs": ["ColorSelectLiveOverlay::init @ 0x14008cbbf", "ColorSelectLiveOverlay::init @ 0x14008cc9a", "<???> @ 0x140669014", "<???> @ 0x140669050", "<???> @ 0x1406c6e34"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}