{"type": "func", "start": 4299287612, "end": 4299287784, "name": "ColorSelectPopup::onPlayerColor1", "pseudocode": "// \n// ColorSelectPopup::onPlayerColor1 from 0x10041ec3c to 0x10041ece8 (172 bytes)\n// \n// 1 xrefs:\n// > ColorSelectPopup::init @ 0x10041ced0\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 ColorSelectPopup::onPlayerColor1(ColorSelectPopup *a1, cocos2d::CCObject *a2)\n{\n  int m_playerColor; // w10\n  _BOOL4 v4; // w8\n  EffectGameObject *m_gameObject; // x9\n  cocos2d::CCArray *m_gameObjects; // x0\n  unsigned int v7; // w20\n  __int64 v8; // x0\n  ColorAction *m_colorAction; // x9\n\n  CCMenuItemToggler::toggle(a1->m_playerColor2Toggle, 0);\n  m_playerColor = a1->m_playerColor;\n  v4 = m_playerColor != 1;\n  a1->m_playerColor = v4;\n  m_gameObject = a1->m_gameObject;\n  if ( m_gameObject )\n  {\n    m_gameObject->m_usesPlayerColor1 = m_playerColor != 1;\n    m_gameObject->m_usesPlayerColor2 = 0;\n  }\n  else\n  {\n    m_gameObjects = a1->m_gameObjects;\n    if ( m_gameObjects )\n    {\n      if ( (unsigned int)sub_10024A36C((__int64)m_gameObjects) )\n      {\n        v7 = 0;\n        do\n        {\n          v8 = sub_10024A388((__int64)a1->m_gameObjects, v7);\n          *(_BYTE *)(v8 + 1485) = a1->m_playerColor == 1;\n          *(_BYTE *)(v8 + 1486) = 0;\n          ++v7;\n        }\n        while ( v7 < (unsigned int)sub_10024A36C((__int64)a1->m_gameObjects) );\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 0x10041ec3c to 0x10041ece8 (172 bytes)\n; \n; 1 xrefs:\n; > ColorSelectPopup::init @ 0x10041ced0\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             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x10041ec3c\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x10041ec40\nADD             X29, SP, #0x10                                         ; +0x8, 0x10041ec44\nMOV             X19, X0                                                ; +0xc, 0x10041ec48\nLDR             X0, [X0,#0x3F0]                                        ; +0x10, 0x10041ec4c\nMOV             W1, #0                                                 ; +0x14, 0x10041ec50\nBL              CCMenuItemToggler__toggle                              ; +0x18, 0x10041ec54\nLDR             W10, [X19,#0x424]                                      ; +0x1c, 0x10041ec58\nCMP             W10, #1                                                ; +0x20, 0x10041ec5c\nCSET            W8, NE                                                 ; +0x24, 0x10041ec60\nSTR             W8, [X19,#0x424]                                       ; +0x28, 0x10041ec64\nLDR             X9, [X19,#0x290]                                       ; +0x2c, 0x10041ec68\nCBZ             X9, loc_10041EC8C                                      ; +0x30, 0x10041ec6c\nCMP             W10, #1                                                ; +0x34, 0x10041ec70\nCSET            W8, NE                                                 ; +0x38, 0x10041ec74\nSTRB            W8, [X9,#0x5CD]                                        ; +0x3c, 0x10041ec78\nSTRB            WZR, [X9,#0x5CE]                                       ; +0x40, 0x10041ec7c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x44, 0x10041ec80\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x48, 0x10041ec84\nRET                                                                    ; +0x4c, 0x10041ec88\nLDR             X0, [X19,#0x298]                                       ; +0x50, 0x10041ec8c\nCBZ             X0, loc_10041ECD8                                      ; +0x54, 0x10041ec90\nBL              sub_10024A36C                                          ; +0x58, 0x10041ec94\nCBZ             W0, loc_10041EC80                                      ; +0x5c, 0x10041ec98\nMOV             W20, #0                                                ; +0x60, 0x10041ec9c\nLDR             X0, [X19,#0x298]                                       ; +0x64, 0x10041eca0\nMOV             X1, X20                                                ; +0x68, 0x10041eca4\nBL              sub_10024A388                                          ; +0x6c, 0x10041eca8\nLDR             W8, [X19,#0x424]                                       ; +0x70, 0x10041ecac\nCMP             W8, #1                                                 ; +0x74, 0x10041ecb0\nCSET            W8, EQ                                                 ; +0x78, 0x10041ecb4\nSTRB            W8, [X0,#0x5CD]                                        ; +0x7c, 0x10041ecb8\nSTRB            WZR, [X0,#0x5CE]                                       ; +0x80, 0x10041ecbc\nADD             W20, W20, #1                                           ; +0x84, 0x10041ecc0\nLDR             X0, [X19,#0x298]                                       ; +0x88, 0x10041ecc4\nBL              sub_10024A36C                                          ; +0x8c, 0x10041ecc8\nCMP             W20, W0                                                ; +0x90, 0x10041eccc\nB.CC            loc_10041ECA0                                          ; +0x94, 0x10041ecd0\nB               loc_10041EC80                                          ; +0x98, 0x10041ecd4\nLDR             X9, [X19,#0x430]                                       ; +0x9c, 0x10041ecd8\nCBZ             X9, loc_10041EC80                                      ; +0xa0, 0x10041ecdc\nSTR             W8, [X9,#0x58]                                         ; +0xa4, 0x10041ece0\nB               loc_10041EC80                                          ; +0xa8, 0x10041ece4", "xrefs": ["ColorSelectPopup::init @ 0x10041ced0"], "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"}