{"type": "func", "start": 4296267200, "end": 4296267399, "name": "GJBaseGameLayer::tryGetGroupParent", "pseudocode": "// \n// GJBaseGameLayer::tryGetGroupParent from 0x10013d5c0 to 0x10013d687 (199 bytes)\n// \n// 0 xrefs:\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\nGameObject *__fastcall GJBaseGameLayer::tryGetGroupParent(GJBaseGameLayer *a1, int a2)\n{\n  cocos2d::CCDictionary *m_parentGroupsDict; // rdi\n  GameObject *result; // rax\n  int v5; // eax\n  intptr_t v6; // r14\n  cocos2d::CCArray *v7; // r15\n  cocos2d::ccArray *data; // rax\n  GameObject **arr; // rcx\n  unsigned __int64 v10; // rdx\n\n  m_parentGroupsDict = a1->m_parentGroupsDict;\n  result = (GameObject *)cocos2d::CCDictionary::objectForKey(m_parentGroupsDict, a2);\n  if ( !result )\n  {\n    v5 = 9999;\n    if ( a2 < 9999 )\n      v5 = a2;\n    v6 = 0;\n    if ( v5 > 0 )\n      v6 = (unsigned int)v5;\n    v7 = a1->m_groups.__begin_[v6];\n    if ( v7\n      || (v7 = (cocos2d::CCArray *)sub_10071F9E0(m_parentGroupsDict, a2),\n          cocos2d::CCDictionary::setObject(a1->m_groupDict, v7, v6),\n          (a1->m_groups.__begin_[v6] = v7) != nullptr) )\n    {\n      data = v7->data;\n      if ( data->num )\n      {\n        arr = (GameObject **)data->arr;\n        v10 = (unsigned __int64)&arr[data->num - 1];\n        do\n        {\n          result = *arr;\n          if ( !*arr )\n            break;\n          if ( result->m_hasGroupParent )\n            return result;\n          ++arr;\n        }\n        while ( (unsigned __int64)arr <= v10 );\n      }\n    }\n    return nullptr;\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::tryGetGroupParent from 0x10013d5c0 to 0x10013d687 (199 bytes)\n; \n; 0 xrefs:\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, 0x10013d5c0\nmov     rbp, rsp                                                       ; +0x1, 0x10013d5c1\npush    r15                                                            ; +0x4, 0x10013d5c4\npush    r14                                                            ; +0x6, 0x10013d5c6\npush    rbx                                                            ; +0x8, 0x10013d5c8\npush    rax                                                            ; +0x9, 0x10013d5c9\nmov     r14d, esi                                                      ; +0xa, 0x10013d5ca\nmov     rbx, rdi                                                       ; +0xd, 0x10013d5cd\nmov     rdi, [rdi+0E48h]                                               ; +0x10, 0x10013d5d0\nmovsxd  rsi, esi                                                       ; +0x17, 0x10013d5d7\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x1a, 0x10013d5da\ntest    rax, rax                                                       ; +0x1f, 0x10013d5df\njnz     loc_10013D67C                                                  ; +0x22, 0x10013d5e2\ncmp     r14d, 270Fh                                                    ; +0x28, 0x10013d5e8\nmov     eax, 270Fh                                                     ; +0x2f, 0x10013d5ef\ncmovl   eax, r14d                                                      ; +0x34, 0x10013d5f4\nxor     r14d, r14d                                                     ; +0x38, 0x10013d5f8\ntest    eax, eax                                                       ; +0x3b, 0x10013d5fb\ncmovg   r14d, eax                                                      ; +0x3d, 0x10013d5fd\nmov     rax, [rbx+0E00h]                                               ; +0x41, 0x10013d601\nmov     r15, [rax+r14*8]                                               ; +0x48, 0x10013d608\ntest    r15, r15                                                       ; +0x4c, 0x10013d60c\njnz     short loc_10013D63B                                            ; +0x4f, 0x10013d60f\ncall    sub_10071F9E0                                                  ; +0x51, 0x10013d611\nmov     r15, rax                                                       ; +0x56, 0x10013d616\nmov     rdi, [rbx+0DE8h]                                               ; +0x59, 0x10013d619\nmov     rsi, rax                                                       ; +0x60, 0x10013d620\nmov     rdx, r14                                                       ; +0x63, 0x10013d623\ncall    cocos2d__CCDictionary__setObject                               ; +0x66, 0x10013d626\nmov     rax, [rbx+0E00h]                                               ; +0x6b, 0x10013d62b\nmov     [rax+r14*8], r15                                               ; +0x72, 0x10013d632\ntest    r15, r15                                                       ; +0x76, 0x10013d636\njz      short loc_10013D67A                                            ; +0x79, 0x10013d639\nmov     rax, [r15+38h]                                                 ; +0x7b, 0x10013d63b\nmov     edx, [rax]                                                     ; +0x7f, 0x10013d63f\ntest    rdx, rdx                                                       ; +0x81, 0x10013d641\njz      short loc_10013D67A                                            ; +0x84, 0x10013d644\nmov     rcx, [rax+10h]                                                 ; +0x86, 0x10013d646\nlea     rdx, [rcx+rdx*8]                                               ; +0x8a, 0x10013d64a\nadd     rdx, 0FFFFFFFFFFFFFFF8h                                        ; +0x8e, 0x10013d64e\nnop     word ptr [rax+rax+00000000h]                                   ; +0x92, 0x10013d652\nmov     rax, [rcx]                                                     ; +0xa0, 0x10013d660\ntest    rax, rax                                                       ; +0xa3, 0x10013d663\njz      short loc_10013D67A                                            ; +0xa6, 0x10013d666\ncmp     byte ptr [rax+47Eh], 1                                         ; +0xa8, 0x10013d668\njz      short loc_10013D67C                                            ; +0xaf, 0x10013d66f\nadd     rcx, 8                                                         ; +0xb1, 0x10013d671\ncmp     rcx, rdx                                                       ; +0xb5, 0x10013d675\njbe     short loc_10013D660                                            ; +0xb8, 0x10013d678\nxor     eax, eax                                                       ; +0xba, 0x10013d67a\nadd     rsp, 8                                                         ; +0xbc, 0x10013d67c\npop     rbx                                                            ; +0xc0, 0x10013d680\npop     r14                                                            ; +0xc1, 0x10013d681\npop     r15                                                            ; +0xc3, 0x10013d683\npop     rbp                                                            ; +0xc5, 0x10013d685\nretn                                                                   ; +0xc6, 0x10013d686", "xrefs": [], "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"}