{"type": "func", "start": 5106870, "end": 5106986, "name": "ColorSelectPopup::onPlayerColor1", "pseudocode": "// \n// ColorSelectPopup::onPlayerColor1 from 0x4decb6 to 0x4ded2a (116 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::onPlayerColor1(CCMenuItemToggler **this, cocos2d::CCObject *a2)\n{\n  unsigned int result; // r0\n  unsigned int v4; // r5\n  _BOOL4 v5; // r3\n  int v6; // r0\n  bool v7; // r3\n  int v8; // r2\n\n  result = CCMenuItemToggler::toggle(*(this + 186), 0);\n  v4 = (unsigned int)*(this + 132);\n  v5 = *(this + 193) != (CCMenuItemToggler *)((char *)&dword_0 + 1);\n  *(this + 193) = (CCMenuItemToggler *)v5;\n  if ( v4 )\n  {\n    *(_BYTE *)(v4 + 1305) = v5;\n    *((_BYTE *)*(this + 132) + 1306) = 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 + 1);\n      *(_BYTE *)(v6 + 1306) = 0;\n      *(_BYTE *)(v6 + 1305) = 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::onPlayerColor1 from 0x4decb6 to 0x4ded2a (116 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, 0x4decb6\nMOVS            R1, #0; bool                                           ; +0x2, 0x4decb8\nMOV             R4, R0                                                 ; +0x4, 0x4decba\nLDR.W           R0, [R0,#0x2E8]; this                                  ; +0x6, 0x4decbc\nBL              _ZN17CCMenuItemToggler6toggleEb; CCMenuItemToggler::toggle(bool) ; +0xa, 0x4decc0\nLDR.W           R3, [R4,#0x304]                                        ; +0xe, 0x4decc4\nLDR.W           R5, [R4,#0x210]                                        ; +0x12, 0x4decc8\nADDS.W          R3, R3, #0xFFFFFFFF                                    ; +0x16, 0x4deccc\nIT NE                                                                  ; +0x1a, 0x4decd0\nMOVNE           R3, #1                                                 ; +0x1c, 0x4decd2\nSTR.W           R3, [R4,#0x304]                                        ; +0x1e, 0x4decd4\nCBZ             R5, loc_4DECEA                                         ; +0x22, 0x4decd8\nSTRB.W          R3, [R5,#0x519]                                        ; +0x24, 0x4decda\nMOVS            R2, #0                                                 ; +0x28, 0x4decde\nLDR.W           R3, [R4,#0x210]                                        ; +0x2a, 0x4dece0\nSTRB.W          R2, [R3,#0x51A]                                        ; +0x2e, 0x4dece4\nPOP             {R4-R6,PC}                                             ; +0x32, 0x4dece8\nLDR.W           R2, [R4,#0x214]                                        ; +0x34, 0x4decea\nCBZ             R2, loc_4DED20                                         ; +0x38, 0x4decee\nMOV             R6, R5                                                 ; +0x3a, 0x4decf0\nLDR.W           R0, [R4,#0x214]; this                                  ; +0x3c, 0x4decf2\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x40, 0x4decf6\nCMP             R5, R0                                                 ; +0x44, 0x4decfa\nBCS             locret_4DED1E                                          ; +0x46, 0x4decfc\nMOV             R1, R5; unsigned int                                   ; +0x48, 0x4decfe\nLDR.W           R0, [R4,#0x214]; this                                  ; +0x4a, 0x4ded00\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x4e, 0x4ded04\nLDR.W           R3, [R4,#0x304]                                        ; +0x52, 0x4ded08\nADDS            R5, #1                                                 ; +0x56, 0x4ded0c\nSUBS            R2, R3, #1                                             ; +0x58, 0x4ded0e\nNEGS            R3, R2                                                 ; +0x5a, 0x4ded10\nADCS            R3, R2                                                 ; +0x5c, 0x4ded12\nSTRB.W          R6, [R0,#0x51A]                                        ; +0x5e, 0x4ded14\nSTRB.W          R3, [R0,#0x519]                                        ; +0x62, 0x4ded18\nB               loc_4DECF2                                             ; +0x66, 0x4ded1c\nPOP             {R4-R6,PC}                                             ; +0x68, 0x4ded1e\nLDR.W           R2, [R4,#0x310]                                        ; +0x6a, 0x4ded20\nCBZ             R2, locret_4DED28                                      ; +0x6e, 0x4ded24\nSTR             R3, [R2,#0x54]                                         ; +0x70, 0x4ded26\nPOP             {R4-R6,PC}                                             ; +0x72, 0x4ded28", "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"}