{"type": "func", "start": 4297009228, "end": 4297009484, "name": "GJBaseGameLayer::setGroupParent", "pseudocode": "// \n// GJBaseGameLayer::setGroupParent from 0x1001f284c to 0x1001f294c (256 bytes)\n// \n// 3 xrefs:\n// > SetGroupIDLayer::onAddGroupParent @ 0x10003d548\n// > GJBaseGameLayer::addToGroupParents @ 0x1001f2a6c\n// > GJBaseGameLayer::loadGroupParentsFromString @ 0x1001f2d04\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 __fastcall GJBaseGameLayer::setGroupParent(GJBaseGameLayer *a1, GameObject *a2, int a3)\n{\n  GameObject *v6; // x0\n  cocos2d::CCObject *v7; // x22\n  __int64 v8; // x21\n  cocos2d::CCObject *v9; // x0\n\n  if ( a2 )\n  {\n    if ( a3 >= 1 )\n    {\n      v6 = (GameObject *)cocos2d::CCDictionary::objectForKey(a1->m_parentGroupsDict, (unsigned int)a3);\n      if ( v6 != a2 && (!v6 || !a1->m_keepGroupParents) )\n      {\n        GJBaseGameLayer::removeGroupParent(a1, a3);\n        cocos2d::CCDictionary::setObject(a1->m_parentGroupsDict, a2, (unsigned int)a3);\n        v7 = cocos2d::CCDictionary::objectForKey(a1->m_parentGroupIDs, (unsigned int)a2->m_uniqueID);\n        if ( !v7 )\n        {\n          v7 = (cocos2d::CCObject *)sub_10024A15C(0);\n          cocos2d::CCDictionary::setObject(a1->m_parentGroupIDs, v7, (unsigned int)a2->m_uniqueID);\n        }\n        if ( (unsigned int)sub_10024A36C(v7) )\n        {\n          v8 = 0;\n          while ( *(_DWORD *)(sub_10024A388(v7, v8) + 56) != a3 )\n          {\n            v8 = (unsigned int)(v8 + 1);\n            if ( (unsigned int)v8 >= (unsigned int)sub_10024A36C(v7) )\n              goto LABEL_12;\n          }\n        }\n        else\n        {\nLABEL_12:\n          v9 = sub_10011C030(a3);\n          sub_10024A2D0(v7, v9);\n        }\n        a2->m_hasGroupParentsString = 1;\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::setGroupParent from 0x1001f284c to 0x1001f294c (256 bytes)\n; \n; 3 xrefs:\n; > SetGroupIDLayer::onAddGroupParent @ 0x10003d548\n; > GJBaseGameLayer::addToGroupParents @ 0x1001f2a6c\n; > GJBaseGameLayer::loadGroupParentsFromString @ 0x1001f2d04\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\nCBZ             X1, locret_1001F2948                                   ; +0x0, 0x1001f284c\nSTP             X22, X21, [SP,#-0x10+var_20]!                          ; +0x4, 0x1001f2850\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x8, 0x1001f2854\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0xc, 0x1001f2858\nADD             X29, SP, #0x20                                         ; +0x10, 0x1001f285c\nMOV             X20, X2                                                ; +0x14, 0x1001f2860\nCMP             W2, #1                                                 ; +0x18, 0x1001f2864\nB.LT            loc_1001F293C                                          ; +0x1c, 0x1001f2868\nMOV             X19, X1                                                ; +0x20, 0x1001f286c\nMOV             X21, X0                                                ; +0x24, 0x1001f2870\nLDR             X0, [X0,#0xE70]                                        ; +0x28, 0x1001f2874\nMOV             W22, W20                                               ; +0x2c, 0x1001f2878\nMOV             X1, X22                                                ; +0x30, 0x1001f287c\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x34, 0x1001f2880\nCMP             X0, X19                                                ; +0x38, 0x1001f2884\nB.EQ            loc_1001F293C                                          ; +0x3c, 0x1001f2888\nCBZ             X0, loc_1001F289C                                      ; +0x40, 0x1001f288c\nMOV             W8, #0x3348                                            ; +0x44, 0x1001f2890\nLDRB            W8, [X21,X8]                                           ; +0x48, 0x1001f2894\nTBNZ            W8, #0, loc_1001F293C                                  ; +0x4c, 0x1001f2898\nMOV             X0, X21                                                ; +0x50, 0x1001f289c\nMOV             X1, X20                                                ; +0x54, 0x1001f28a0\nBL              GJBaseGameLayer__removeGroupParent                     ; +0x58, 0x1001f28a4\nLDR             X0, [X21,#0xE70]                                       ; +0x5c, 0x1001f28a8\nMOV             X1, X19                                                ; +0x60, 0x1001f28ac\nMOV             X2, X22                                                ; +0x64, 0x1001f28b0\nBL              cocos2d__CCDictionary__setObject                       ; +0x68, 0x1001f28b4\nLDR             X0, [X21,#0xE78]                                       ; +0x6c, 0x1001f28b8\nLDR             W1, [X19,#0x394]                                       ; +0x70, 0x1001f28bc\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x74, 0x1001f28c0\nMOV             X22, X0                                                ; +0x78, 0x1001f28c4\nCBNZ            X0, loc_1001F28E4                                      ; +0x7c, 0x1001f28c8\nBL              sub_10024A15C                                          ; +0x80, 0x1001f28cc\nMOV             X22, X0                                                ; +0x84, 0x1001f28d0\nLDR             X0, [X21,#0xE78]                                       ; +0x88, 0x1001f28d4\nLDR             W2, [X19,#0x394]                                       ; +0x8c, 0x1001f28d8\nMOV             X1, X22                                                ; +0x90, 0x1001f28dc\nBL              cocos2d__CCDictionary__setObject                       ; +0x94, 0x1001f28e0\nMOV             X0, X22                                                ; +0x98, 0x1001f28e4\nBL              sub_10024A36C                                          ; +0x9c, 0x1001f28e8\nCBZ             W0, loc_1001F2920                                      ; +0xa0, 0x1001f28ec\nMOV             W21, #0                                                ; +0xa4, 0x1001f28f0\nMOV             X0, X22                                                ; +0xa8, 0x1001f28f4\nMOV             X1, X21                                                ; +0xac, 0x1001f28f8\nBL              sub_10024A388                                          ; +0xb0, 0x1001f28fc\nLDR             W8, [X0,#0x38]                                         ; +0xb4, 0x1001f2900\nCMP             W8, W20                                                ; +0xb8, 0x1001f2904\nB.EQ            loc_1001F2934                                          ; +0xbc, 0x1001f2908\nADD             W21, W21, #1                                           ; +0xc0, 0x1001f290c\nMOV             X0, X22                                                ; +0xc4, 0x1001f2910\nBL              sub_10024A36C                                          ; +0xc8, 0x1001f2914\nCMP             W21, W0                                                ; +0xcc, 0x1001f2918\nB.CC            loc_1001F28F4                                          ; +0xd0, 0x1001f291c\nMOV             X0, X20                                                ; +0xd4, 0x1001f2920\nBL              sub_10011C030                                          ; +0xd8, 0x1001f2924\nMOV             X1, X0                                                 ; +0xdc, 0x1001f2928\nMOV             X0, X22                                                ; +0xe0, 0x1001f292c\nBL              sub_10024A2D0                                          ; +0xe4, 0x1001f2930\nMOV             W8, #1                                                 ; +0xe8, 0x1001f2934\nSTRB            W8, [X19,#0x492]                                       ; +0xec, 0x1001f2938\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xf0, 0x1001f293c\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xf4, 0x1001f2940\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xf8, 0x1001f2944\nRET                                                                    ; +0xfc, 0x1001f2948", "xrefs": ["SetGroupIDLayer::onAddGroupParent @ 0x10003d548", "GJBaseGameLayer::addToGroupParents @ 0x1001f2a6c", "GJBaseGameLayer::loadGroupParentsFromString @ 0x1001f2d04"], "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"}