{"type": "func", "start": 4300643984, "end": 4300644277, "name": "ColorSelectLiveOverlay::onSelectTab", "pseudocode": "// \n// ColorSelectLiveOverlay::onSelectTab from 0x100569e90 to 0x100569fb5 (293 bytes)\n// \n// 1 xrefs:\n// > ColorSelectLiveOverlay::init @ 0x1005695d2\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 __fastcall ColorSelectLiveOverlay::onSelectTab(ColorSelectLiveOverlay *a1, cocos2d::CCObject *a2)\n{\n  int v3; // eax\n  __int64 v4; // rax\n  unsigned int v5; // r15d\n  ButtonSprite *v6; // r12\n  int v7; // r13d\n  const char *v8; // rsi\n\n  v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  if ( a1->m_detailColorSelected != (v3 != 1) )\n  {\n    a1->m_detailColorSelected = v3 != 1;\n    v4 = *((_QWORD *)&a1->m_baseColorAction + (v3 != 1));\n    a1->m_opacity = *(float *)(v4 + 96);\n    ColorSelectLiveOverlay::selectColor(\n      a1,\n      (cocos2d::ccColor3B)(*(unsigned __int16 *)(v4 + 72) | (*(unsigned __int8 *)(v4 + 74) << 16)));\n    if ( (unsigned int)sub_100720070(a1->m_12buttons) )\n    {\n      v5 = 0;\n      do\n      {\n        v6 = (ButtonSprite *)sub_1007200C0(a1->m_12buttons, v5);\n        v7 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n        v8 = \"GJ_button_04.png\";\n        if ( v7 == ((unsigned int (__fastcall *)(ButtonSprite *))v6->getTag)(v6) )\n          v8 = \"GJ_button_01.png\";\n        ButtonSprite::updateBGImage(v6, v8);\n        ++v5;\n      }\n      while ( v5 < (unsigned int)sub_100720070(a1->m_12buttons) );\n    }\n    ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_oldColorSprite->setColor)(\n      a1->m_oldColorSprite,\n      &a1->m_mainColor + a1->m_detailColorSelected);\n    ColorSelectLiveOverlay::updateColorLabel(a1);\n  }\n}", "assembly": "; \n; ColorSelectLiveOverlay::onSelectTab from 0x100569e90 to 0x100569fb5 (293 bytes)\n; \n; 1 xrefs:\n; > ColorSelectLiveOverlay::init @ 0x1005695d2\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    rbp                                                            ; +0x0, 0x100569e90\nmov     rbp, rsp                                                       ; +0x1, 0x100569e91\npush    r15                                                            ; +0x4, 0x100569e94\npush    r14                                                            ; +0x6, 0x100569e96\npush    r13                                                            ; +0x8, 0x100569e98\npush    r12                                                            ; +0xa, 0x100569e9a\npush    rbx                                                            ; +0xc, 0x100569e9c\npush    rax                                                            ; +0xd, 0x100569e9d\nmov     r14, rsi                                                       ; +0xe, 0x100569e9e\nmov     rbx, rdi                                                       ; +0x11, 0x100569ea1\nmov     rax, [rsi]                                                     ; +0x14, 0x100569ea4\nmov     rdi, rsi                                                       ; +0x17, 0x100569ea7\ncall    qword ptr [rax+40h]                                            ; +0x1a, 0x100569eaa\ncmp     eax, 1                                                         ; +0x1d, 0x100569ead\nsetnz   cl                                                             ; +0x20, 0x100569eb0\ncmp     [rbx+338h], cl                                                 ; +0x23, 0x100569eb3\njnz     short loc_100569ECA                                            ; +0x29, 0x100569eb9\nadd     rsp, 8                                                         ; +0x2b, 0x100569ebb\npop     rbx                                                            ; +0x2f, 0x100569ebf\npop     r12                                                            ; +0x30, 0x100569ec0\npop     r13                                                            ; +0x32, 0x100569ec2\npop     r14                                                            ; +0x34, 0x100569ec4\npop     r15                                                            ; +0x36, 0x100569ec6\npop     rbp                                                            ; +0x38, 0x100569ec8\nretn                                                                   ; +0x39, 0x100569ec9\nxor     edx, edx                                                       ; +0x3a, 0x100569eca\ncmp     eax, 1                                                         ; +0x3c, 0x100569ecc\nsetnz   dl                                                             ; +0x3f, 0x100569ecf\nmov     [rbx+338h], cl                                                 ; +0x42, 0x100569ed2\nmov     rax, [rbx+rdx*8+290h]                                          ; +0x48, 0x100569ed8\nmovss   xmm0, dword ptr [rax+60h]                                      ; +0x50, 0x100569ee0\nmovss   dword ptr [rbx+2B8h], xmm0                                     ; +0x55, 0x100569ee5\nmovzx   ecx, word ptr [rax+48h]                                        ; +0x5d, 0x100569eed\nmovzx   esi, byte ptr [rax+4Ah]                                        ; +0x61, 0x100569ef1\nshl     esi, 10h                                                       ; +0x65, 0x100569ef5\nor      esi, ecx                                                       ; +0x68, 0x100569ef8\nmov     rdi, rbx                                                       ; +0x6a, 0x100569efa\ncall    ColorSelectLiveOverlay__selectColor                            ; +0x6d, 0x100569efd\nmov     rdi, [rbx+288h]                                                ; +0x72, 0x100569f02\ncall    sub_100720070                                                  ; +0x79, 0x100569f09\ntest    eax, eax                                                       ; +0x7e, 0x100569f0e\njz      short loc_100569F79                                            ; +0x80, 0x100569f10\nxor     r15d, r15d                                                     ; +0x82, 0x100569f12\nnop     word ptr [rax+rax+00000000h]                                   ; +0x85, 0x100569f15\nmov     rdi, [rbx+288h]                                                ; +0x90, 0x100569f20\nmov     esi, r15d                                                      ; +0x97, 0x100569f27\ncall    sub_1007200C0                                                  ; +0x9a, 0x100569f2a\nmov     r12, rax                                                       ; +0x9f, 0x100569f2f\nmov     rax, [r14]                                                     ; +0xa2, 0x100569f32\nmov     rdi, r14                                                       ; +0xa5, 0x100569f35\ncall    qword ptr [rax+40h]                                            ; +0xa8, 0x100569f38\nmov     r13d, eax                                                      ; +0xab, 0x100569f3b\nmov     rax, [r12]                                                     ; +0xae, 0x100569f3e\nmov     rdi, r12                                                       ; +0xb2, 0x100569f42\ncall    qword ptr [rax+40h]                                            ; +0xb5, 0x100569f45\ncmp     r13d, eax                                                      ; +0xb8, 0x100569f48\nlea     rsi, aGjButton04Png; \"GJ_button_04.png\"                        ; +0xbb, 0x100569f4b\nlea     rax, aGjButton01Png; \"GJ_button_01.png\"                        ; +0xc2, 0x100569f52\ncmovz   rsi, rax                                                       ; +0xc9, 0x100569f59\nmov     rdi, r12                                                       ; +0xcd, 0x100569f5d\ncall    ButtonSprite__updateBGImage                                    ; +0xd0, 0x100569f60\ninc     r15d                                                           ; +0xd5, 0x100569f65\nmov     rdi, [rbx+288h]                                                ; +0xd8, 0x100569f68\ncall    sub_100720070                                                  ; +0xdf, 0x100569f6f\ncmp     r15d, eax                                                      ; +0xe4, 0x100569f74\njb      short loc_100569F20                                            ; +0xe7, 0x100569f77\nmov     rdi, [rbx+2F8h]                                                ; +0xe9, 0x100569f79\nmovzx   eax, byte ptr [rbx+338h]                                       ; +0xf0, 0x100569f80\nlea     rax, [rax+rax*2]                                               ; +0xf7, 0x100569f87\nlea     rsi, [rbx+rax]                                                 ; +0xfb, 0x100569f8b\nadd     rsi, 2A0h                                                      ; +0xff, 0x100569f8f\nmov     rax, [rdi]                                                     ; +0x106, 0x100569f96\ncall    qword ptr [rax+3B0h]                                           ; +0x109, 0x100569f99\nmov     rdi, rbx                                                       ; +0x10f, 0x100569f9f\nadd     rsp, 8                                                         ; +0x112, 0x100569fa2\npop     rbx                                                            ; +0x116, 0x100569fa6\npop     r12                                                            ; +0x117, 0x100569fa7\npop     r13                                                            ; +0x119, 0x100569fa9\npop     r14                                                            ; +0x11b, 0x100569fab\npop     r15                                                            ; +0x11d, 0x100569fad\npop     rbp                                                            ; +0x11f, 0x100569faf\njmp     ColorSelectLiveOverlay__updateColorLabel                       ; +0x120, 0x100569fb0", "xrefs": ["ColorSelectLiveOverlay::init @ 0x1005695d2"], "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"}