{"type": "func", "start": 5370955392, "end": 5370955664, "name": "GJBaseGameLayer::setGroupParent", "pseudocode": "// \n// GJBaseGameLayer::setGroupParent from 0x140224680 to 0x140224790 (272 bytes)\n// \n// 6 xrefs:\n// > GJBaseGameLayer::loadGroupParentsFromString @ 0x140224982\n// > LevelEditorLayer::addSpecial @ 0x1402d81c2\n// > SetGroupIDLayer::onAddGroupParent @ 0x1403fccdf\n// > <???> @ 0x140680054\n// > <???> @ 0x140680064\n// > <???> @ 0x1406cd704\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::setGroupParent(GJBaseGameLayer *a1, GameObject *a2, int a3)\n{\n  __int64 v3; // rsi\n  GameObject *v6; // rax\n  __int64 v7; // rcx\n  cocos2d::CCArray *v8; // rdi\n  unsigned int v9; // ebx\n  struct cocos2d::CCInteger *v10; // rax\n\n  if ( a3 > 0 )\n  {\n    v3 = a3;\n    if ( a2 )\n    {\n      v6 = (GameObject *)cocos2d::CCDictionary::objectForKey(a1->m_parentGroupsDict, a3);\n      if ( v6 != a2 && (!v6 || !a1->m_keepGroupParents) )\n      {\n        GJBaseGameLayer::removeGroupParent(a1, v3);\n        cocos2d::CCDictionary::setObject(a1->m_parentGroupsDict, a2, v3);\n        v8 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a1->m_parentGroupIDs, (unsigned int)a2->m_uniqueID);\n        if ( !v8 )\n        {\n          v8 = (cocos2d::CCArray *)cocos2d::CCArray::create(v7);\n          cocos2d::CCDictionary::setObject(a1->m_parentGroupIDs, v8, (unsigned int)a2->m_uniqueID);\n        }\n        v9 = 0;\n        if ( cocos2d::CCArray::count(v8) )\n        {\n          while ( LODWORD(cocos2d::CCArray::objectAtIndex(v8, v9)[1].__vftable) != (_DWORD)v3 )\n          {\n            if ( ++v9 >= cocos2d::CCArray::count(v8) )\n              goto LABEL_11;\n          }\n        }\n        else\n        {\nLABEL_11:\n          v10 = cocos2d::CCInteger::create(v3);\n          cocos2d::CCArray::addObject(v8, v10);\n        }\n        a2->m_hasGroupParentsString = 1;\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::setGroupParent from 0x140224680 to 0x140224790 (272 bytes)\n; \n; 6 xrefs:\n; > GJBaseGameLayer::loadGroupParentsFromString @ 0x140224982\n; > LevelEditorLayer::addSpecial @ 0x1402d81c2\n; > SetGroupIDLayer::onAddGroupParent @ 0x1403fccdf\n; > <???> @ 0x140680054\n; > <???> @ 0x140680064\n; > <???> @ 0x1406cd704\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    r8d, r8d                                                       ; +0x0, 0x140224680\njle     locret_14022478F                                               ; +0x3, 0x140224683\nmov     [rsp+arg_8], rbx                                               ; +0x9, 0x140224689\nmov     [rsp+arg_10], rbp                                              ; +0xe, 0x14022468e\npush    rsi                                                            ; +0x13, 0x140224693\nsub     rsp, 20h                                                       ; +0x14, 0x140224694\nmovsxd  rsi, r8d                                                       ; +0x18, 0x140224698\nmov     rbp, rdx                                                       ; +0x1b, 0x14022469b\nmov     rbx, rcx                                                       ; +0x1e, 0x14022469e\ntest    rdx, rdx                                                       ; +0x21, 0x1402246a1\njz      loc_140224780                                                  ; +0x24, 0x1402246a4\nmov     rcx, [rcx+0F60h]                                               ; +0x2a, 0x1402246aa\nmov     rdx, rsi                                                       ; +0x31, 0x1402246b1\nmov     [rsp+28h+arg_0], rdi                                           ; +0x34, 0x1402246b4\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x39, 0x1402246b9\ncmp     rax, rbp                                                       ; +0x3f, 0x1402246bf\njz      loc_14022477B                                                  ; +0x42, 0x1402246c2\ntest    rax, rax                                                       ; +0x48, 0x1402246c8\njz      short loc_1402246DA                                            ; +0x4b, 0x1402246cb\ncmp     byte ptr [rbx+3528h], 0                                        ; +0x4d, 0x1402246cd\njnz     loc_14022477B                                                  ; +0x54, 0x1402246d4\nmov     edx, esi                                                       ; +0x5a, 0x1402246da\nmov     rcx, rbx                                                       ; +0x5c, 0x1402246dc\ncall    GJBaseGameLayer__removeGroupParent                             ; +0x5f, 0x1402246df\nmov     rcx, [rbx+0F60h]                                               ; +0x64, 0x1402246e4\nmov     r8, rsi                                                        ; +0x6b, 0x1402246eb\nmov     rdx, rbp                                                       ; +0x6e, 0x1402246ee\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x71, 0x1402246f1\nmov     edx, [rbp+39Ch]                                                ; +0x77, 0x1402246f7\nmov     rcx, [rbx+0F68h]                                               ; +0x7d, 0x1402246fd\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x84, 0x140224704\nmov     rdi, rax                                                       ; +0x8a, 0x14022470a\ntest    rax, rax                                                       ; +0x8d, 0x14022470d\njnz     short loc_140224732                                            ; +0x90, 0x140224710\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x92, 0x140224712\nmov     r8d, [rbp+39Ch]                                                ; +0x98, 0x140224718\nmov     rdx, rax                                                       ; +0x9f, 0x14022471f\nmov     rcx, [rbx+0F68h]                                               ; +0xa2, 0x140224722\nmov     rdi, rax                                                       ; +0xa9, 0x140224729\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0xac, 0x14022472c\nmov     rcx, rdi                                                       ; +0xb2, 0x140224732\nxor     ebx, ebx                                                       ; +0xb5, 0x140224735\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xb7, 0x140224737\ntest    eax, eax                                                       ; +0xbd, 0x14022473d\njz      short loc_140224760                                            ; +0xbf, 0x14022473f\nmov     edx, ebx                                                       ; +0xc1, 0x140224741\nmov     rcx, rdi                                                       ; +0xc3, 0x140224743\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0xc6, 0x140224746\ncmp     [rax+38h], esi                                                 ; +0xcc, 0x14022474c\njz      short loc_140224774                                            ; +0xcf, 0x14022474f\nmov     rcx, rdi                                                       ; +0xd1, 0x140224751\ninc     ebx                                                            ; +0xd4, 0x140224754\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xd6, 0x140224756\ncmp     ebx, eax                                                       ; +0xdc, 0x14022475c\njb      short loc_140224741                                            ; +0xde, 0x14022475e\nmov     ecx, esi                                                       ; +0xe0, 0x140224760\ncall    cs:?create@CCInteger@cocos2d@@SAPEAV12@H@Z; cocos2d::CCInteger::create(int) ; +0xe2, 0x140224762\nmov     rdx, rax                                                       ; +0xe8, 0x140224768\nmov     rcx, rdi                                                       ; +0xeb, 0x14022476b\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0xee, 0x14022476e\nmov     byte ptr [rbp+49Ah], 1                                         ; +0xf4, 0x140224774\nmov     rdi, [rsp+28h+arg_0]                                           ; +0xfb, 0x14022477b\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x100, 0x140224780\nmov     rbp, [rsp+28h+arg_10]                                          ; +0x105, 0x140224785\nadd     rsp, 20h                                                       ; +0x10a, 0x14022478a\npop     rsi                                                            ; +0x10e, 0x14022478e\nretn                                                                   ; +0x10f, 0x14022478f", "xrefs": ["GJBaseGameLayer::loadGroupParentsFromString @ 0x140224982", "LevelEditorLayer::addSpecial @ 0x1402d81c2", "SetGroupIDLayer::onAddGroupParent @ 0x1403fccdf", "<???> @ 0x140680054", "<???> @ 0x140680064", "<???> @ 0x1406cd704"], "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"}