{"type": "func", "start": 4297009652, "end": 4297009844, "name": "GJBaseGameLayer::addToGroupParents", "pseudocode": "// \n// GJBaseGameLayer::addToGroupParents from 0x1001f29f4 to 0x1001f2ab4 (192 bytes)\n// \n// 1 xrefs:\n// > LevelEditorLayer::addSpecial @ 0x10035a07c\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::addToGroupParents(GJBaseGameLayer *a1, GameObject *a2)\n{\n  cocos2d::CCObject *v4; // x0\n  cocos2d::CCObject *v5; // x21\n  __int64 v6; // x22\n  int v7; // w23\n\n  if ( a2->m_hasGroupParentsString )\n  {\n    v4 = cocos2d::CCDictionary::objectForKey(a1->m_removedParentGroupIDs, (unsigned int)a2->m_uniqueID);\n    if ( v4 )\n    {\n      v5 = v4;\n      a2->m_hasGroupParentsString = 0;\n      if ( (unsigned int)sub_10024A36C(v4) )\n      {\n        v6 = 0;\n        do\n        {\n          v7 = *(_DWORD *)(sub_10024A388(v5, v6) + 56);\n          if ( !cocos2d::CCDictionary::objectForKey(a1->m_parentGroupsDict, v7) )\n            GJBaseGameLayer::setGroupParent(a1, a2, v7);\n          v6 = (unsigned int)(v6 + 1);\n        }\n        while ( (unsigned int)v6 < (unsigned int)sub_10024A36C(v5) );\n      }\n      cocos2d::CCDictionary::removeObjectForKey(a1->m_removedParentGroupIDs, (unsigned int)a2->m_uniqueID);\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::addToGroupParents from 0x1001f29f4 to 0x1001f2ab4 (192 bytes)\n; \n; 1 xrefs:\n; > LevelEditorLayer::addSpecial @ 0x10035a07c\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\nSTP             X24, X23, [SP,#-0x10+var_30]!                          ; +0x0, 0x1001f29f4\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1001f29f8\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1001f29fc\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1001f2a00\nADD             X29, SP, #0x30                                         ; +0x10, 0x1001f2a04\nLDRB            W8, [X1,#0x492]                                        ; +0x14, 0x1001f2a08\nCMP             W8, #1                                                 ; +0x18, 0x1001f2a0c\nB.NE            loc_1001F2AA0                                          ; +0x1c, 0x1001f2a10\nMOV             X19, X1                                                ; +0x20, 0x1001f2a14\nMOV             X20, X0                                                ; +0x24, 0x1001f2a18\nLDR             X0, [X0,#0xE80]                                        ; +0x28, 0x1001f2a1c\nLDR             W1, [X1,#0x394]                                        ; +0x2c, 0x1001f2a20\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x30, 0x1001f2a24\nCBZ             X0, loc_1001F2AA0                                      ; +0x34, 0x1001f2a28\nMOV             X21, X0                                                ; +0x38, 0x1001f2a2c\nSTRB            WZR, [X19,#0x492]                                      ; +0x3c, 0x1001f2a30\nBL              sub_10024A36C                                          ; +0x40, 0x1001f2a34\nCBZ             W0, loc_1001F2A84                                      ; +0x44, 0x1001f2a38\nMOV             W22, #0                                                ; +0x48, 0x1001f2a3c\nMOV             X0, X21                                                ; +0x4c, 0x1001f2a40\nMOV             X1, X22                                                ; +0x50, 0x1001f2a44\nBL              sub_10024A388                                          ; +0x54, 0x1001f2a48\nLDR             W23, [X0,#0x38]                                        ; +0x58, 0x1001f2a4c\nLDR             X0, [X20,#0xE70]                                       ; +0x5c, 0x1001f2a50\nSXTW            X1, W23                                                ; +0x60, 0x1001f2a54\nBL              cocos2d__CCDictionary__objectForKey                    ; +0x64, 0x1001f2a58\nCBNZ            X0, loc_1001F2A70                                      ; +0x68, 0x1001f2a5c\nMOV             X0, X20                                                ; +0x6c, 0x1001f2a60\nMOV             X1, X19                                                ; +0x70, 0x1001f2a64\nMOV             X2, X23                                                ; +0x74, 0x1001f2a68\nBL              GJBaseGameLayer__setGroupParent                        ; +0x78, 0x1001f2a6c\nADD             W22, W22, #1                                           ; +0x7c, 0x1001f2a70\nMOV             X0, X21                                                ; +0x80, 0x1001f2a74\nBL              sub_10024A36C                                          ; +0x84, 0x1001f2a78\nCMP             W22, W0                                                ; +0x88, 0x1001f2a7c\nB.CC            loc_1001F2A40                                          ; +0x8c, 0x1001f2a80\nLDR             X0, [X20,#0xE80]                                       ; +0x90, 0x1001f2a84\nLDR             W1, [X19,#0x394]                                       ; +0x94, 0x1001f2a88\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x98, 0x1001f2a8c\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x9c, 0x1001f2a90\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xa0, 0x1001f2a94\nLDP             X24, X23, [SP+0x30+var_30],#0x40                       ; +0xa4, 0x1001f2a98\nB               cocos2d__CCDictionary__removeObjectForKey              ; +0xa8, 0x1001f2a9c\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xac, 0x1001f2aa0\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xb0, 0x1001f2aa4\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xb4, 0x1001f2aa8\nLDP             X24, X23, [SP+0x30+var_30],#0x40                       ; +0xb8, 0x1001f2aac\nRET                                                                    ; +0xbc, 0x1001f2ab0", "xrefs": ["LevelEditorLayer::addSpecial @ 0x10035a07c"], "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"}