{"type": "func", "start": 5043528, "end": 5043736, "name": "ColorSelectLiveOverlay::onSelectTab", "pseudocode": "// \n// ColorSelectLiveOverlay::onSelectTab from 0x4cf548 to 0x4cf618 (208 bytes)\n// \n// 0 xrefs:\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  _BOOL4 v4; // r0\n  ColorAction *m_baseColorAction; // r2\n  unsigned int v6; // r5\n  ColorAction *m_detailColorAction; // r3\n  ButtonSprite *v8; // r0\n  ButtonSprite *v9; // r7\n  int v10; // r8\n  const char *v11; // r1\n  cocos2d::ccColor3B *p_m_detailColor; // r1\n\n  v4 = a2->getTag(a2) != 1;\n  if ( a1->m_detailColorSelected != v4 )\n  {\n    m_baseColorAction = a1->m_baseColorAction;\n    v6 = 0;\n    m_detailColorAction = a1->m_detailColorAction;\n    a1->m_detailColorSelected = v4;\n    if ( !v4 )\n      m_detailColorAction = m_baseColorAction;\n    a1->m_opacity = m_detailColorAction->m_fromOpacity;\n    ColorSelectLiveOverlay::selectColor(a1, m_detailColorAction->m_fromColor);\n    while ( v6 < cocos2d::CCArray::count(a1->m_12buttons) )\n    {\n      v8 = (ButtonSprite *)cocos2d::CCArray::objectAtIndex(a1->m_12buttons, v6++);\n      v9 = v8;\n      v10 = a2->getTag(a2);\n      if ( v10 == v9->getTag(v9) )\n        v11 = \"GJ_button_01.png\";\n      else\n        v11 = \"GJ_button_04.png\";\n      ButtonSprite::updateBGImage(v9, v11);\n    }\n    if ( a1->m_detailColorSelected )\n      p_m_detailColor = &a1->m_detailColor;\n    else\n      p_m_detailColor = &a1->m_mainColor;\n    a1->m_oldColorSprite->setColor(a1->m_oldColorSprite, p_m_detailColor);\n    ColorSelectLiveOverlay::updateColorLabel(a1);\n  }\n}", "assembly": "; \n; ColorSelectLiveOverlay::onSelectTab from 0x4cf548 to 0x4cf618 (208 bytes)\n; \n; 0 xrefs:\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\nLDR             R3, [R1]                                               ; +0x0, 0x4cf548\nPUSH.W          {R0,R1,R4-R10,LR}                                      ; +0x2, 0x4cf54a\nMOV             R4, R0                                                 ; +0x6, 0x4cf54e\nLDR             R3, [R3,#0x20]                                         ; +0x8, 0x4cf550\nMOV             R0, R1                                                 ; +0xa, 0x4cf552\nMOV             R6, R1                                                 ; +0xc, 0x4cf554\nBLX             R3                                                     ; +0xe, 0x4cf556\nLDRB.W          R3, [R4,#0x26C]                                        ; +0x10, 0x4cf558\nADDS.W          R0, R0, #0xFFFFFFFF                                    ; +0x14, 0x4cf55c\nIT NE                                                                  ; +0x18, 0x4cf560\nMOVNE           R0, #1                                                 ; +0x1a, 0x4cf562\nCMP             R3, R0                                                 ; +0x1c, 0x4cf564\nBEQ             loc_4CF612                                             ; +0x1e, 0x4cf566\nLDR.W           R2, [R4,#0x1FC]                                        ; +0x20, 0x4cf568\nMOVS            R5, #0                                                 ; +0x24, 0x4cf56c\nLDR.W           R3, [R4,#0x200]                                        ; +0x26, 0x4cf56e\nSTRB.W          R0, [R4,#0x26C]                                        ; +0x2a, 0x4cf572\nCMP             R0, #0                                                 ; +0x2e, 0x4cf576\nIT EQ                                                                  ; +0x30, 0x4cf578\nMOVEQ           R3, R2                                                 ; +0x32, 0x4cf57a\nMOV             R0, R4                                                 ; +0x34, 0x4cf57c\nLDR.W           R9, =(aGjButton01Png - 0x4CF58C); \"GJ_button_01.png\"   ; +0x36, 0x4cf57e\nLDR             R2, [R3,#0x5C]                                         ; +0x3a, 0x4cf582\nLDR.W           R10, =(aGjButton04Png - 0x4CF592); \"GJ_button_04.png\"  ; +0x3c, 0x4cf584\nADD             R9, PC; \"GJ_button_01.png\"                             ; +0x40, 0x4cf588\nSTR.W           R2, [R4,#0x21C]                                        ; +0x42, 0x4cf58a\nADD             R10, PC; \"GJ_button_04.png\"                            ; +0x46, 0x4cf58e\nLDRB.W          R1, [R3,#0x45]                                         ; +0x48, 0x4cf590\nLDRB.W          R2, [R3,#0x46]                                         ; +0x4c, 0x4cf594\nLDRB.W          R3, [R3,#0x44]                                         ; +0x50, 0x4cf598\nSTRB.W          R1, [SP,#8+var_4+1]                                    ; +0x54, 0x4cf59c\nSTRB.W          R2, [SP,#8+var_4+2]                                    ; +0x58, 0x4cf5a0\nSTRB.W          R3, [SP,#8+var_4]                                      ; +0x5c, 0x4cf5a4\nLDR             R1, [SP,#8+var_4]                                      ; +0x60, 0x4cf5a8\nBL              _ZN22ColorSelectLiveOverlay11selectColorEN7cocos2d10_ccColor3BE; ColorSelectLiveOverlay::selectColor(cocos2d::_ccColor3B) ; +0x62, 0x4cf5aa\nLDR.W           R0, [R4,#0x1F8]; this                                  ; +0x66, 0x4cf5ae\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x6a, 0x4cf5b2\nCMP             R5, R0                                                 ; +0x6e, 0x4cf5b6\nBCS             loc_4CF5EA                                             ; +0x70, 0x4cf5b8\nMOV             R1, R5; unsigned int                                   ; +0x72, 0x4cf5ba\nLDR.W           R0, [R4,#0x1F8]; this                                  ; +0x74, 0x4cf5bc\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x78, 0x4cf5c0\nLDR             R3, [R6]                                               ; +0x7c, 0x4cf5c4\nADDS            R5, #1                                                 ; +0x7e, 0x4cf5c6\nLDR             R3, [R3,#0x20]                                         ; +0x80, 0x4cf5c8\nMOV             R7, R0                                                 ; +0x82, 0x4cf5ca\nMOV             R0, R6                                                 ; +0x84, 0x4cf5cc\nBLX             R3                                                     ; +0x86, 0x4cf5ce\nLDR             R3, [R7]                                               ; +0x88, 0x4cf5d0\nLDR             R3, [R3,#0x20]                                         ; +0x8a, 0x4cf5d2\nMOV             R8, R0                                                 ; +0x8c, 0x4cf5d4\nMOV             R0, R7                                                 ; +0x8e, 0x4cf5d6\nBLX             R3                                                     ; +0x90, 0x4cf5d8\nCMP             R8, R0                                                 ; +0x92, 0x4cf5da\nMOV             R0, R7; this                                           ; +0x94, 0x4cf5dc\nITE EQ                                                                 ; +0x96, 0x4cf5de\nMOVEQ           R1, R9                                                 ; +0x98, 0x4cf5e0\nMOVNE           R1, R10; char *                                        ; +0x9a, 0x4cf5e2\nBL              _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0x9c, 0x4cf5e4\nB               loc_4CF5AE                                             ; +0xa0, 0x4cf5e8\nLDR.W           R0, [R4,#0x23C]                                        ; +0xa2, 0x4cf5ea\nLDRB.W          R2, [R4,#0x26C]                                        ; +0xa6, 0x4cf5ee\nLDR             R3, [R0]                                               ; +0xaa, 0x4cf5f2\nLDR.W           R3, [R3,#0x1D8]                                        ; +0xac, 0x4cf5f4\nCBZ             R2, loc_4CF600                                         ; +0xb0, 0x4cf5f8\nADDW            R1, R4, #0x207                                         ; +0xb2, 0x4cf5fa\nB               loc_4CF604                                             ; +0xb6, 0x4cf5fe\nADD.W           R1, R4, #0x204                                         ; +0xb8, 0x4cf600\nBLX             R3                                                     ; +0xbc, 0x4cf604\nMOV             R0, R4; this                                           ; +0xbe, 0x4cf606\nADD             SP, SP, #8                                             ; +0xc0, 0x4cf608\nPOP.W           {R4-R10,LR}                                            ; +0xc2, 0x4cf60a\nB.W             _ZN22ColorSelectLiveOverlay16updateColorLabelEv; ColorSelectLiveOverlay::updateColorLabel(void) ; +0xc6, 0x4cf60e\nADD             SP, SP, #8                                             ; +0xca, 0x4cf612\nPOP.W           {R4-R10,PC}                                            ; +0xcc, 0x4cf614", "xrefs": [], "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"}