{"type": "func", "start": 4296136992, "end": 4296137474, "name": "GJBaseGameLayer::refreshKeyframeAnims", "pseudocode": "// \n// GJBaseGameLayer::refreshKeyframeAnims from 0x10011d920 to 0x10011db02 (482 bytes)\n// \n// 2 xrefs:\n// > LevelEditorLayer::init @ 0x1000dc0f3\n// > GJBaseGameLayer::updateSpecialGroupData @ 0x100117401\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::refreshKeyframeAnims(GJBaseGameLayer *a1)\n{\n  cocos2d::CCArray *m_objects; // rax\n  cocos2d::ccArray *data; // rax\n  cocos2d::CCObject **arr; // r12\n  unsigned __int64 v4; // r13\n  cocos2d::CCObject *v5; // r15\n  intptr_t m_uID; // rsi\n  cocos2d::CCObject *v7; // rax\n  cocos2d::CCObject *v8; // r14\n  cocos2d::CCArray *v9; // r15\n  unsigned int v10; // r12d\n  __int64 v11; // rax\n  cocos2d::CCObject *v12; // r13\n  unsigned int v13; // r14d\n  __int64 v14; // rax\n  cocos2d::CCDictionary *v15; // [rsp+0h] [rbp-30h]\n\n  cocos2d::CCDictionary::removeAllObjects(a1->m_keyframeGroups);\n  a1->m_keyframeGroup = 0;\n  v15 = cocos2d::CCDictionary::create();\n  m_objects = a1->m_objects;\n  if ( m_objects )\n  {\n    data = m_objects->data;\n    if ( data->num )\n    {\n      arr = data->arr;\n      v4 = (unsigned __int64)&arr[data->num - 1];\n      do\n      {\n        v5 = *arr;\n        if ( !*arr )\n          break;\n        if ( v5[18].m_uReference == 3032 )\n        {\n          m_uID = (int)v5[33].m_uID;\n          v7 = cocos2d::CCDictionary::objectForKey(v15, m_uID);\n          if ( !v7 )\n          {\n            v8 = (cocos2d::CCObject *)sub_10071F9E0(v15, m_uID);\n            ((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v8->setTag)(v8, v5[33].m_uID);\n            cocos2d::CCDictionary::setObject(v15, v8, (int)v5[33].m_uID);\n            v7 = v8;\n          }\n          sub_10071FCD0(v7, v5);\n        }\n        ++arr;\n      }\n      while ( (unsigned __int64)arr <= v4 );\n    }\n  }\n  v9 = cocos2d::CCDictionary::allKeys(v15);\n  qsort(v9->data->arr, v9->data->num, 8u, (int (__cdecl *)(const void *, const void *))sub_10010DEB0);\n  if ( (unsigned int)sub_100720070(v9) )\n  {\n    v10 = 0;\n    do\n    {\n      v11 = sub_1007200C0(v9, v10);\n      v12 = cocos2d::CCDictionary::objectForKey(v15, *(int *)(v11 + 56));\n      qsort(\n        v12[1].~CCObject_0,\n        (size_t)v12[1].copyWithZone,\n        8u,\n        (int (__cdecl *)(const void *, const void *))sub_10010DE90);\n      ((void (__fastcall *)(cocos2d::CCObject *, _QWORD))v12->setTag)(v12, (unsigned int)a1->m_keyframeGroup);\n      cocos2d::CCDictionary::setObject(a1->m_keyframeGroups, v12, a1->m_keyframeGroup);\n      if ( (unsigned int)sub_100720070(v12) )\n      {\n        v13 = 0;\n        do\n        {\n          v14 = sub_1007200C0(v12, v13);\n          *(_DWORD *)(v14 + 1856) = a1->m_keyframeGroup;\n          *(_DWORD *)(v14 + 1860) = v13++;\n        }\n        while ( v13 < (unsigned int)sub_100720070(v12) );\n      }\n      ++a1->m_keyframeGroup;\n      ++v10;\n    }\n    while ( v10 < (unsigned int)sub_100720070(v9) );\n  }\n}", "assembly": "; \n; GJBaseGameLayer::refreshKeyframeAnims from 0x10011d920 to 0x10011db02 (482 bytes)\n; \n; 2 xrefs:\n; > LevelEditorLayer::init @ 0x1000dc0f3\n; > GJBaseGameLayer::updateSpecialGroupData @ 0x100117401\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, 0x10011d920\nmov     rbp, rsp                                                       ; +0x1, 0x10011d921\npush    r15                                                            ; +0x4, 0x10011d924\npush    r14                                                            ; +0x6, 0x10011d926\npush    r13                                                            ; +0x8, 0x10011d928\npush    r12                                                            ; +0xa, 0x10011d92a\npush    rbx                                                            ; +0xc, 0x10011d92c\npush    rax                                                            ; +0xd, 0x10011d92d\nmov     rbx, rdi                                                       ; +0xe, 0x10011d92e\nmov     rdi, [rdi+3320h]                                               ; +0x11, 0x10011d931\ncall    cocos2d__CCDictionary__removeAllObjects                        ; +0x18, 0x10011d938\nmov     dword ptr [rbx+3328h], 0                                       ; +0x1d, 0x10011d93d\ncall    cocos2d__CCDictionary__create                                  ; +0x27, 0x10011d947\nmov     [rbp+var_30], rax                                              ; +0x2c, 0x10011d94c\nmov     rax, [rbx+0CB8h]                                               ; +0x30, 0x10011d950\ntest    rax, rax                                                       ; +0x37, 0x10011d957\njz      loc_10011D9EF                                                  ; +0x3a, 0x10011d95a\nmov     rax, [rax+38h]                                                 ; +0x40, 0x10011d960\nmov     ecx, [rax]                                                     ; +0x44, 0x10011d964\ntest    rcx, rcx                                                       ; +0x46, 0x10011d966\njz      loc_10011D9EF                                                  ; +0x49, 0x10011d969\nmov     r12, [rax+10h]                                                 ; +0x4f, 0x10011d96f\nlea     r13, [r12+rcx*8]                                               ; +0x53, 0x10011d973\nadd     r13, 0FFFFFFFFFFFFFFF8h                                        ; +0x57, 0x10011d977\njmp     short loc_10011D994                                            ; +0x5b, 0x10011d97b\nalign 20h                                                              ; +0x5d, 0x10011d97d\nmov     rdi, rax                                                       ; +0x60, 0x10011d980\nmov     rsi, r15                                                       ; +0x63, 0x10011d983\ncall    sub_10071FCD0                                                  ; +0x66, 0x10011d986\nadd     r12, 8                                                         ; +0x6b, 0x10011d98b\ncmp     r12, r13                                                       ; +0x6f, 0x10011d98f\nja      short loc_10011D9EF                                            ; +0x72, 0x10011d992\nmov     r15, [r12]                                                     ; +0x74, 0x10011d994\ntest    r15, r15                                                       ; +0x78, 0x10011d998\njz      short loc_10011D9EF                                            ; +0x7b, 0x10011d99b\ncmp     dword ptr [r15+404h], 0BD8h                                    ; +0x7d, 0x10011d99d\njnz     short loc_10011D98B                                            ; +0x88, 0x10011d9a8\nmovsxd  rsi, dword ptr [r15+740h]                                      ; +0x8a, 0x10011d9aa\nmov     rdi, [rbp+var_30]                                              ; +0x91, 0x10011d9b1\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x95, 0x10011d9b5\ntest    rax, rax                                                       ; +0x9a, 0x10011d9ba\njnz     short loc_10011D980                                            ; +0x9d, 0x10011d9bd\ncall    sub_10071F9E0                                                  ; +0x9f, 0x10011d9bf\nmov     r14, rax                                                       ; +0xa4, 0x10011d9c4\nmov     esi, [r15+740h]                                                ; +0xa7, 0x10011d9c7\nmov     rax, [rax]                                                     ; +0xae, 0x10011d9ce\nmov     rdi, r14                                                       ; +0xb1, 0x10011d9d1\ncall    qword ptr [rax+48h]                                            ; +0xb4, 0x10011d9d4\nmovsxd  rdx, dword ptr [r15+740h]                                      ; +0xb7, 0x10011d9d7\nmov     rdi, [rbp+var_30]                                              ; +0xbe, 0x10011d9de\nmov     rsi, r14                                                       ; +0xc2, 0x10011d9e2\ncall    cocos2d__CCDictionary__setObject                               ; +0xc5, 0x10011d9e5\nmov     rax, r14                                                       ; +0xca, 0x10011d9ea\njmp     short loc_10011D980                                            ; +0xcd, 0x10011d9ed\nmov     rdi, [rbp+var_30]                                              ; +0xcf, 0x10011d9ef\ncall    cocos2d__CCDictionary__allKeys                                 ; +0xd3, 0x10011d9f3\nmov     r15, rax                                                       ; +0xd8, 0x10011d9f8\nmov     rax, [rax+38h]                                                 ; +0xdb, 0x10011d9fb\nmov     rdi, [rax+10h]; __base                                         ; +0xdf, 0x10011d9ff\nmov     esi, [rax]; __nel                                              ; +0xe3, 0x10011da03\nlea     rcx, sub_10010DEB0; __compar                                   ; +0xe5, 0x10011da05\nmov     edx, 8; __width                                                ; +0xec, 0x10011da0c\ncall    _qsort                                                         ; +0xf1, 0x10011da11\nmov     rdi, r15                                                       ; +0xf6, 0x10011da16\ncall    sub_100720070                                                  ; +0xf9, 0x10011da19\ntest    eax, eax                                                       ; +0xfe, 0x10011da1e\njz      loc_10011DAF3                                                  ; +0x100, 0x10011da20\nxor     r12d, r12d                                                     ; +0x106, 0x10011da26\njmp     short loc_10011DA4A                                            ; +0x109, 0x10011da29\nalign 10h                                                              ; +0x10b, 0x10011da2b\ninc     dword ptr [rbx+3328h]                                          ; +0x110, 0x10011da30\ninc     r12d                                                           ; +0x116, 0x10011da36\nmov     rdi, r15                                                       ; +0x119, 0x10011da39\ncall    sub_100720070                                                  ; +0x11c, 0x10011da3c\ncmp     r12d, eax                                                      ; +0x121, 0x10011da41\njnb     loc_10011DAF3                                                  ; +0x124, 0x10011da44\nmov     rdi, r15                                                       ; +0x12a, 0x10011da4a\nmov     esi, r12d                                                      ; +0x12d, 0x10011da4d\ncall    sub_1007200C0                                                  ; +0x130, 0x10011da50\nmovsxd  rsi, dword ptr [rax+38h]                                       ; +0x135, 0x10011da55\nmov     rdi, [rbp+var_30]                                              ; +0x139, 0x10011da59\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x13d, 0x10011da5d\nmov     r13, rax                                                       ; +0x142, 0x10011da62\nmov     rax, [rax+38h]                                                 ; +0x145, 0x10011da65\nmov     rdi, [rax+10h]; __base                                         ; +0x149, 0x10011da69\nmov     esi, [rax]; __nel                                              ; +0x14d, 0x10011da6d\nmov     edx, 8; __width                                                ; +0x14f, 0x10011da6f\nlea     rcx, sub_10010DE90; __compar                                   ; +0x154, 0x10011da74\ncall    _qsort                                                         ; +0x15b, 0x10011da7b\nmov     esi, [rbx+3328h]                                               ; +0x160, 0x10011da80\nmov     rax, [r13+0]                                                   ; +0x166, 0x10011da86\nmov     rdi, r13                                                       ; +0x16a, 0x10011da8a\ncall    qword ptr [rax+48h]                                            ; +0x16d, 0x10011da8d\nmov     rdi, [rbx+3320h]                                               ; +0x170, 0x10011da90\nmovsxd  rdx, dword ptr [rbx+3328h]                                     ; +0x177, 0x10011da97\nmov     rsi, r13                                                       ; +0x17e, 0x10011da9e\ncall    cocos2d__CCDictionary__setObject                               ; +0x181, 0x10011daa1\nmov     rdi, r13                                                       ; +0x186, 0x10011daa6\ncall    sub_100720070                                                  ; +0x189, 0x10011daa9\ntest    eax, eax                                                       ; +0x18e, 0x10011daae\njz      loc_10011DA30                                                  ; +0x190, 0x10011dab0\nxor     r14d, r14d                                                     ; +0x196, 0x10011dab6\nnop     dword ptr [rax+00000000h]                                      ; +0x199, 0x10011dab9\nmov     rdi, r13                                                       ; +0x1a0, 0x10011dac0\nmov     esi, r14d                                                      ; +0x1a3, 0x10011dac3\ncall    sub_1007200C0                                                  ; +0x1a6, 0x10011dac6\nmov     ecx, [rbx+3328h]                                               ; +0x1ab, 0x10011dacb\nmov     [rax+740h], ecx                                                ; +0x1b1, 0x10011dad1\nmov     [rax+744h], r14d                                               ; +0x1b7, 0x10011dad7\ninc     r14d                                                           ; +0x1be, 0x10011dade\nmov     rdi, r13                                                       ; +0x1c1, 0x10011dae1\ncall    sub_100720070                                                  ; +0x1c4, 0x10011dae4\ncmp     r14d, eax                                                      ; +0x1c9, 0x10011dae9\njb      short loc_10011DAC0                                            ; +0x1cc, 0x10011daec\njmp     loc_10011DA30                                                  ; +0x1ce, 0x10011daee\nadd     rsp, 8                                                         ; +0x1d3, 0x10011daf3\npop     rbx                                                            ; +0x1d7, 0x10011daf7\npop     r12                                                            ; +0x1d8, 0x10011daf8\npop     r13                                                            ; +0x1da, 0x10011dafa\npop     r14                                                            ; +0x1dc, 0x10011dafc\npop     r15                                                            ; +0x1de, 0x10011dafe\npop     rbp                                                            ; +0x1e0, 0x10011db00\nretn                                                                   ; +0x1e1, 0x10011db01", "xrefs": ["LevelEditorLayer::init @ 0x1000dc0f3", "GJBaseGameLayer::updateSpecialGroupData @ 0x100117401"], "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"}