{"type": "func", "start": 5370957120, "end": 5370957396, "name": "GJBaseGameLayer::assignNewStickyGroups", "pseudocode": "// \n// GJBaseGameLayer::assignNewStickyGroups from 0x140224d40 to 0x140224e54 (276 bytes)\n// \n// 5 xrefs:\n// > EditorUI::pasteObjects @ 0x140114268\n// > LevelEditorLayer::duplicateKeyframeAnimation @ 0x1402e1a7a\n// > <???> @ 0x140680150\n// > <???> @ 0x140680188\n// > <???> @ 0x1406cd7ac\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  cocos2d::CCDictionary *v3; // rbx\n  unsigned int v4; // edi\n  __int64 v6; // rcx\n  struct cocos2d::CCObject *v7; // rbp\n  __int64 v8; // rcx\n  cocos2d::CCArray *v9; // rsi\n  cocos2d::CCDictElement *m_pElements; // rbx\n  cocos2d::CCDictElement *i; // rdi\n  cocos2d::CCArray *m_pObject; // rbx\n\n  if ( a2 )\n  {\n    v3 = nullptr;\n    v4 = 0;\n    if ( cocos2d::CCArray::count(a2) )\n    {\n      do\n      {\n        v7 = cocos2d::CCArray::objectAtIndex(a2, v4);\n        if ( v7[15].m_unknown2 > 0 )\n        {\n          if ( !v3 )\n            v3 = (cocos2d::CCDictionary *)cocos2d::CCDictionary::create(v6);\n          v9 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(v3, v7[15].m_unknown2);\n          if ( !v9 )\n          {\n            v9 = (cocos2d::CCArray *)cocos2d::CCArray::create(v8);\n            cocos2d::CCDictionary::setObject(v3, v9, v7[15].m_unknown2);\n          }\n          cocos2d::CCArray::addObject(v9, v7);\n        }\n        ++v4;\n      }\n      while ( v4 < cocos2d::CCArray::count(a2) );\n      if ( v3 )\n      {\n        m_pElements = v3->m_pElements;\n        if ( m_pElements )\n        {\n          for ( i = (cocos2d::CCDictElement *)m_pElements->hh.next; ; i = (cocos2d::CCDictElement *)i->hh.next )\n          {\n            m_pObject = (cocos2d::CCArray *)m_pElements->m_pObject;\n            GJBaseGameLayer::ungroupStickyObjects(a1, m_pObject);\n            GJBaseGameLayer::groupStickyObjects(a1, m_pObject);\n            m_pElements = i;\n            if ( !i )\n              break;\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::assignNewStickyGroups from 0x140224d40 to 0x140224e54 (276 bytes)\n; \n; 5 xrefs:\n; > EditorUI::pasteObjects @ 0x140114268\n; > LevelEditorLayer::duplicateKeyframeAnimation @ 0x1402e1a7a\n; > <???> @ 0x140680150\n; > <???> @ 0x140680188\n; > <???> @ 0x1406cd7ac\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\ntest    rdx, rdx                                                       ; +0x0, 0x140224d40\njz      locret_140224E53                                               ; +0x3, 0x140224d43\npush    r14                                                            ; +0x9, 0x140224d49\npush    r15                                                            ; +0xb, 0x140224d4b\nsub     rsp, 28h                                                       ; +0xd, 0x140224d4d\nmov     [rsp+38h+arg_0], rbx                                           ; +0x11, 0x140224d51\nmov     r15, rcx                                                       ; +0x16, 0x140224d56\nxor     ebx, ebx                                                       ; +0x19, 0x140224d59\nmov     [rsp+38h+var_18], rdi                                          ; +0x1b, 0x140224d5b\nmov     rcx, rdx                                                       ; +0x20, 0x140224d60\nmov     edi, ebx                                                       ; +0x23, 0x140224d63\nmov     r14, rdx                                                       ; +0x25, 0x140224d65\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x28, 0x140224d68\ntest    eax, eax                                                       ; +0x2e, 0x140224d6e\njz      loc_140224E41                                                  ; +0x30, 0x140224d70\nmov     [rsp+38h+arg_8], rbp                                           ; +0x36, 0x140224d76\nmov     [rsp+38h+arg_10], rsi                                          ; +0x3b, 0x140224d7b\nmov     edx, edi                                                       ; +0x40, 0x140224d80\nmov     rcx, r14                                                       ; +0x42, 0x140224d82\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x45, 0x140224d85\nmov     rbp, rax                                                       ; +0x4b, 0x140224d8b\ncmp     dword ptr [rax+370h], 0                                        ; +0x4e, 0x140224d8e\njle     short loc_140224DE5                                            ; +0x55, 0x140224d95\ntest    rbx, rbx                                                       ; +0x57, 0x140224d97\njnz     short loc_140224DA5                                            ; +0x5a, 0x140224d9a\ncall    cs:?create@CCDictionary@cocos2d@@SAPEAV12@XZ; cocos2d::CCDictionary::create(void) ; +0x5c, 0x140224d9c\nmov     rbx, rax                                                       ; +0x62, 0x140224da2\nmovsxd  rdx, dword ptr [rbp+370h]                                      ; +0x65, 0x140224da5\nmov     rcx, rbx                                                       ; +0x6c, 0x140224dac\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x6f, 0x140224daf\nmov     rsi, rax                                                       ; +0x75, 0x140224db5\ntest    rax, rax                                                       ; +0x78, 0x140224db8\njnz     short loc_140224DD9                                            ; +0x7b, 0x140224dbb\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x7d, 0x140224dbd\nmovsxd  r8, dword ptr [rbp+370h]                                       ; +0x83, 0x140224dc3\nmov     rcx, rbx                                                       ; +0x8a, 0x140224dca\nmov     rdx, rax                                                       ; +0x8d, 0x140224dcd\nmov     rsi, rax                                                       ; +0x90, 0x140224dd0\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x93, 0x140224dd3\nmov     rdx, rbp                                                       ; +0x99, 0x140224dd9\nmov     rcx, rsi                                                       ; +0x9c, 0x140224ddc\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x9f, 0x140224ddf\nmov     rcx, r14                                                       ; +0xa5, 0x140224de5\ninc     edi                                                            ; +0xa8, 0x140224de8\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xaa, 0x140224dea\ncmp     edi, eax                                                       ; +0xb0, 0x140224df0\njb      short loc_140224D80                                            ; +0xb2, 0x140224df2\nmov     rsi, [rsp+38h+arg_10]                                          ; +0xb4, 0x140224df4\nmov     rbp, [rsp+38h+arg_8]                                           ; +0xb9, 0x140224df9\ntest    rbx, rbx                                                       ; +0xbe, 0x140224dfe\njz      short loc_140224E41                                            ; +0xc1, 0x140224e01\nmov     rbx, [rbx+38h]                                                 ; +0xc3, 0x140224e03\ntest    rbx, rbx                                                       ; +0xc7, 0x140224e07\njz      short loc_140224E41                                            ; +0xca, 0x140224e0a\nmov     rdi, [rbx+120h]                                                ; +0xcc, 0x140224e0c\nmov     rbx, [rbx+108h]                                                ; +0xd3, 0x140224e13\nmov     rcx, r15                                                       ; +0xda, 0x140224e1a\nmov     rdx, rbx                                                       ; +0xdd, 0x140224e1d\ncall    GJBaseGameLayer__ungroupStickyObjects                          ; +0xe0, 0x140224e20\nmov     rdx, rbx                                                       ; +0xe5, 0x140224e25\nmov     rcx, r15                                                       ; +0xe8, 0x140224e28\ncall    GJBaseGameLayer__groupStickyObjects                            ; +0xeb, 0x140224e2b\nmov     rbx, rdi                                                       ; +0xf0, 0x140224e30\ntest    rdi, rdi                                                       ; +0xf3, 0x140224e33\njz      short loc_140224E41                                            ; +0xf6, 0x140224e36\nmov     rdi, [rdi+120h]                                                ; +0xf8, 0x140224e38\njmp     short loc_140224E13                                            ; +0xff, 0x140224e3f\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x101, 0x140224e41\nmov     rdi, [rsp+38h+var_18]                                          ; +0x106, 0x140224e46\nadd     rsp, 28h                                                       ; +0x10b, 0x140224e4b\npop     r15                                                            ; +0x10f, 0x140224e4f\npop     r14                                                            ; +0x111, 0x140224e51\nretn                                                                   ; +0x113, 0x140224e53", "xrefs": ["EditorUI::pasteObjects @ 0x140114268", "LevelEditorLayer::duplicateKeyframeAnimation @ 0x1402e1a7a", "<???> @ 0x140680150", "<???> @ 0x140680188", "<???> @ 0x1406cd7ac"], "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"}