{"type": "func", "start": 4665396, "end": 4665584, "name": "GJBaseGameLayer::sortStickyGroups", "pseudocode": "// \n// GJBaseGameLayer::sortStickyGroups from 0x473034 to 0x4730f0 (188 bytes)\n// \n// 2 xrefs:\n// > LevelEditorLayer::init @ 0x376c38\n// > GJBaseGameLayer::updateSpecialGroupData @ 0x4952e6\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::sortStickyGroups(GJBaseGameLayer *a1)\n{\n  unsigned int v2; // r6\n  cocos2d::CCDictionary *v3; // r5\n  cocos2d::CCObject *v4; // r0\n  intptr_t m_uID; // r1\n  cocos2d::CCObject *v6; // r8\n  cocos2d::CCArray *v7; // r7\n  cocos2d::CCDictElement *m_pElements; // r3\n  cocos2d::CCDictElement *next; // r5\n  cocos2d::CCDictElement *v10; // r2\n  cocos2d::CCArray *m_pObject; // r7\n  unsigned int v12; // r6\n  int v13; // r0\n\n  v2 = 0;\n  v3 = cocos2d::CCDictionary::create();\n  while ( v2 < cocos2d::CCArray::count(a1->m_objects) )\n  {\n    v4 = (cocos2d::CCObject *)cocos2d::CCArray::objectAtIndex(a1->m_objects, v2);\n    m_uID = v4[14].m_uID;\n    v6 = v4;\n    if ( m_uID > 0 )\n    {\n      v7 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v3, m_uID);\n      if ( !v7 )\n      {\n        v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(nullptr);\n        cocos2d::CCDictionary::setObject(v3, v7, v6[14].m_uID);\n      }\n      cocos2d::CCArray::addObject(v7, v6);\n    }\n    ++v2;\n  }\n  a1->m_lastUsedLinkedID = 0;\n  if ( v3 )\n  {\n    m_pElements = v3->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      v12 = 0;\n      ++a1->m_lastUsedLinkedID;\n      while ( v12 < cocos2d::CCArray::count(m_pObject) )\n      {\n        v13 = cocos2d::CCArray::objectAtIndex(m_pObject, v12++);\n        *(_DWORD *)(v13 + 732) = a1->m_lastUsedLinkedID;\n      }\n      cocos2d::CCDictionary::setObject(a1->m_linkedGroupDict, m_pObject, a1->m_lastUsedLinkedID);\n      if ( next )\n        v10 = (cocos2d::CCDictElement *)next->hh.next;\n      else\n        v10 = nullptr;\n      m_pElements = next;\n      next = v10;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::sortStickyGroups from 0x473034 to 0x4730f0 (188 bytes)\n; \n; 2 xrefs:\n; > LevelEditorLayer::init @ 0x376c38\n; > GJBaseGameLayer::updateSpecialGroupData @ 0x4952e6\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, 0x473034\nMOV             R4, R0                                                 ; +0x4, 0x473038\nBL              _ZN7cocos2d12CCDictionary6createEv; cocos2d::CCDictionary::create(void) ; +0x6, 0x47303a\nMOVS            R6, #0                                                 ; +0xa, 0x47303e\nMOV             R5, R0                                                 ; +0xc, 0x473040\nLDR.W           R0, [R4,#0x8C4]; this                                  ; +0xe, 0x473042\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x12, 0x473046\nCMP             R6, R0                                                 ; +0x16, 0x47304a\nBCS             loc_47308A                                             ; +0x18, 0x47304c\nMOV             R1, R6; unsigned int                                   ; +0x1a, 0x47304e\nLDR.W           R0, [R4,#0x8C4]; this                                  ; +0x1c, 0x473050\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x20, 0x473054\nLDR.W           R1, [R0,#0x2DC]; int                                   ; +0x24, 0x473058\nMOV             R8, R0                                                 ; +0x28, 0x47305c\nCMP             R1, #0                                                 ; +0x2a, 0x47305e\nBLE             loc_473086                                             ; +0x2c, 0x473060\nMOV             R0, R5; this                                           ; +0x2e, 0x473062\nBL              _ZN7cocos2d12CCDictionary12objectForKeyEi; cocos2d::CCDictionary::objectForKey(int) ; +0x30, 0x473064\nMOV             R7, R0                                                 ; +0x34, 0x473068\nCBNZ            R0, loc_47307E                                         ; +0x36, 0x47306a\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x38, 0x47306c\nLDR.W           R2, [R8,#0x2DC]; int                                   ; +0x3c, 0x473070\nMOV             R7, R0                                                 ; +0x40, 0x473074\nMOV             R0, R5; this                                           ; +0x42, 0x473076\nMOV             R1, R7; cocos2d::CCObject *                            ; +0x44, 0x473078\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0x46, 0x47307a\nMOV             R0, R7; this                                           ; +0x4a, 0x47307e\nMOV             R1, R8; cocos2d::CCObject *                            ; +0x4c, 0x473080\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x4e, 0x473082\nADDS            R6, #1                                                 ; +0x52, 0x473086\nB               loc_473042                                             ; +0x54, 0x473088\nMOVS            R3, #0                                                 ; +0x56, 0x47308a\nSTR.W           R3, [R4,#0x9E0]                                        ; +0x58, 0x47308c\nCBZ             R5, locret_4730EC                                      ; +0x5c, 0x473090\nLDR             R3, [R5,#0x34]                                         ; +0x5e, 0x473092\nCBZ             R3, loc_47309C                                         ; +0x60, 0x473094\nLDR.W           R5, [R3,#0x110]                                        ; +0x62, 0x473096\nB               loc_4730B8                                             ; +0x66, 0x47309a\nMOV             R5, R3                                                 ; +0x68, 0x47309c\nB               loc_4730B8                                             ; +0x6a, 0x47309e\nLDR.W           R0, [R4,#0x9DC]; this                                  ; +0x6c, 0x4730a0\nMOV             R1, R7; cocos2d::CCObject *                            ; +0x70, 0x4730a4\nLDR.W           R2, [R4,#0x9E0]; int                                   ; +0x72, 0x4730a6\nBL              _ZN7cocos2d12CCDictionary9setObjectEPNS_8CCObjectEi; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,int) ; +0x76, 0x4730aa\nCBZ             R5, loc_4730E8                                         ; +0x7a, 0x4730ae\nLDR.W           R2, [R5,#0x110]                                        ; +0x7c, 0x4730b0\nMOV             R3, R5                                                 ; +0x80, 0x4730b4\nMOV             R5, R2                                                 ; +0x82, 0x4730b6\nCBZ             R3, locret_4730EC                                      ; +0x84, 0x4730b8\nLDR.W           R7, [R3,#0x104]                                        ; +0x86, 0x4730ba\nMOVS            R6, #0                                                 ; +0x8a, 0x4730be\nLDR.W           R2, [R4,#0x9E0]                                        ; +0x8c, 0x4730c0\nADDS            R2, #1                                                 ; +0x90, 0x4730c4\nSTR.W           R2, [R4,#0x9E0]                                        ; +0x92, 0x4730c6\nMOV             R0, R7; this                                           ; +0x96, 0x4730ca\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x98, 0x4730cc\nCMP             R6, R0                                                 ; +0x9c, 0x4730d0\nBCS             loc_4730A0                                             ; +0x9e, 0x4730d2\nMOV             R1, R6; unsigned int                                   ; +0xa0, 0x4730d4\nMOV             R0, R7; this                                           ; +0xa2, 0x4730d6\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xa4, 0x4730d8\nLDR.W           R3, [R4,#0x9E0]                                        ; +0xa8, 0x4730dc\nADDS            R6, #1                                                 ; +0xac, 0x4730e0\nSTR.W           R3, [R0,#0x2DC]                                        ; +0xae, 0x4730e2\nB               loc_4730CA                                             ; +0xb2, 0x4730e6\nMOV             R2, R5                                                 ; +0xb4, 0x4730e8\nB               loc_4730B4                                             ; +0xb6, 0x4730ea\nPOP.W           {R4-R8,PC}                                             ; +0xb8, 0x4730ec", "xrefs": ["LevelEditorLayer::init @ 0x376c38", "GJBaseGameLayer::updateSpecialGroupData @ 0x4952e6"], "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"}