{"type": "func", "start": 7584904, "end": 7585076, "name": "ColorSelectPopup::onPlayerColor1", "pseudocode": "// \n// ColorSelectPopup::onPlayerColor1 from 0x73bc88 to 0x73bd34 (172 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x2e878\n// > ColorSelectPopup::init @ 0x73ebb8\n// > <???> @ 0x12295e0\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 ColorSelectPopup::onPlayerColor1(ColorSelectPopup *a1, cocos2d::CCObject *a2)\n{\n  EffectGameObject *m_gameObject; // x0\n  _BOOL4 v4; // w1\n  cocos2d::CCArray *m_gameObjects; // x0\n  unsigned int v6; // w20\n  __int64 v7; // x1\n  int m_playerColor; // w2\n  bool v9; // cf\n  unsigned int v10; // w1\n  ColorAction *m_colorAction; // x0\n\n  CCMenuItemToggler::toggle(a1->m_playerColor2Toggle, 0);\n  m_gameObject = a1->m_gameObject;\n  v4 = a1->m_playerColor != 1;\n  a1->m_playerColor = v4;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_usesPlayerColor1 = v4;\n    m_gameObject->m_usesPlayerColor2 = 0;\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n    if ( m_gameObjects )\n    {\n      v6 = 0;\n      while ( 1 )\n      {\n        v9 = v6 >= (unsigned int)cocos2d::CCArray::count(m_gameObjects);\n        v10 = v6++;\n        if ( v9 )\n          break;\n        v7 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v10);\n        m_playerColor = a1->m_playerColor;\n        m_gameObjects = a1->m_gameObjects;\n        *(_BYTE *)(v7 + 1470) = 0;\n        *(_BYTE *)(v7 + 1469) = m_playerColor == 1;\n      }\n    }\n    else\n    {\n      m_colorAction = a1->m_colorAction;\n      if ( m_colorAction )\n        m_colorAction->m_playerColor = v4;\n    }\n  }\n}", "assembly": "; \n; ColorSelectPopup::onPlayerColor1 from 0x73bc88 to 0x73bd34 (172 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x2e878\n; > ColorSelectPopup::init @ 0x73ebb8\n; > <???> @ 0x12295e0\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\nSTP             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0x73bc88\nMOV             W1, #0; bool                                           ; +0x4, 0x73bc8c\nMOV             X29, SP                                                ; +0x8, 0x73bc90\nSTP             X19, X20, [SP,#var_s10]                                ; +0xc, 0x73bc94\nMOV             X19, X0                                                ; +0x10, 0x73bc98\nLDR             X0, [X0,#0x408]; this                                  ; +0x14, 0x73bc9c\nBL              _ZN17CCMenuItemToggler6toggleEb; CCMenuItemToggler::toggle(bool) ; +0x18, 0x73bca0\nLDR             W1, [X19,#0x43C]                                       ; +0x1c, 0x73bca4\nLDR             X0, [X19,#0x290]                                       ; +0x20, 0x73bca8\nCMP             W1, #1                                                 ; +0x24, 0x73bcac\nCSET            W1, NE                                                 ; +0x28, 0x73bcb0\nSTR             W1, [X19,#0x43C]                                       ; +0x2c, 0x73bcb4\nCBZ             X0, loc_73BCD0                                         ; +0x30, 0x73bcb8\nSTRB            W1, [X0,#0x5BD]                                        ; +0x34, 0x73bcbc\nSTRB            WZR, [X0,#0x5BE]                                       ; +0x38, 0x73bcc0\nLDP             X19, X20, [SP,#var_s10]                                ; +0x3c, 0x73bcc4\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x40, 0x73bcc8\nRET                                                                    ; +0x44, 0x73bccc\nLDR             X0, [X19,#0x298]                                       ; +0x48, 0x73bcd0\nCBZ             X0, loc_73BD24                                         ; +0x4c, 0x73bcd4\nMOV             W20, #0                                                ; +0x50, 0x73bcd8\nB               loc_73BD04                                             ; +0x54, 0x73bcdc\nLDR             X0, [X19,#0x298]; this                                 ; +0x58, 0x73bce0\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x5c, 0x73bce4\nMOV             X1, X0                                                 ; +0x60, 0x73bce8\nLDR             W2, [X19,#0x43C]                                       ; +0x64, 0x73bcec\nLDR             X0, [X19,#0x298]; this                                 ; +0x68, 0x73bcf0\nCMP             W2, #1                                                 ; +0x6c, 0x73bcf4\nSTRB            WZR, [X1,#0x5BE]                                       ; +0x70, 0x73bcf8\nCSET            W2, EQ                                                 ; +0x74, 0x73bcfc\nSTRB            W2, [X1,#0x5BD]                                        ; +0x78, 0x73bd00\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x7c, 0x73bd04\nCMP             W20, W0                                                ; +0x80, 0x73bd08\nMOV             W1, W20; unsigned int                                  ; +0x84, 0x73bd0c\nADD             W20, W20, #1                                           ; +0x88, 0x73bd10\nB.CC            loc_73BCE0                                             ; +0x8c, 0x73bd14\nLDP             X19, X20, [SP,#var_s10]                                ; +0x90, 0x73bd18\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x94, 0x73bd1c\nRET                                                                    ; +0x98, 0x73bd20\nLDR             X0, [X19,#0x448]                                       ; +0x9c, 0x73bd24\nCBZ             X0, loc_73BCC4                                         ; +0xa0, 0x73bd28\nSTR             W1, [X0,#0x58]                                         ; +0xa4, 0x73bd2c\nB               loc_73BCC4                                             ; +0xa8, 0x73bd30", "xrefs": ["<???> @ 0x2e878", "ColorSelectPopup::init @ 0x73ebb8", "<???> @ 0x12295e0"], "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"}