{"type": "func", "start": 4656816, "end": 4656954, "name": "GJBaseGameLayer::toggleGroup", "pseudocode": "// \n// GJBaseGameLayer::toggleGroup from 0x470eb0 to 0x470f3a (138 bytes)\n// \n// 2 xrefs:\n// > EffectGameObject::triggerObject @ 0x3edb66\n// > GJBaseGameLayer::toggleGroupTriggered @ 0x470f46\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 GJBaseGameLayer::toggleGroup(GJBaseGameLayer *a1, int a2, bool a3)\n{\n  _BOOL4 v4; // r6\n  cocos2d::CCArray *Group; // r0\n  cocos2d::ccArray *data; // r2\n  unsigned int num; // r3\n  cocos2d::CCObject **arr; // r2\n  unsigned int v10; // r4\n  GameObject **v11; // r8\n  GameObject *v12; // r0\n  GameObject *v13; // t1\n  cocos2d::ccArray *v14; // r2\n  unsigned int v15; // r3\n  cocos2d::CCObject **v16; // r2\n  unsigned int v17; // r4\n  GameObject **v18; // r8\n  GameObject *v19; // r0\n  GameObject *v20; // t1\n\n  v4 = a3;\n  if ( GJEffectManager::isGroupEnabled(a1->m_effectManager, a2) != a3 )\n  {\n    Group = GJBaseGameLayer::getGroup(a1, a2);\n    if ( v4 )\n    {\n      if ( Group )\n      {\n        data = Group->data;\n        num = data->num;\n        if ( data->num )\n        {\n          arr = data->arr;\n          v10 = (unsigned int)(&arr[num] + 0x3FFFFFFF);\n          v11 = (GameObject **)arr;\n          while ( (unsigned int)v11 <= v10 )\n          {\n            v13 = *v11++;\n            v12 = v13;\n            if ( !v13 )\n              break;\n            GameObject::groupWasEnabled(v12);\n          }\n        }\n      }\n    }\n    else if ( Group )\n    {\n      v14 = Group->data;\n      v15 = v14->num;\n      if ( v14->num )\n      {\n        v16 = v14->arr;\n        v17 = (unsigned int)(&v16[v15] + 0x3FFFFFFF);\n        v18 = (GameObject **)v16;\n        while ( (unsigned int)v18 <= v17 )\n        {\n          v20 = *v18++;\n          v19 = v20;\n          if ( !v20 )\n            break;\n          GameObject::groupWasDisabled(v19);\n        }\n      }\n    }\n    GJEffectManager::toggleGroup(a1->m_effectManager, a2, v4);\n  }\n}", "assembly": "; \n; GJBaseGameLayer::toggleGroup from 0x470eb0 to 0x470f3a (138 bytes)\n; \n; 2 xrefs:\n; > EffectGameObject::triggerObject @ 0x3edb66\n; > GJBaseGameLayer::toggleGroupTriggered @ 0x470f46\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          {R4-R8,LR}                                             ; +0x0, 0x470eb0\nMOV             R5, R0                                                 ; +0x4, 0x470eb4\nLDR.W           R0, [R0,#0x690]; this                                  ; +0x6, 0x470eb6\nMOV             R6, R2                                                 ; +0xa, 0x470eba\nMOV             R7, R1                                                 ; +0xc, 0x470ebc\nBL              _ZN15GJEffectManager14isGroupEnabledEi; GJEffectManager::isGroupEnabled(int) ; +0xe, 0x470ebe\nCMP             R0, R6                                                 ; +0x12, 0x470ec2\nBEQ             locret_470F36                                          ; +0x14, 0x470ec4\nMOV             R0, R5; this                                           ; +0x16, 0x470ec6\nMOV             R1, R7; int                                            ; +0x18, 0x470ec8\nBL              _ZN15GJBaseGameLayer8getGroupEi; GJBaseGameLayer::getGroup(int) ; +0x1a, 0x470eca\nCBZ             R6, loc_470F0A                                         ; +0x1e, 0x470ece\nCBNZ            R0, loc_470EE2                                         ; +0x20, 0x470ed0\nLDR.W           R0, [R5,#0x690]; this                                  ; +0x22, 0x470ed2\nMOV             R1, R7; int                                            ; +0x26, 0x470ed6\nMOV             R2, R6; bool                                           ; +0x28, 0x470ed8\nPOP.W           {R4-R8,LR}                                             ; +0x2a, 0x470eda\nB.W             _ZN15GJEffectManager11toggleGroupEib; GJEffectManager::toggleGroup(int,bool) ; +0x2e, 0x470ede\nLDR             R2, [R0,#0x34]                                         ; +0x32, 0x470ee2\nLDR             R3, [R2]                                               ; +0x34, 0x470ee4\nCMP             R3, #0                                                 ; +0x36, 0x470ee6\nBEQ             loc_470ED2                                             ; +0x38, 0x470ee8\nADD.W           R3, R3, #0x40000000                                    ; +0x3a, 0x470eea\nLDR             R2, [R2,#0xC]                                          ; +0x3e, 0x470eee\nSUBS            R3, #1                                                 ; +0x40, 0x470ef0\nADD.W           R4, R2, R3,LSL#2                                       ; +0x42, 0x470ef2\nMOV             R8, R2                                                 ; +0x46, 0x470ef6\nCMP             R8, R4                                                 ; +0x48, 0x470ef8\nBHI             loc_470ED2                                             ; +0x4a, 0x470efa\nLDR.W           R0, [R8],#4; this                                      ; +0x4c, 0x470efc\nCMP             R0, #0                                                 ; +0x50, 0x470f00\nBEQ             loc_470ED2                                             ; +0x52, 0x470f02\nBL              _ZN10GameObject15groupWasEnabledEv; GameObject::groupWasEnabled(void) ; +0x54, 0x470f04\nB               loc_470EF8                                             ; +0x58, 0x470f08\nCMP             R0, #0                                                 ; +0x5a, 0x470f0a\nBEQ             loc_470ED2                                             ; +0x5c, 0x470f0c\nLDR             R2, [R0,#0x34]                                         ; +0x5e, 0x470f0e\nLDR             R3, [R2]                                               ; +0x60, 0x470f10\nCMP             R3, #0                                                 ; +0x62, 0x470f12\nBEQ             loc_470ED2                                             ; +0x64, 0x470f14\nADD.W           R3, R3, #0x40000000                                    ; +0x66, 0x470f16\nLDR             R2, [R2,#0xC]                                          ; +0x6a, 0x470f1a\nSUBS            R3, #1                                                 ; +0x6c, 0x470f1c\nADD.W           R4, R2, R3,LSL#2                                       ; +0x6e, 0x470f1e\nMOV             R8, R2                                                 ; +0x72, 0x470f22\nCMP             R8, R4                                                 ; +0x74, 0x470f24\nBHI             loc_470ED2                                             ; +0x76, 0x470f26\nLDR.W           R0, [R8],#4; this                                      ; +0x78, 0x470f28\nCMP             R0, #0                                                 ; +0x7c, 0x470f2c\nBEQ             loc_470ED2                                             ; +0x7e, 0x470f2e\nBL              _ZN10GameObject16groupWasDisabledEv; GameObject::groupWasDisabled(void) ; +0x80, 0x470f30\nB               loc_470F24                                             ; +0x84, 0x470f34\nPOP.W           {R4-R8,PC}                                             ; +0x86, 0x470f36", "xrefs": ["EffectGameObject::triggerObject @ 0x3edb66", "GJBaseGameLayer::toggleGroupTriggered @ 0x470f46"], "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"}