{"type": "func", "start": 5106986, "end": 5107110, "name": "ColorSelectPopup::onPlayerColor2", "pseudocode": "// \n// ColorSelectPopup::onPlayerColor2 from 0x4ded2a to 0x4deda6 (124 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:50:59 +0000\n// \n\nunsigned int __fastcall ColorSelectPopup::onPlayerColor2(CCMenuItemToggler **this, cocos2d::CCObject *a2)\n{\n  unsigned int result; // r0\n  unsigned int v4; // r5\n  int v5; // r3\n  int v6; // r0\n  bool v7; // r3\n  int v8; // r2\n\n  result = CCMenuItemToggler::toggle(*(this + 185), 0);\n  v4 = (unsigned int)*(this + 132);\n  if ( *(this + 193) == (CCMenuItemToggler *)((char *)&dword_0 + 2) )\n    v5 = 0;\n  else\n    v5 = 2;\n  *(this + 193) = (CCMenuItemToggler *)v5;\n  if ( v4 )\n  {\n    *(_BYTE *)(v4 + 1306) = v5 != 0;\n    *((_BYTE *)*(this + 132) + 1305) = 0;\n  }\n  else if ( *(this + 133) )\n  {\n    while ( 1 )\n    {\n      result = cocos2d::CCArray::count(*(this + 133));\n      if ( v4 >= result )\n        break;\n      v6 = cocos2d::CCArray::objectAtIndex(*(this + 133), v4++);\n      v7 = *(this + 193) == (CCMenuItemToggler *)((char *)&dword_0 + 2);\n      *(_BYTE *)(v6 + 1305) = 0;\n      *(_BYTE *)(v6 + 1306) = v7;\n    }\n  }\n  else\n  {\n    v8 = (int)*(this + 196);\n    if ( v8 )\n      *(_DWORD *)(v8 + 84) = v5;\n  }\n  return result;\n}", "assembly": "; \n; ColorSelectPopup::onPlayerColor2 from 0x4ded2a to 0x4deda6 (124 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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 11:50:59 +0000\n; \nPUSH            {R4-R6,LR}                                             ; +0x0, 0x4ded2a\nMOVS            R1, #0; bool                                           ; +0x2, 0x4ded2c\nMOV             R4, R0                                                 ; +0x4, 0x4ded2e\nLDR.W           R0, [R0,#0x2E4]; this                                  ; +0x6, 0x4ded30\nBL              _ZN17CCMenuItemToggler6toggleEb; CCMenuItemToggler::toggle(bool) ; +0xa, 0x4ded34\nLDR.W           R3, [R4,#0x304]                                        ; +0xe, 0x4ded38\nLDR.W           R5, [R4,#0x210]                                        ; +0x12, 0x4ded3c\nCMP             R3, #2                                                 ; +0x16, 0x4ded40\nITE NE                                                                 ; +0x18, 0x4ded42\nMOVNE           R3, #2                                                 ; +0x1a, 0x4ded44\nMOVEQ           R3, #0                                                 ; +0x1c, 0x4ded46\nSTR.W           R3, [R4,#0x304]                                        ; +0x1e, 0x4ded48\nCBZ             R5, loc_4DED66                                         ; +0x22, 0x4ded4c\nADDS            R3, #0                                                 ; +0x24, 0x4ded4e\nMOV.W           R2, #0                                                 ; +0x26, 0x4ded50\nIT NE                                                                  ; +0x2a, 0x4ded54\nMOVNE           R3, #1                                                 ; +0x2c, 0x4ded56\nSTRB.W          R3, [R5,#0x51A]                                        ; +0x2e, 0x4ded58\nLDR.W           R3, [R4,#0x210]                                        ; +0x32, 0x4ded5c\nSTRB.W          R2, [R3,#0x519]                                        ; +0x36, 0x4ded60\nPOP             {R4-R6,PC}                                             ; +0x3a, 0x4ded64\nLDR.W           R2, [R4,#0x214]                                        ; +0x3c, 0x4ded66\nCBZ             R2, loc_4DED9C                                         ; +0x40, 0x4ded6a\nMOV             R6, R5                                                 ; +0x42, 0x4ded6c\nLDR.W           R0, [R4,#0x214]; this                                  ; +0x44, 0x4ded6e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x48, 0x4ded72\nCMP             R5, R0                                                 ; +0x4c, 0x4ded76\nBCS             locret_4DED9A                                          ; +0x4e, 0x4ded78\nMOV             R1, R5; unsigned int                                   ; +0x50, 0x4ded7a\nLDR.W           R0, [R4,#0x214]; this                                  ; +0x52, 0x4ded7c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x56, 0x4ded80\nLDR.W           R3, [R4,#0x304]                                        ; +0x5a, 0x4ded84\nADDS            R5, #1                                                 ; +0x5e, 0x4ded88\nSUBS            R2, R3, #2                                             ; +0x60, 0x4ded8a\nNEGS            R3, R2                                                 ; +0x62, 0x4ded8c\nADCS            R3, R2                                                 ; +0x64, 0x4ded8e\nSTRB.W          R6, [R0,#0x519]                                        ; +0x66, 0x4ded90\nSTRB.W          R3, [R0,#0x51A]                                        ; +0x6a, 0x4ded94\nB               loc_4DED6E                                             ; +0x6e, 0x4ded98\nPOP             {R4-R6,PC}                                             ; +0x70, 0x4ded9a\nLDR.W           R2, [R4,#0x310]                                        ; +0x72, 0x4ded9c\nCBZ             R2, locret_4DEDA4                                      ; +0x76, 0x4deda0\nSTR             R3, [R2,#0x54]                                         ; +0x78, 0x4deda2\nPOP             {R4-R6,PC}                                             ; +0x7a, 0x4deda4", "xrefs": [], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}