{"type": "func", "start": 5760524, "end": 5760664, "name": "CustomizeObjectLayer::getActiveMode", "pseudocode": "// \n// CustomizeObjectLayer::getActiveMode from 0x57e60c to 0x57e698 (140 bytes)\n// \n// 7 xrefs:\n// > CustomizeObjectLayer::onLiveEdit @ 0x57e69e\n// > CustomizeObjectLayer::onEditColor @ 0x57e6ca\n// > CustomizeObjectLayer::updateColorSprite @ 0x57e70c\n// > CustomizeObjectLayer::onSelectColor @ 0x57e988\n// > CustomizeObjectLayer::updateCurrentSelection @ 0x57eb78\n// > CustomizeObjectLayer::onPaste @ 0x57ebde\n// > CustomizeObjectLayer::onSelectMode @ 0x57ee02\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::getActiveMode(CustomizeObjectLayer *this, int a2)\n{\n  GameObject *v3; // r0\n  int *RelativeSpriteColor; // r0\n  int v6; // r4\n  int v7; // r6\n  unsigned int v8; // r5\n  GameObject *v9; // r0\n  int *v10; // r0\n  int v11; // r2\n  int v12; // r3\n\n  v3 = *((GameObject **)this + 133);\n  if ( v3 )\n  {\n    RelativeSpriteColor = (int *)GameObject::getRelativeSpriteColor(v3, *((_DWORD *)this + 140));\n    if ( !RelativeSpriteColor )\n      return 0;\n    v6 = *RelativeSpriteColor;\n    if ( RelativeSpriteColor[1] != *RelativeSpriteColor )\n    {\n      if ( v6 )\n        return v6;\n      v6 = RelativeSpriteColor[1];\n    }\n    if ( !a2 )\n      return 0;\n  }\n  else\n  {\n    v7 = a2 ^ 1;\n    v8 = 0;\n    v6 = -1;\n    while ( v8 < cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 134)) )\n    {\n      v9 = (GameObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 134), v8);\n      v10 = (int *)GameObject::getRelativeSpriteColor(v9, *((_DWORD *)this + 140));\n      if ( v10 )\n      {\n        v11 = v10[1];\n        v12 = *v10;\n        if ( v11 != *v10 && !v12 )\n          v12 = v10[1];\n        if ( v7 )\n          v7 = v12 == v11;\n        if ( v6 != -1 && v6 != v12 )\n        {\n          v6 = -1;\n          break;\n        }\n      }\n      else\n      {\n        v12 = v6;\n      }\n      ++v8;\n      v6 = v12;\n    }\n    if ( v7 )\n      return 0;\n  }\n  return v6;\n}", "assembly": "; \n; CustomizeObjectLayer::getActiveMode from 0x57e60c to 0x57e698 (140 bytes)\n; \n; 7 xrefs:\n; > CustomizeObjectLayer::onLiveEdit @ 0x57e69e\n; > CustomizeObjectLayer::onEditColor @ 0x57e6ca\n; > CustomizeObjectLayer::updateColorSprite @ 0x57e70c\n; > CustomizeObjectLayer::onSelectColor @ 0x57e988\n; > CustomizeObjectLayer::updateCurrentSelection @ 0x57eb78\n; > CustomizeObjectLayer::onPaste @ 0x57ebde\n; > CustomizeObjectLayer::onSelectMode @ 0x57ee02\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            {R3-R7,LR}                                             ; +0x0, 0x57e60c\nMOV             R7, R0                                                 ; +0x2, 0x57e60e\nLDR.W           R0, [R0,#0x214]; this                                  ; +0x4, 0x57e610\nMOV             R6, R1                                                 ; +0x8, 0x57e614\nCBZ             R0, loc_57E634                                         ; +0xa, 0x57e616\nLDR.W           R1, [R7,#0x230]; int                                   ; +0xc, 0x57e618\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x10, 0x57e61c\nCBNZ            R0, loc_57E626                                         ; +0x14, 0x57e620\nMOVS            R4, #0                                                 ; +0x16, 0x57e622\nB               loc_57E694                                             ; +0x18, 0x57e624\nLDR             R3, [R0,#4]                                            ; +0x1a, 0x57e626\nLDR             R4, [R0]                                               ; +0x1c, 0x57e628\nCMP             R3, R4                                                 ; +0x1e, 0x57e62a\nBEQ             loc_57E68E                                             ; +0x20, 0x57e62c\nCBNZ            R4, loc_57E694                                         ; +0x22, 0x57e62e\nMOV             R4, R3                                                 ; +0x24, 0x57e630\nB               loc_57E68E                                             ; +0x26, 0x57e632\nEOR.W           R6, R1, #1                                             ; +0x28, 0x57e634\nMOV             R5, R0                                                 ; +0x2c, 0x57e638\nMOV.W           R4, #0xFFFFFFFF                                        ; +0x2e, 0x57e63a\nLDR.W           R0, [R7,#0x218]; this                                  ; +0x32, 0x57e63e\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x36, 0x57e642\nCMP             R5, R0                                                 ; +0x3a, 0x57e646\nBCS             loc_57E68A                                             ; +0x3c, 0x57e648\nMOV             R1, R5; unsigned int                                   ; +0x3e, 0x57e64a\nLDR.W           R0, [R7,#0x218]; this                                  ; +0x40, 0x57e64c\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x44, 0x57e650\nLDR.W           R1, [R7,#0x230]; int                                   ; +0x48, 0x57e654\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x4c, 0x57e658\nCBZ             R0, loc_57E67E                                         ; +0x50, 0x57e65c\nLDR             R2, [R0,#4]                                            ; +0x52, 0x57e65e\nLDR             R3, [R0]                                               ; +0x54, 0x57e660\nCMP             R2, R3                                                 ; +0x56, 0x57e662\nBEQ             loc_57E66C                                             ; +0x58, 0x57e664\nCMP             R3, #0                                                 ; +0x5a, 0x57e666\nIT EQ                                                                  ; +0x5c, 0x57e668\nMOVEQ           R3, R2                                                 ; +0x5e, 0x57e66a\nCBZ             R6, loc_57E674                                         ; +0x60, 0x57e66c\nSUBS            R1, R3, R2                                             ; +0x62, 0x57e66e\nNEGS            R6, R1                                                 ; +0x64, 0x57e670\nADCS            R6, R1                                                 ; +0x66, 0x57e672\nADDS            R2, R4, #1                                             ; +0x68, 0x57e674\nBEQ             loc_57E680                                             ; +0x6a, 0x57e676\nCMP             R4, R3                                                 ; +0x6c, 0x57e678\nBEQ             loc_57E680                                             ; +0x6e, 0x57e67a\nB               loc_57E686                                             ; +0x70, 0x57e67c\nMOV             R3, R4                                                 ; +0x72, 0x57e67e\nADDS            R5, #1                                                 ; +0x74, 0x57e680\nMOV             R4, R3                                                 ; +0x76, 0x57e682\nB               loc_57E63E                                             ; +0x78, 0x57e684\nMOV.W           R4, #0xFFFFFFFF                                        ; +0x7a, 0x57e686\nCBZ             R6, loc_57E694                                         ; +0x7e, 0x57e68a\nB               loc_57E622                                             ; +0x80, 0x57e68c\nCMP             R6, #0                                                 ; +0x82, 0x57e68e\nIT EQ                                                                  ; +0x84, 0x57e690\nMOVEQ           R4, #0                                                 ; +0x86, 0x57e692\nMOV             R0, R4                                                 ; +0x88, 0x57e694\nPOP             {R3-R7,PC}                                             ; +0x8a, 0x57e696", "xrefs": ["CustomizeObjectLayer::onLiveEdit @ 0x57e69e", "CustomizeObjectLayer::onEditColor @ 0x57e6ca", "CustomizeObjectLayer::updateColorSprite @ 0x57e70c", "CustomizeObjectLayer::onSelectColor @ 0x57e988", "CustomizeObjectLayer::updateCurrentSelection @ 0x57eb78", "CustomizeObjectLayer::onPaste @ 0x57ebde", "CustomizeObjectLayer::onSelectMode @ 0x57ee02"], "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"}