{"type": "func", "start": 4826920, "end": 4827326, "name": "GJEffectManager::processInheritedColors", "pseudocode": "// \n// GJEffectManager::processInheritedColors from 0x49a728 to 0x49a8be (406 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::loadDefaultColors @ 0x31b00a\n// > GJEffectManager::processColors @ 0x49c948\n// > GJEffectManager::loadFromState @ 0x4a6c4a\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid GJEffectManager::processInheritedColors(GJEffectManager *a1)\n{\n  cocos2d::CCDictionary *m_unkDict268; // r3\n  cocos2d::CCDictionary *m_colorActionDict; // r3\n  cocos2d::CCDictElement *m_pElements; // r3\n  cocos2d::CCDictElement *next; // r2\n  cocos2d::CCObject *m_pObject; // r3\n  cocos2d::CCDictElement *v7; // r0\n  cocos2d::CCDictElement *v8; // r3\n  cocos2d::CCDictElement *v9; // r8\n  cocos2d::CCDictionary *v10; // r3\n  ColorAction *v11; // r10\n  int m_copyID; // r3\n  int m_colorID; // r7\n  int v14; // r11\n  InheritanceNode *m_inheritanceNode; // r5\n  InheritanceNode *v16; // r6\n  cocos2d::CCDictElement *v17; // r2\n  cocos2d::CCDictElement *v18; // r3\n  cocos2d::CCDictElement *v19; // r5\n  InheritanceNode *v20; // r1\n  cocos2d::CCDictElement *v21; // r2\n\n  if ( cocos2d::CCDictionary::count(a1->m_colorActionDict) )\n  {\n    m_unkDict268 = a1->m_unkDict268;\n    if ( m_unkDict268 )\n    {\n      m_pElements = m_unkDict268->m_pElements;\n      if ( m_pElements )\n        next = (cocos2d::CCDictElement *)m_pElements->hh.next;\n      else\n        next = nullptr;\n      while ( m_pElements )\n      {\n        m_pObject = m_pElements->m_pObject;\n        if ( !BYTE1(m_pObject[1].m_nTag) )\n        {\n          m_pObject[1].m_uID = BYTE1(m_pObject[1].m_nTag);\n          LOBYTE(m_pObject[1].m_nTag) = 1;\n          BYTE1(m_pObject[1].m_nTag) = 1;\n        }\n        if ( next )\n          v7 = (cocos2d::CCDictElement *)next->hh.next;\n        else\n          v7 = nullptr;\n        m_pElements = next;\n        next = v7;\n      }\n    }\n    m_colorActionDict = a1->m_colorActionDict;\n    if ( m_colorActionDict )\n    {\n      v8 = m_colorActionDict->m_pElements;\n      if ( v8 )\n        v9 = (cocos2d::CCDictElement *)v8->hh.next;\n      else\n        v9 = nullptr;\n      while ( v8 )\n      {\n        v11 = (ColorAction *)v8->m_pObject;\n        m_copyID = v11->m_copyID;\n        m_colorID = v11->m_colorID;\n        v11->m_copyColorCalculated = 0;\n        v11->m_copyColorLoop = 0;\n        if ( m_copyID > 9998 )\n          v14 = (int)&stru_270C.st_name + 3;\n        else\n          v14 = m_copyID & ~(m_copyID >> 31);\n        if ( m_colorID <= 0 )\n        {\n          m_colorID = 0;\n        }\n        else if ( m_colorID >= (int)&stru_270C.st_name + 3 )\n        {\n          m_colorID = (int)&stru_270C.st_name + 3;\n        }\n        m_inheritanceNode = v11->m_inheritanceNode;\n        if ( !m_inheritanceNode )\n        {\n          m_inheritanceNode = a1->m_unkVector270.m_start[m_colorID];\n          if ( !m_inheritanceNode )\n          {\n            m_inheritanceNode = InheritanceNode::create(m_colorID, nullptr);\n            cocos2d::CCDictionary::setObject(a1->m_unkDict268, m_inheritanceNode, m_colorID);\n            a1->m_unkVector270.m_start[m_colorID] = m_inheritanceNode;\n          }\n        }\n        v16 = a1->m_unkVector270.m_start[v14];\n        if ( !v16 )\n        {\n          v16 = InheritanceNode::create(v14, nullptr);\n          cocos2d::CCDictionary::setObject(a1->m_unkDict268, v16, v14);\n          a1->m_unkVector270.m_start[v14] = v16;\n        }\n        v11->m_inheritanceNode = m_inheritanceNode;\n        m_inheritanceNode->m_unk051 = 0;\n        v16->m_unk051 = 0;\n        m_inheritanceNode->m_colorAction = v11;\n        if ( !v16->m_colorAction )\n          v16->m_colorAction = GJEffectManager::getColorAction(a1, v14);\n        if ( GJEffectManager::wouldCreateLoop(a1, v16, m_colorID) )\n        {\n          v11->m_copyColorLoop = 1;\n        }\n        else if ( !m_inheritanceNode->m_inheritanceNode )\n        {\n          m_inheritanceNode->m_inheritanceNode = v16;\n          v16->m_unk050 = 0;\n        }\n        if ( v9 )\n          v17 = (cocos2d::CCDictElement *)v9->hh.next;\n        else\n          v17 = nullptr;\n        v8 = v9;\n        v9 = v17;\n      }\n    }\n    v10 = a1->m_unkDict268;\n    if ( v10 )\n    {\n      v18 = v10->m_pElements;\n      if ( v18 )\n        v19 = (cocos2d::CCDictElement *)v18->hh.next;\n      else\n        v19 = nullptr;\n      while ( v18 )\n      {\n        v20 = (InheritanceNode *)v18->m_pObject;\n        if ( !v20->m_unk051 && v20->m_unk050 )\n          GJEffectManager::traverseInheritanceChain(a1, v20);\n        if ( v19 )\n          v21 = (cocos2d::CCDictElement *)v19->hh.next;\n        else\n          v21 = nullptr;\n        v18 = v19;\n        v19 = v21;\n      }\n    }\n  }\n}", "assembly": "; \n; GJEffectManager::processInheritedColors from 0x49a728 to 0x49a8be (406 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::loadDefaultColors @ 0x31b00a\n; > GJEffectManager::processColors @ 0x49c948\n; > GJEffectManager::loadFromState @ 0x4a6c4a\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH.W          {R3-R11,LR}                                            ; +0x0, 0x49a728\nMOV             R4, R0                                                 ; +0x4, 0x49a72c\nLDR.W           R0, [R0,#0x198]; this                                  ; +0x6, 0x49a72e\nBL              _ZN7cocos2d12CCDictionary5countEv; cocos2d::CCDictionary::count(void) ; +0xa, 0x49a732\nCMP             R0, #0                                                 ; +0xe, 0x49a736\nBEQ.W           locret_49A8BA                                          ; +0x10, 0x49a738\nLDR.W           R3, [R4,#0x19C]                                        ; +0x14, 0x49a73c\nCBNZ            R3, loc_49A74A                                         ; +0x18, 0x49a740\nLDR.W           R3, [R4,#0x198]                                        ; +0x1a, 0x49a742\nCBNZ            R3, loc_49A780                                         ; +0x1e, 0x49a746\nB               loc_49A78E                                             ; +0x20, 0x49a748\nLDR             R3, [R3,#0x34]                                         ; +0x22, 0x49a74a\nCBZ             R3, loc_49A754                                         ; +0x24, 0x49a74c\nLDR.W           R2, [R3,#0x110]                                        ; +0x26, 0x49a74e\nB               loc_49A756                                             ; +0x2a, 0x49a752\nMOV             R2, R3                                                 ; +0x2c, 0x49a754\nMOVS            R1, #1                                                 ; +0x2e, 0x49a756\nCMP             R3, #0                                                 ; +0x30, 0x49a758\nBEQ             loc_49A742                                             ; +0x32, 0x49a75a\nLDR.W           R3, [R3,#0x104]                                        ; +0x34, 0x49a75c\nLDRB.W          R0, [R3,#0x41]                                         ; +0x38, 0x49a760\nCBNZ            R0, loc_49A770                                         ; +0x3c, 0x49a764\nSTR             R0, [R3,#0x38]                                         ; +0x3e, 0x49a766\nSTRB.W          R1, [R3,#0x40]                                         ; +0x40, 0x49a768\nSTRB.W          R1, [R3,#0x41]                                         ; +0x44, 0x49a76c\nCBZ             R2, loc_49A778                                         ; +0x48, 0x49a770\nLDR.W           R0, [R2,#0x110]                                        ; +0x4a, 0x49a772\nB               loc_49A77A                                             ; +0x4e, 0x49a776\nMOV             R0, R2                                                 ; +0x50, 0x49a778\nMOV             R3, R2                                                 ; +0x52, 0x49a77a\nMOV             R2, R0                                                 ; +0x54, 0x49a77c\nB               loc_49A758                                             ; +0x56, 0x49a77e\nLDR             R3, [R3,#0x34]                                         ; +0x58, 0x49a780\nCBZ             R3, loc_49A79A                                         ; +0x5a, 0x49a782\nLDR.W           R8, [R3,#0x110]                                        ; +0x5c, 0x49a784\nMOV.W           R9, #0                                                 ; +0x60, 0x49a788\nCBNZ            R3, loc_49A79E                                         ; +0x64, 0x49a78c\nLDR.W           R3, [R4,#0x19C]                                        ; +0x66, 0x49a78e\nCMP             R3, #0                                                 ; +0x6a, 0x49a792\nBNE             loc_49A87A                                             ; +0x6c, 0x49a794\nPOP.W           {R3-R11,PC}                                            ; +0x6e, 0x49a796\nMOV             R8, R3                                                 ; +0x72, 0x49a79a\nB               loc_49A788                                             ; +0x74, 0x49a79c\nLDR.W           R10, [R3,#0x104]                                       ; +0x76, 0x49a79e\nMOVW            R2, #0x270E                                            ; +0x7a, 0x49a7a2\nLDR.W           R3, [R10,#0x74]                                        ; +0x7e, 0x49a7a6\nLDR.W           R7, [R10,#0x58]                                        ; +0x82, 0x49a7aa\nCMP             R3, R2                                                 ; +0x86, 0x49a7ae\nSTRB.W          R9, [R10,#0x78]                                        ; +0x88, 0x49a7b0\nSTRB.W          R9, [R10,#0x7A]                                        ; +0x8c, 0x49a7b4\nITE LE                                                                 ; +0x90, 0x49a7b8\nBICLE.W         R11, R3, R3,ASR#31                                     ; +0x92, 0x49a7ba\nMOVWGT          R11, #(stru_270C.st_name+3)                            ; +0x96, 0x49a7be\nCMP             R7, #0                                                 ; +0x9a, 0x49a7c2\nBLE             loc_49A7D2                                             ; +0x9c, 0x49a7c4\nMOVW            R3, #(stru_270C.st_name+3)                             ; +0x9e, 0x49a7c6\nCMP             R7, R3                                                 ; +0xa2, 0x49a7ca\nIT GE                                                                  ; +0xa4, 0x49a7cc\nMOVGE           R7, R3                                                 ; +0xa6, 0x49a7ce\nB               loc_49A7D4                                             ; +0xa8, 0x49a7d0\nMOVS            R7, #0                                                 ; +0xaa, 0x49a7d2\nLDR.W           R5, [R10,#0x8C]                                        ; +0xac, 0x49a7d4\nCBNZ            R5, loc_49A802                                         ; +0xb0, 0x49a7d8\nLDR.W           R2, [R4,#0x1A0]; InheritanceNode *                     ; +0xb2, 0x49a7da\nLDR.W           R5, [R2,R7,LSL#2]                                      ; +0xb6, 0x49a7de\nCBNZ            R5, loc_49A802                                         ; +0xba, 0x49a7e2\nMOV             R1, R5; int                                            ; +0xbc, 0x49a7e4\nMOV             R0, R7; this                                           ; +0xbe, 0x49a7e6\nBL              _ZN15InheritanceNode6createEiPS_; InheritanceNode::create(int,InheritanceNode*) ; +0xc0, 0x49a7e8\nMOV             R2, R7; int                                            ; +0xc4, 0x49a7ec\nMOV             R5, R0                                                 ; +0xc6, 0x49a7ee\nLDR.W           R0, [R4,#0x19C]; this                                  ; +0xc8, 0x49a7f0\nMOV             R1, R5; cocos2d::CCObject *                            ; +0xcc, 0x49a7f4\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0xce, 0x49a7f6\nLDR.W           R2, [R4,#0x1A0]                                        ; +0xd2, 0x49a7fa\nSTR.W           R5, [R2,R7,LSL#2]                                      ; +0xd6, 0x49a7fe\nLDR.W           R2, [R4,#0x1A0]; InheritanceNode *                     ; +0xda, 0x49a802\nLDR.W           R6, [R2,R11,LSL#2]                                     ; +0xde, 0x49a806\nCBNZ            R6, loc_49A82A                                         ; +0xe2, 0x49a80a\nMOV             R1, R6; int                                            ; +0xe4, 0x49a80c\nMOV             R0, R11; this                                          ; +0xe6, 0x49a80e\nBL              _ZN15InheritanceNode6createEiPS_; InheritanceNode::create(int,InheritanceNode*) ; +0xe8, 0x49a810\nMOV             R2, R11; int                                           ; +0xec, 0x49a814\nMOV             R6, R0                                                 ; +0xee, 0x49a816\nLDR.W           R0, [R4,#0x19C]; this                                  ; +0xf0, 0x49a818\nMOV             R1, R6; cocos2d::CCObject *                            ; +0xf4, 0x49a81c\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0xf6, 0x49a81e\nLDR.W           R2, [R4,#0x1A0]                                        ; +0xfa, 0x49a822\nSTR.W           R6, [R2,R11,LSL#2]                                     ; +0xfe, 0x49a826\nSTR.W           R5, [R10,#0x8C]                                        ; +0x102, 0x49a82a\nSTRB.W          R9, [R5,#0x41]                                         ; +0x106, 0x49a82e\nSTRB.W          R9, [R6,#0x41]                                         ; +0x10a, 0x49a832\nSTR.W           R10, [R5,#0x3C]                                        ; +0x10e, 0x49a836\nLDR             R2, [R6,#0x3C]                                         ; +0x112, 0x49a83a\nCBNZ            R2, loc_49A848                                         ; +0x114, 0x49a83c\nMOV             R0, R4; this                                           ; +0x116, 0x49a83e\nMOV             R1, R11; int                                           ; +0x118, 0x49a840\nBL              _ZN15GJEffectManager14getColorActionEi; GJEffectManager::getColorAction(int) ; +0x11a, 0x49a842\nSTR             R0, [R6,#0x3C]                                         ; +0x11e, 0x49a846\nMOV             R0, R4                                                 ; +0x120, 0x49a848\nMOV             R1, R6                                                 ; +0x122, 0x49a84a\nMOV             R2, R7                                                 ; +0x124, 0x49a84c\nBL              _ZN15GJEffectManager15wouldCreateLoopEP15InheritanceNodei; GJEffectManager::wouldCreateLoop(InheritanceNode *,int) ; +0x126, 0x49a84e\nCBNZ            R0, loc_49A860                                         ; +0x12a, 0x49a852\nLDR             R3, [R5,#0x38]                                         ; +0x12c, 0x49a854\nCBNZ            R3, loc_49A866                                         ; +0x12e, 0x49a856\nSTR             R6, [R5,#0x38]                                         ; +0x130, 0x49a858\nSTRB.W          R3, [R6,#0x40]                                         ; +0x132, 0x49a85a\nB               loc_49A866                                             ; +0x136, 0x49a85e\nMOVS            R3, #1                                                 ; +0x138, 0x49a860\nSTRB.W          R3, [R10,#0x7A]                                        ; +0x13a, 0x49a862\nCMP.W           R8, #0                                                 ; +0x13e, 0x49a866\nBEQ             loc_49A872                                             ; +0x142, 0x49a86a\nLDR.W           R2, [R8,#0x110]                                        ; +0x144, 0x49a86c\nB               loc_49A874                                             ; +0x148, 0x49a870\nMOV             R2, R8                                                 ; +0x14a, 0x49a872\nMOV             R3, R8                                                 ; +0x14c, 0x49a874\nMOV             R8, R2                                                 ; +0x14e, 0x49a876\nB               loc_49A78C                                             ; +0x150, 0x49a878\nLDR             R3, [R3,#0x34]                                         ; +0x152, 0x49a87a\nCBZ             R3, loc_49A884                                         ; +0x154, 0x49a87c\nLDR.W           R5, [R3,#0x110]                                        ; +0x156, 0x49a87e\nB               loc_49A89C                                             ; +0x15a, 0x49a882\nMOV             R5, R3                                                 ; +0x15c, 0x49a884\nB               loc_49A89C                                             ; +0x15e, 0x49a886\nLDR.W           R1, [R3,#0x104]; InheritanceNode *                     ; +0x160, 0x49a888\nLDRB.W          R3, [R1,#0x41]                                         ; +0x164, 0x49a88c\nCBZ             R3, loc_49A8A2                                         ; +0x168, 0x49a890\nCBZ             R5, loc_49A8AA                                         ; +0x16a, 0x49a892\nLDR.W           R2, [R5,#0x110]                                        ; +0x16c, 0x49a894\nMOV             R3, R5                                                 ; +0x170, 0x49a898\nMOV             R5, R2                                                 ; +0x172, 0x49a89a\nCMP             R3, #0                                                 ; +0x174, 0x49a89c\nBNE             loc_49A888                                             ; +0x176, 0x49a89e\nB               locret_49A8AE                                          ; +0x178, 0x49a8a0\nLDRB.W          R3, [R1,#0x40]                                         ; +0x17a, 0x49a8a2\nCBNZ            R3, loc_49A8B2                                         ; +0x17e, 0x49a8a6\nB               loc_49A892                                             ; +0x180, 0x49a8a8\nMOV             R2, R5                                                 ; +0x182, 0x49a8aa\nB               loc_49A898                                             ; +0x184, 0x49a8ac\nPOP.W           {R3-R11,PC}                                            ; +0x186, 0x49a8ae\nMOV             R0, R4; this                                           ; +0x18a, 0x49a8b2\nBL              _ZN15GJEffectManager24traverseInheritanceChainEP15InheritanceNode; GJEffectManager::traverseInheritanceChain(InheritanceNode *) ; +0x18c, 0x49a8b4\nB               loc_49A892                                             ; +0x190, 0x49a8b8\nPOP.W           {R3-R11,PC}                                            ; +0x192, 0x49a8ba", "xrefs": ["PlayLayer::loadDefaultColors @ 0x31b00a", "GJEffectManager::processColors @ 0x49c948", "GJEffectManager::loadFromState @ 0x4a6c4a"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}