{"type": "func", "start": 5370956640, "end": 5370956924, "name": "GJBaseGameLayer::groupStickyObjects", "pseudocode": "// \n// GJBaseGameLayer::groupStickyObjects from 0x140224b60 to 0x140224c7c (284 bytes)\n// \n// 3 xrefs:\n// > EditorUI::onGroupSticky @ 0x140112908\n// > GJBaseGameLayer::assignNewStickyGroups @ 0x140224e2b\n// > <???> @ 0x1406cd77c\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::groupStickyObjects(GJBaseGameLayer *a1, cocos2d::CCArray *a2)\n{\n  unsigned int v4; // eax\n  unsigned int v5; // ebp\n  cocos2d::CCArray *v6; // r15\n  unsigned int v7; // ebx\n  unsigned int v8; // esi\n  struct cocos2d::CCObject *v9; // rax\n  int m_unknown2; // eax\n  struct cocos2d::CCObject *v11; // rax\n\n  v4 = cocos2d::CCArray::count(a2);\n  v5 = 0;\n  v6 = cocos2d::CCArray::createWithCapacity(v4);\n  v7 = 0;\n  v8 = 0;\n  if ( cocos2d::CCArray::count(a2) )\n  {\n    do\n    {\n      v9 = cocos2d::CCArray::objectAtIndex(a2, v8);\n      if ( v7 )\n      {\n        m_unknown2 = v9[15].m_unknown2;\n        if ( m_unknown2 > 0 && m_unknown2 != v7 )\n        {\n          GJBaseGameLayer::ungroupStickyObjects(a1, a2);\n          goto LABEL_8;\n        }\n      }\n      else\n      {\n        v7 = v9[15].m_unknown2;\n      }\n      ++v8;\n    }\n    while ( v8 < cocos2d::CCArray::count(a2) );\n    if ( v7 )\n      goto LABEL_9;\n  }\nLABEL_8:\n  v7 = ++a1->m_lastUsedLinkedID;\nLABEL_9:\n  if ( cocos2d::CCArray::count(a2) )\n  {\n    do\n    {\n      v11 = cocos2d::CCArray::objectAtIndex(a2, v5);\n      if ( ((v11[18].m_eObjType - 747) & 0xFFFFFFFD) != 0 )\n      {\n        v11[15].m_unknown2 = v7;\n        cocos2d::CCArray::addObject(v6, v11);\n      }\n      ++v5;\n    }\n    while ( v5 < cocos2d::CCArray::count(a2) );\n  }\n  cocos2d::CCDictionary::setObject(a1->m_linkedGroupDict, v6, v7);\n}", "assembly": "; \n; GJBaseGameLayer::groupStickyObjects from 0x140224b60 to 0x140224c7c (284 bytes)\n; \n; 3 xrefs:\n; > EditorUI::onGroupSticky @ 0x140112908\n; > GJBaseGameLayer::assignNewStickyGroups @ 0x140224e2b\n; > <???> @ 0x1406cd77c\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140224b60\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x140224b65\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x140224b6a\npush    rdi                                                            ; +0xf, 0x140224b6f\npush    r14                                                            ; +0x10, 0x140224b70\npush    r15                                                            ; +0x12, 0x140224b72\nsub     rsp, 20h                                                       ; +0x14, 0x140224b74\nmov     r14, rcx                                                       ; +0x18, 0x140224b78\nmov     rdi, rdx                                                       ; +0x1b, 0x140224b7b\nmov     rcx, rdx                                                       ; +0x1e, 0x140224b7e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x21, 0x140224b81\nmov     ecx, eax                                                       ; +0x27, 0x140224b87\ncall    cs:?createWithCapacity@CCArray@cocos2d@@SAPEAV12@I@Z; cocos2d::CCArray::createWithCapacity(uint) ; +0x29, 0x140224b89\nxor     ebp, ebp                                                       ; +0x2f, 0x140224b8f\nmov     rcx, rdi                                                       ; +0x31, 0x140224b91\nmov     r15, rax                                                       ; +0x34, 0x140224b94\nmov     ebx, ebp                                                       ; +0x37, 0x140224b97\nmov     esi, ebp                                                       ; +0x39, 0x140224b99\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x3b, 0x140224b9b\ntest    eax, eax                                                       ; +0x41, 0x140224ba1\njz      short loc_140224BE1                                            ; +0x43, 0x140224ba3\nmov     edx, esi                                                       ; +0x45, 0x140224ba5\nmov     rcx, rdi                                                       ; +0x47, 0x140224ba7\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x4a, 0x140224baa\ntest    ebx, ebx                                                       ; +0x50, 0x140224bb0\njnz     short loc_140224BBC                                            ; +0x52, 0x140224bb2\nmov     ebx, [rax+370h]                                                ; +0x54, 0x140224bb4\njmp     short loc_140224BCE                                            ; +0x5a, 0x140224bba\nmov     eax, [rax+370h]                                                ; +0x5c, 0x140224bbc\ntest    eax, eax                                                       ; +0x62, 0x140224bc2\njle     short loc_140224BCE                                            ; +0x64, 0x140224bc4\ncmp     eax, ebx                                                       ; +0x66, 0x140224bc6\njnz     loc_140224C6C                                                  ; +0x68, 0x140224bc8\nmov     rcx, rdi                                                       ; +0x6e, 0x140224bce\ninc     esi                                                            ; +0x71, 0x140224bd1\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x73, 0x140224bd3\ncmp     esi, eax                                                       ; +0x79, 0x140224bd9\njb      short loc_140224BA5                                            ; +0x7b, 0x140224bdb\ntest    ebx, ebx                                                       ; +0x7d, 0x140224bdd\njnz     short loc_140224BEF                                            ; +0x7f, 0x140224bdf\ninc     dword ptr [r14+0FC8h]                                          ; +0x81, 0x140224be1\nmov     ebx, [r14+0FC8h]                                               ; +0x88, 0x140224be8\nmov     rcx, rdi                                                       ; +0x8f, 0x140224bef\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x92, 0x140224bf2\ntest    eax, eax                                                       ; +0x98, 0x140224bf8\njz      short loc_140224C40                                            ; +0x9a, 0x140224bfa\nnop     dword ptr [rax+00h]                                            ; +0x9c, 0x140224bfc\nmov     edx, ebp                                                       ; +0xa0, 0x140224c00\nmov     rcx, rdi                                                       ; +0xa2, 0x140224c02\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xa5, 0x140224c05\nmov     ecx, [rax+40Ch]                                                ; +0xab, 0x140224c0b\nsub     ecx, 2EBh                                                      ; +0xb1, 0x140224c11\ntest    ecx, 0FFFFFFFDh                                                ; +0xb7, 0x140224c17\njz      short loc_140224C31                                            ; +0xbd, 0x140224c1d\nmov     rdx, rax                                                       ; +0xbf, 0x140224c1f\nmov     [rax+370h], ebx                                                ; +0xc2, 0x140224c22\nmov     rcx, r15                                                       ; +0xc8, 0x140224c28\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0xcb, 0x140224c2b\nmov     rcx, rdi                                                       ; +0xd1, 0x140224c31\ninc     ebp                                                            ; +0xd4, 0x140224c34\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xd6, 0x140224c36\ncmp     ebp, eax                                                       ; +0xdc, 0x140224c3c\njb      short loc_140224C00                                            ; +0xde, 0x140224c3e\nmov     rcx, [r14+0FC0h]                                               ; +0xe0, 0x140224c40\nmov     rdx, r15                                                       ; +0xe7, 0x140224c47\nmov     r8d, ebx                                                       ; +0xea, 0x140224c4a\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xed, 0x140224c4d\nmov     rbp, [rsp+38h+arg_8]                                           ; +0xf2, 0x140224c52\nmov     rsi, [rsp+38h+arg_10]                                          ; +0xf7, 0x140224c57\nadd     rsp, 20h                                                       ; +0xfc, 0x140224c5c\npop     r15                                                            ; +0x100, 0x140224c60\npop     r14                                                            ; +0x102, 0x140224c62\npop     rdi                                                            ; +0x104, 0x140224c64\njmp     cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x105, 0x140224c65\nmov     rdx, rdi                                                       ; +0x10c, 0x140224c6c\nmov     rcx, r14                                                       ; +0x10f, 0x140224c6f\ncall    GJBaseGameLayer__ungroupStickyObjects                          ; +0x112, 0x140224c72\njmp     loc_140224BE1                                                  ; +0x117, 0x140224c77", "xrefs": ["EditorUI::onGroupSticky @ 0x140112908", "GJBaseGameLayer::assignNewStickyGroups @ 0x140224e2b", "<???> @ 0x1406cd77c"], "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"}