{"type": "func", "start": 8791708, "end": 8791880, "name": "ColorSelectPopup::onPlayerColor1", "pseudocode": "// \n// ColorSelectPopup::onPlayerColor1 from 0x86269c to 0x862748 (172 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x45e20\n// > ColorSelectPopup::init @ 0x8657c8\n// > <???> @ 0x1541520\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:55:37 +0000\n// \n\n__int64 __fastcall ColorSelectPopup::onPlayerColor1(CCMenuItemToggler **this, cocos2d::CCObject *a2)\n{\n  __int64 v3; // x0\n  _BOOL4 v4; // w1\n  __int64 result; // x0\n  cocos2d::CCArray *v6; // x0\n  unsigned int v7; // w20\n  __int64 v8; // x0\n  int v9; // w1\n  bool v10; // cf\n  unsigned int v11; // w1\n\n  CCMenuItemToggler::toggle(*(this + 135), 0);\n  v3 = (__int64)*(this + 85);\n  v4 = *((_DWORD *)this + 283) != 1;\n  *((_DWORD *)this + 283) = v4;\n  if ( v3 )\n  {\n    *(_BYTE *)(v3 + 1485) = v4;\n    result = (__int64)*(this + 85);\n    *(_BYTE *)(result + 1486) = 0;\n  }\n  else\n  {\n    v6 = *(this + 86);\n    if ( v6 )\n    {\n      v7 = 0;\n      while ( 1 )\n      {\n        result = cocos2d::CCArray::count(v6);\n        v10 = v7 >= (unsigned int)result;\n        v11 = v7++;\n        if ( v10 )\n          break;\n        v8 = cocos2d::CCArray::objectAtIndex(*(this + 86), v11);\n        v9 = *((_DWORD *)this + 283);\n        *(_BYTE *)(v8 + 1486) = 0;\n        *(_BYTE *)(v8 + 1485) = v9 == 1;\n        v6 = *(this + 86);\n      }\n    }\n    else\n    {\n      result = (__int64)*(this + 143);\n      if ( result )\n        *(_DWORD *)(result + 88) = v4;\n    }\n  }\n  return result;\n}", "assembly": "; \n; ColorSelectPopup::onPlayerColor1 from 0x86269c to 0x862748 (172 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x45e20\n; > ColorSelectPopup::init @ 0x8657c8\n; > <???> @ 0x1541520\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:55:37 +0000\n; \nSTP             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0x86269c\nMOV             W1, #0; bool                                           ; +0x4, 0x8626a0\nMOV             X29, SP                                                ; +0x8, 0x8626a4\nSTP             X19, X20, [SP,#var_s10]                                ; +0xc, 0x8626a8\nMOV             X19, X0                                                ; +0x10, 0x8626ac\nLDR             X0, [X0,#0x438]; this                                  ; +0x14, 0x8626b0\nBL              _ZN17CCMenuItemToggler6toggleEb; CCMenuItemToggler::toggle(bool) ; +0x18, 0x8626b4\nLDR             W1, [X19,#0x46C]                                       ; +0x1c, 0x8626b8\nLDR             X0, [X19,#0x2A8]                                       ; +0x20, 0x8626bc\nCMP             W1, #1                                                 ; +0x24, 0x8626c0\nCSET            W1, NE                                                 ; +0x28, 0x8626c4\nSTR             W1, [X19,#0x46C]                                       ; +0x2c, 0x8626c8\nCBZ             X0, loc_8626E8                                         ; +0x30, 0x8626cc\nSTRB            W1, [X0,#0x5CD]                                        ; +0x34, 0x8626d0\nLDR             X0, [X19,#0x2A8]                                       ; +0x38, 0x8626d4\nSTRB            WZR, [X0,#0x5CE]                                       ; +0x3c, 0x8626d8\nLDP             X19, X20, [SP,#var_s10]                                ; +0x40, 0x8626dc\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x44, 0x8626e0\nRET                                                                    ; +0x48, 0x8626e4\nLDR             X0, [X19,#0x2B0]                                       ; +0x4c, 0x8626e8\nCBZ             X0, loc_862738                                         ; +0x50, 0x8626ec\nMOV             W20, #0                                                ; +0x54, 0x8626f0\nB               loc_862718                                             ; +0x58, 0x8626f4\nLDR             X0, [X19,#0x2B0]; this                                 ; +0x5c, 0x8626f8\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x60, 0x8626fc\nLDR             W1, [X19,#0x46C]                                       ; +0x64, 0x862700\nSTRB            WZR, [X0,#0x5CE]                                       ; +0x68, 0x862704\nCMP             W1, #1                                                 ; +0x6c, 0x862708\nCSET            W1, EQ                                                 ; +0x70, 0x86270c\nSTRB            W1, [X0,#0x5CD]                                        ; +0x74, 0x862710\nLDR             X0, [X19,#0x2B0]; this                                 ; +0x78, 0x862714\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x7c, 0x862718\nCMP             W20, W0                                                ; +0x80, 0x86271c\nMOV             W1, W20; unsigned int                                  ; +0x84, 0x862720\nADD             W20, W20, #1                                           ; +0x88, 0x862724\nB.CC            loc_8626F8                                             ; +0x8c, 0x862728\nLDP             X19, X20, [SP,#var_s10]                                ; +0x90, 0x86272c\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x94, 0x862730\nRET                                                                    ; +0x98, 0x862734\nLDR             X0, [X19,#0x478]                                       ; +0x9c, 0x862738\nCBZ             X0, loc_8626DC                                         ; +0xa0, 0x86273c\nSTR             W1, [X0,#0x58]                                         ; +0xa4, 0x862740\nB               loc_8626DC                                             ; +0xa8, 0x862744", "xrefs": ["<???> @ 0x45e20", "ColorSelectPopup::init @ 0x8657c8", "<???> @ 0x1541520"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}