{"type": "func", "start": 4296267408, "end": 4296267725, "name": "GJBaseGameLayer::setGroupParent", "pseudocode": "// \n// GJBaseGameLayer::setGroupParent from 0x10013d690 to 0x10013d7cd (317 bytes)\n// \n// 3 xrefs:\n// > GJBaseGameLayer::addToGroupParents @ 0x10013d92c\n// > GJBaseGameLayer::loadGroupParentsFromString @ 0x10013de02\n// > SetGroupIDLayer::onAddGroupParent @ 0x10031535a\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  intptr_t v6; // r15\n  GameObject *v7; // rax\n  cocos2d::CCDictionary *m_parentGroupIDs; // rdi\n  intptr_t m_uniqueID; // rsi\n  cocos2d::CCObject *v10; // rax\n  cocos2d::CCObject *v11; // r15\n  unsigned int v12; // r12d\n  cocos2d::CCObject *v13; // r12\n\n  if ( a3 > 0 && a2 != nullptr )\n  {\n    v6 = (unsigned int)a3;\n    v7 = (GameObject *)cocos2d::CCDictionary::objectForKey(a1->m_parentGroupsDict, (unsigned int)a3);\n    if ( v7 != a2 && (!v7 || !a1->m_keepGroupParents) )\n    {\n      GJBaseGameLayer::removeGroupParent(a1, a3);\n      cocos2d::CCDictionary::setObject(a1->m_parentGroupsDict, a2, v6);\n      m_parentGroupIDs = a1->m_parentGroupIDs;\n      m_uniqueID = (unsigned int)a2->m_uniqueID;\n      v10 = cocos2d::CCDictionary::objectForKey(m_parentGroupIDs, m_uniqueID);\n      v11 = v10;\n      if ( v10 )\n      {\n        if ( !(unsigned int)sub_100720070(v10) )\n          goto LABEL_12;\n      }\n      else\n      {\n        v11 = (cocos2d::CCObject *)sub_10071F9E0(m_parentGroupIDs, m_uniqueID);\n        cocos2d::CCDictionary::setObject(a1->m_parentGroupIDs, v11, (unsigned int)a2->m_uniqueID);\n        if ( !(unsigned int)sub_100720070(v11) )\n        {\nLABEL_12:\n          v13 = (cocos2d::CCObject *)operator new(0x40u);\n          cocos2d::CCObject::CCObject(v13);\n          v13->__vftable = (cocos2d::CCObject_vtbl *)off_1008B8348;\n          LODWORD(v13[1].__vftable) = a3;\n          cocos2d::CCObject::autorelease(v13);\n          sub_10071FCD0(v11, v13);\nLABEL_13:\n          a2->m_hasGroupParentsString = 1;\n          return;\n        }\n      }\n      v12 = 0;\n      while ( *(_DWORD *)(sub_1007200C0(v11, v12) + 56) != a3 )\n      {\n        if ( ++v12 >= (unsigned int)sub_100720070(v11) )\n          goto LABEL_12;\n      }\n      goto LABEL_13;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::setGroupParent from 0x10013d690 to 0x10013d7cd (317 bytes)\n; \n; 3 xrefs:\n; > GJBaseGameLayer::addToGroupParents @ 0x10013d92c\n; > GJBaseGameLayer::loadGroupParentsFromString @ 0x10013de02\n; > SetGroupIDLayer::onAddGroupParent @ 0x10031535a\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\npush    rbp                                                            ; +0x0, 0x10013d690\nmov     rbp, rsp                                                       ; +0x1, 0x10013d691\npush    r15                                                            ; +0x4, 0x10013d694\npush    r14                                                            ; +0x6, 0x10013d696\npush    r12                                                            ; +0x8, 0x10013d698\npush    rbx                                                            ; +0xa, 0x10013d69a\ntest    edx, edx                                                       ; +0xb, 0x10013d69b\nsetle   al                                                             ; +0xd, 0x10013d69d\ntest    rsi, rsi                                                       ; +0x10, 0x10013d6a0\nsetz    cl                                                             ; +0x13, 0x10013d6a3\nor      cl, al                                                         ; +0x16, 0x10013d6a6\njnz     loc_10013D7C4                                                  ; +0x18, 0x10013d6a8\nmov     r14d, edx                                                      ; +0x1e, 0x10013d6ae\nmov     rbx, rsi                                                       ; +0x21, 0x10013d6b1\nmov     r12, rdi                                                       ; +0x24, 0x10013d6b4\nmov     rdi, [rdi+0E48h]                                               ; +0x27, 0x10013d6b7\nmov     r15d, edx                                                      ; +0x2e, 0x10013d6be\nmov     rsi, r15                                                       ; +0x31, 0x10013d6c1\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x34, 0x10013d6c4\ncmp     rax, rbx                                                       ; +0x39, 0x10013d6c9\njz      loc_10013D7C4                                                  ; +0x3c, 0x10013d6cc\ntest    rax, rax                                                       ; +0x42, 0x10013d6d2\njz      short loc_10013D6E6                                            ; +0x45, 0x10013d6d5\ncmp     byte ptr [r12+3318h], 0                                        ; +0x47, 0x10013d6d7\njnz     loc_10013D7C4                                                  ; +0x50, 0x10013d6e0\nmov     rdi, r12                                                       ; +0x56, 0x10013d6e6\nmov     esi, r14d                                                      ; +0x59, 0x10013d6e9\ncall    GJBaseGameLayer__removeGroupParent                             ; +0x5c, 0x10013d6ec\nmov     rdi, [r12+0E48h]                                               ; +0x61, 0x10013d6f1\nmov     rsi, rbx                                                       ; +0x69, 0x10013d6f9\nmov     rdx, r15                                                       ; +0x6c, 0x10013d6fc\ncall    cocos2d__CCDictionary__setObject                               ; +0x6f, 0x10013d6ff\nmov     rdi, [r12+0E50h]                                               ; +0x74, 0x10013d704\nmov     esi, [rbx+394h]                                                ; +0x7c, 0x10013d70c\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x82, 0x10013d712\nmov     r15, rax                                                       ; +0x87, 0x10013d717\ntest    rax, rax                                                       ; +0x8a, 0x10013d71a\njz      short loc_10013D72D                                            ; +0x8d, 0x10013d71d\nmov     rdi, r15                                                       ; +0x8f, 0x10013d71f\ncall    sub_100720070                                                  ; +0x92, 0x10013d722\ntest    eax, eax                                                       ; +0x97, 0x10013d727\njnz     short loc_10013D757                                            ; +0x99, 0x10013d729\njmp     short loc_10013D781                                            ; +0x9b, 0x10013d72b\ncall    sub_10071F9E0                                                  ; +0x9d, 0x10013d72d\nmov     r15, rax                                                       ; +0xa2, 0x10013d732\nmov     rdi, [r12+0E50h]                                               ; +0xa5, 0x10013d735\nmov     edx, [rbx+394h]                                                ; +0xad, 0x10013d73d\nmov     rsi, rax                                                       ; +0xb3, 0x10013d743\ncall    cocos2d__CCDictionary__setObject                               ; +0xb6, 0x10013d746\nmov     rdi, r15                                                       ; +0xbb, 0x10013d74b\ncall    sub_100720070                                                  ; +0xbe, 0x10013d74e\ntest    eax, eax                                                       ; +0xc3, 0x10013d753\njz      short loc_10013D781                                            ; +0xc5, 0x10013d755\nxor     r12d, r12d                                                     ; +0xc7, 0x10013d757\nnop     word ptr [rax+rax+00h]                                         ; +0xca, 0x10013d75a\nmov     rdi, r15                                                       ; +0xd0, 0x10013d760\nmov     esi, r12d                                                      ; +0xd3, 0x10013d763\ncall    sub_1007200C0                                                  ; +0xd6, 0x10013d766\ncmp     [rax+38h], r14d                                                ; +0xdb, 0x10013d76b\njz      short loc_10013D7BD                                            ; +0xdf, 0x10013d76f\ninc     r12d                                                           ; +0xe1, 0x10013d771\nmov     rdi, r15                                                       ; +0xe4, 0x10013d774\ncall    sub_100720070                                                  ; +0xe7, 0x10013d777\ncmp     r12d, eax                                                      ; +0xec, 0x10013d77c\njb      short loc_10013D760                                            ; +0xef, 0x10013d77f\nmov     edi, 40h ; '@'; __sz                                           ; +0xf1, 0x10013d781\ncall    __Znwm; operator new(ulong)                                    ; +0xf6, 0x10013d786\nmov     r12, rax                                                       ; +0xfb, 0x10013d78b\nmov     rdi, rax                                                       ; +0xfe, 0x10013d78e\ncall    cocos2d__CCObject__CCObject                                    ; +0x101, 0x10013d791\nlea     rax, _ZTVN7cocos2d9CCIntegerE; `vtable for'cocos2d::CCInteger  ; +0x106, 0x10013d796\nadd     rax, 10h                                                       ; +0x10d, 0x10013d79d\nmov     [r12], rax                                                     ; +0x111, 0x10013d7a1\nmov     [r12+38h], r14d                                                ; +0x115, 0x10013d7a5\nmov     rdi, r12                                                       ; +0x11a, 0x10013d7aa\ncall    cocos2d__CCObject__autorelease                                 ; +0x11d, 0x10013d7ad\nmov     rdi, r15                                                       ; +0x122, 0x10013d7b2\nmov     rsi, r12                                                       ; +0x125, 0x10013d7b5\ncall    sub_10071FCD0                                                  ; +0x128, 0x10013d7b8\nmov     byte ptr [rbx+492h], 1                                         ; +0x12d, 0x10013d7bd\npop     rbx                                                            ; +0x134, 0x10013d7c4\npop     r12                                                            ; +0x135, 0x10013d7c5\npop     r14                                                            ; +0x137, 0x10013d7c7\npop     r15                                                            ; +0x139, 0x10013d7c9\npop     rbp                                                            ; +0x13b, 0x10013d7cb\nretn                                                                   ; +0x13c, 0x10013d7cc", "xrefs": ["GJBaseGameLayer::addToGroupParents @ 0x10013d92c", "GJBaseGameLayer::loadGroupParentsFromString @ 0x10013de02", "SetGroupIDLayer::onAddGroupParent @ 0x10031535a"], "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"}