{"type": "func", "start": 4665840, "end": 4665998, "name": "GJBaseGameLayer::assignNewStickyGroups", "pseudocode": "// \n// GJBaseGameLayer::assignNewStickyGroups from 0x4731f0 to 0x47328e (158 bytes)\n// \n// 2 xrefs:\n// > LevelEditorLayer::duplicateKeyframeAnimation @ 0x371370\n// > EditorUI::pasteObjects @ 0x3a3798\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::assignNewStickyGroups(GJBaseGameLayer *a1, cocos2d::CCArray *a2)\n{\n  unsigned int v4; // r5\n  cocos2d::CCDictionary *v5; // r4\n  cocos2d::CCObject *v6; // r6\n  cocos2d::CCArray *v7; // r7\n  cocos2d::CCDictElement *m_pElements; // r3\n  cocos2d::CCDictElement *next; // r4\n  cocos2d::CCArray *m_pObject; // r5\n  cocos2d::CCDictElement *v11; // r2\n\n  if ( a2 )\n  {\n    v4 = 0;\n    v5 = nullptr;\n    while ( v4 < cocos2d::CCArray::count(a2) )\n    {\n      v6 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(a2, v4);\n      if ( (int)v6[14].m_uID > 0 )\n      {\n        if ( !v5 )\n          v5 = cocos2d::CCDictionary::create();\n        v7 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v5, v6[14].m_uID);\n        if ( !v7 )\n        {\n          v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(nullptr);\n          cocos2d::CCDictionary::setObject(v5, v7, v6[14].m_uID);\n        }\n        cocos2d::CCArray::addObject(v7, v6);\n      }\n      ++v4;\n    }\n    if ( v5 )\n    {\n      m_pElements = v5->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 = (cocos2d::CCArray *)m_pElements->m_pObject;\n        GJBaseGameLayer::ungroupStickyObjects(a1, m_pObject);\n        GJBaseGameLayer::groupStickyObjects(a1, m_pObject);\n        if ( next )\n          v11 = (cocos2d::CCDictElement *)next->hh.next;\n        else\n          v11 = nullptr;\n        m_pElements = next;\n        next = v11;\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::assignNewStickyGroups from 0x4731f0 to 0x47328e (158 bytes)\n; \n; 2 xrefs:\n; > LevelEditorLayer::duplicateKeyframeAnimation @ 0x371370\n; > EditorUI::pasteObjects @ 0x3a3798\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-R9,LR}                                             ; +0x0, 0x4731f0\nMOV             R9, R0                                                 ; +0x4, 0x4731f4\nMOV             R8, R1                                                 ; +0x6, 0x4731f6\nCBNZ            R1, loc_4731FE                                         ; +0x8, 0x4731f8\nPOP.W           {R3-R9,PC}                                             ; +0xa, 0x4731fa\nMOVS            R5, #0                                                 ; +0xe, 0x4731fe\nMOV             R4, R5                                                 ; +0x10, 0x473200\nMOV             R0, R8; this                                           ; +0x12, 0x473202\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x14, 0x473204\nCMP             R5, R0                                                 ; +0x18, 0x473208\nBCS             loc_473252                                             ; +0x1a, 0x47320a\nMOV             R0, R8; this                                           ; +0x1c, 0x47320c\nMOV             R1, R5; unsigned int                                   ; +0x1e, 0x47320e\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x20, 0x473210\nLDR.W           R3, [R0,#0x2DC]                                        ; +0x24, 0x473214\nMOV             R6, R0                                                 ; +0x28, 0x473218\nCMP             R3, #0                                                 ; +0x2a, 0x47321a\nBLE             loc_47324E                                             ; +0x2c, 0x47321c\nCBNZ            R4, loc_473226                                         ; +0x2e, 0x47321e\nBL              _ZN7cocos2d12CCDictionary6createEv; cocos2d::CCDictionary::create(void) ; +0x30, 0x473220\nMOV             R4, R0                                                 ; +0x34, 0x473224\nMOV             R0, R4; this                                           ; +0x36, 0x473226\nLDR.W           R1, [R6,#0x2DC]; int                                   ; +0x38, 0x473228\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x3c, 0x47322c\nMOV             R7, R0                                                 ; +0x40, 0x473230\nCBNZ            R0, loc_473246                                         ; +0x42, 0x473232\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x44, 0x473234\nLDR.W           R2, [R6,#0x2DC]; int                                   ; +0x48, 0x473238\nMOV             R7, R0                                                 ; +0x4c, 0x47323c\nMOV             R0, R4; this                                           ; +0x4e, 0x47323e\nMOV             R1, R7; cocos2d::CCObject *                            ; +0x50, 0x473240\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0x52, 0x473242\nMOV             R0, R7; this                                           ; +0x56, 0x473246\nMOV             R1, R6; cocos2d::CCObject *                            ; +0x58, 0x473248\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x5a, 0x47324a\nADDS            R5, #1                                                 ; +0x5e, 0x47324e\nB               loc_473202                                             ; +0x60, 0x473250\nCBZ             R4, locret_47328A                                      ; +0x62, 0x473252\nLDR             R3, [R4,#0x34]                                         ; +0x64, 0x473254\nCBZ             R3, loc_47325E                                         ; +0x66, 0x473256\nLDR.W           R4, [R3,#0x110]                                        ; +0x68, 0x473258\nB               loc_473280                                             ; +0x6c, 0x47325c\nMOV             R4, R3                                                 ; +0x6e, 0x47325e\nB               loc_473280                                             ; +0x70, 0x473260\nLDR.W           R5, [R3,#0x104]                                        ; +0x72, 0x473262\nMOV             R0, R9; this                                           ; +0x76, 0x473266\nMOV             R1, R5; cocos2d::CCArray *                             ; +0x78, 0x473268\nBL              _ZN15GJBaseGameLayer20ungroupStickyObjectsEPN7cocos2d7CCArrayE; GJBaseGameLayer::ungroupStickyObjects(cocos2d::CCArray *) ; +0x7a, 0x47326a\nMOV             R0, R9; this                                           ; +0x7e, 0x47326e\nMOV             R1, R5; cocos2d::CCArray *                             ; +0x80, 0x473270\nBL              _ZN15GJBaseGameLayer18groupStickyObjectsEPN7cocos2d7CCArrayE; GJBaseGameLayer::groupStickyObjects(cocos2d::CCArray *) ; +0x82, 0x473272\nCBZ             R4, loc_473286                                         ; +0x86, 0x473276\nLDR.W           R2, [R4,#0x110]                                        ; +0x88, 0x473278\nMOV             R3, R4                                                 ; +0x8c, 0x47327c\nMOV             R4, R2                                                 ; +0x8e, 0x47327e\nCMP             R3, #0                                                 ; +0x90, 0x473280\nBNE             loc_473262                                             ; +0x92, 0x473282\nB               locret_47328A                                          ; +0x94, 0x473284\nMOV             R2, R4                                                 ; +0x96, 0x473286\nB               loc_47327C                                             ; +0x98, 0x473288\nPOP.W           {R3-R9,PC}                                             ; +0x9a, 0x47328a", "xrefs": ["LevelEditorLayer::duplicateKeyframeAnimation @ 0x371370", "EditorUI::pasteObjects @ 0x3a3798"], "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"}