{"type": "func", "start": 5760972, "end": 5761166, "name": "CustomizeObjectLayer::updateSelected", "pseudocode": "// \n// CustomizeObjectLayer::updateSelected from 0x57e7cc to 0x57e88e (194 bytes)\n// \n// 5 xrefs:\n// > CustomizeObjectLayer::onSelectColor @ 0x57e968\n// > CustomizeObjectLayer::colorSetupClosed @ 0x57eab6\n// > CustomizeObjectLayer::onNextColorChannel @ 0x57eb4c\n// > CustomizeObjectLayer::onUpdateCustomColor @ 0x57ee7a\n// > CustomizeObjectLayer::textChanged @ 0x57f30e\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:52:51 +0000\n// \n\nint *__fastcall CustomizeObjectLayer::updateSelected(CustomizeObjectLayer *this, int a2)\n{\n  int *result; // r0\n  _BOOL4 v5; // r7\n  int v6; // r6\n  int v7; // r3\n  int v8; // r3\n  int v9; // r6\n  unsigned int i; // r4\n  GameObject *v11; // r11\n  int *RelativeSpriteColor; // r0\n  int v13; // r3\n  int v14; // r3\n\n  result = *((int **)this + 133);\n  v5 = a2 == 0;\n  if ( result )\n  {\n    result = (int *)GameObject::getRelativeSpriteColor((GameObject *)result, *((_DWORD *)this + 140));\n    if ( result )\n    {\n      if ( v5 )\n      {\n        v7 = result[1];\n        if ( v7 > 1100 )\n          v8 = 1101;\n        else\n          v8 = v7 & ~(v7 >> 31);\n        result[1] = v8;\n        *result = 0;\n      }\n      else\n      {\n        if ( a2 > 1100 )\n          v6 = 1101;\n        else\n          v6 = a2 & ~(a2 >> 31);\n        *result = v6;\n      }\n      *(_BYTE *)(*((_DWORD *)this + 133) + 1004) = 1;\n    }\n  }\n  else if ( *((_DWORD *)this + 134) )\n  {\n    if ( a2 > 1100 )\n      v9 = 1101;\n    else\n      v9 = a2 & ~(a2 >> 31);\n    for ( i = 0; ; ++i )\n    {\n      result = (int *)cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 134));\n      if ( i >= (unsigned int)result )\n        break;\n      v11 = (GameObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 134), i);\n      RelativeSpriteColor = (int *)GameObject::getRelativeSpriteColor(v11, *((_DWORD *)this + 140));\n      if ( RelativeSpriteColor )\n      {\n        if ( v5 )\n        {\n          v13 = RelativeSpriteColor[1];\n          *RelativeSpriteColor = 0;\n          if ( v13 > 1100 )\n            v14 = 1101;\n          else\n            v14 = v13 & ~(v13 >> 31);\n          RelativeSpriteColor[1] = v14;\n        }\n        else\n        {\n          *RelativeSpriteColor = v9;\n        }\n        *((_BYTE *)v11 + 1004) = 1;\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; CustomizeObjectLayer::updateSelected from 0x57e7cc to 0x57e88e (194 bytes)\n; \n; 5 xrefs:\n; > CustomizeObjectLayer::onSelectColor @ 0x57e968\n; > CustomizeObjectLayer::colorSetupClosed @ 0x57eab6\n; > CustomizeObjectLayer::onNextColorChannel @ 0x57eb4c\n; > CustomizeObjectLayer::onUpdateCustomColor @ 0x57ee7a\n; > CustomizeObjectLayer::textChanged @ 0x57f30e\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:52:51 +0000\n; \nPUSH.W          {R3-R11,LR}                                            ; +0x0, 0x57e7cc\nMOV             R5, R0                                                 ; +0x4, 0x57e7d0\nLDR.W           R0, [R0,#0x214]; this                                  ; +0x6, 0x57e7d2\nCLZ.W           R7, R1                                                 ; +0xa, 0x57e7d6\nMOV             R6, R1                                                 ; +0xe, 0x57e7da\nLSRS            R7, R7, #5                                             ; +0x10, 0x57e7dc\nCBZ             R0, loc_57E824                                         ; +0x12, 0x57e7de\nLDR.W           R1, [R5,#0x230]; int                                   ; +0x14, 0x57e7e0\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x18, 0x57e7e4\nCMP             R0, #0                                                 ; +0x1c, 0x57e7e8\nBEQ             locret_57E88A                                          ; +0x1e, 0x57e7ea\nMOVW            R2, #0x44C                                             ; +0x20, 0x57e7ec\nCBNZ            R7, loc_57E802                                         ; +0x24, 0x57e7f0\nCMP             R6, R2                                                 ; +0x26, 0x57e7f2\nITE LE                                                                 ; +0x28, 0x57e7f4\nBICLE.W         R6, R6, R6,ASR#31                                      ; +0x2a, 0x57e7f6\nMOVWGT          R6, #0x44D                                             ; +0x2e, 0x57e7fa\nSTR             R6, [R0]                                               ; +0x32, 0x57e7fe\nB               loc_57E816                                             ; +0x34, 0x57e800\nLDR             R3, [R0,#4]                                            ; +0x36, 0x57e802\nCMP             R3, R2                                                 ; +0x38, 0x57e804\nITE LE                                                                 ; +0x3a, 0x57e806\nBICLE.W         R3, R3, R3,ASR#31                                      ; +0x3c, 0x57e808\nMOVWGT          R3, #0x44D                                             ; +0x40, 0x57e80c\nSTR             R3, [R0,#4]                                            ; +0x44, 0x57e810\nMOVS            R3, #0                                                 ; +0x46, 0x57e812\nSTR             R3, [R0]                                               ; +0x48, 0x57e814\nLDR.W           R3, [R5,#0x214]                                        ; +0x4a, 0x57e816\nMOVS            R2, #1                                                 ; +0x4e, 0x57e81a\nSTRB.W          R2, [R3,#0x3EC]                                        ; +0x50, 0x57e81c\nPOP.W           {R3-R11,PC}                                            ; +0x54, 0x57e820\nLDR.W           R3, [R5,#0x218]                                        ; +0x58, 0x57e824\nCBZ             R3, locret_57E88A                                      ; +0x5c, 0x57e828\nBIC.W           R2, R1, R1,ASR#31                                      ; +0x5e, 0x57e82a\nMOVW            R8, #0x44C                                             ; +0x62, 0x57e82e\nMOVW            R3, #0x44D                                             ; +0x66, 0x57e832\nCMP             R1, R8                                                 ; +0x6a, 0x57e836\nITE LE                                                                 ; +0x6c, 0x57e838\nMOVLE           R6, R2                                                 ; +0x6e, 0x57e83a\nMOVGT           R6, R3                                                 ; +0x70, 0x57e83c\nMOV             R4, R0                                                 ; +0x72, 0x57e83e\nMOV.W           R9, #1                                                 ; +0x74, 0x57e840\nMOV             R10, R0                                                ; +0x78, 0x57e844\nLDR.W           R0, [R5,#0x218]; this                                  ; +0x7a, 0x57e846\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x7e, 0x57e84a\nCMP             R4, R0                                                 ; +0x82, 0x57e84e\nBCS             locret_57E88A                                          ; +0x84, 0x57e850\nMOV             R1, R4; unsigned int                                   ; +0x86, 0x57e852\nLDR.W           R0, [R5,#0x218]; this                                  ; +0x88, 0x57e854\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x8c, 0x57e858\nLDR.W           R1, [R5,#0x230]; int                                   ; +0x90, 0x57e85c\nMOV             R11, R0                                                ; +0x94, 0x57e860\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x96, 0x57e862\nCBZ             R0, loc_57E886                                         ; +0x9a, 0x57e866\nCBNZ            R7, loc_57E86E                                         ; +0x9c, 0x57e868\nSTR             R6, [R0]                                               ; +0x9e, 0x57e86a\nB               loc_57E882                                             ; +0xa0, 0x57e86c\nLDR             R3, [R0,#4]                                            ; +0xa2, 0x57e86e\nSTR.W           R10, [R0]                                              ; +0xa4, 0x57e870\nCMP             R3, R8                                                 ; +0xa8, 0x57e874\nITE LE                                                                 ; +0xaa, 0x57e876\nBICLE.W         R3, R3, R3,ASR#31                                      ; +0xac, 0x57e878\nMOVWGT          R3, #0x44D                                             ; +0xb0, 0x57e87c\nSTR             R3, [R0,#4]                                            ; +0xb4, 0x57e880\nSTRB.W          R9, [R11,#0x3EC]                                       ; +0xb6, 0x57e882\nADDS            R4, #1                                                 ; +0xba, 0x57e886\nB               loc_57E846                                             ; +0xbc, 0x57e888\nPOP.W           {R3-R11,PC}                                            ; +0xbe, 0x57e88a", "xrefs": ["CustomizeObjectLayer::onSelectColor @ 0x57e968", "CustomizeObjectLayer::colorSetupClosed @ 0x57eab6", "CustomizeObjectLayer::onNextColorChannel @ 0x57eb4c", "CustomizeObjectLayer::onUpdateCustomColor @ 0x57ee7a", "CustomizeObjectLayer::textChanged @ 0x57f30e"], "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"}