{"type": "func", "start": 5370515632, "end": 5370516307, "name": "EditorUI::createNewKeyframeAnim", "pseudocode": "// \n// EditorUI::createNewKeyframeAnim from 0x1401b90b0 to 0x1401b9353 (675 bytes)\n// \n// 4 xrefs:\n// > SetGroupIDLayer::onAnim @ 0x140591cf5\n// > <???> @ 0x1408a1fdc\n// > <???> @ 0x1408a2040\n// > <???> @ 0x14091a36c\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:27:59 +0000\n// \n\nunsigned int __fastcall EditorUI::createNewKeyframeAnim(__int64 a1)\n{\n  unsigned int result; // eax\n  cocos2d::CCArray *v3; // rax\n  struct cocos2d::CCObject *v4; // rdx\n  cocos2d::CCArray *v5; // rdi\n  __int64 v6; // rcx\n  __int64 v7; // rax\n  unsigned int *v8; // r12\n  __int64 v9; // rcx\n  _QWORD *v10; // r12\n  _QWORD *v11; // rdi\n  __int64 v12; // r15\n  struct cocos2d::CCObject *v13; // rax\n  unsigned int *v14; // r14\n  __int64 v15; // rax\n  unsigned __int64 v16; // r14\n  unsigned __int64 v17; // r13\n  int v18; // ebx\n  const struct cocos2d::CCPoint *v19; // rax\n  const struct cocos2d::CCPoint *v20; // rax\n  struct cocos2d::CCObject *Object; // rsi\n  __int64 v22; // rbx\n  __int64 v23; // rcx\n  struct cocos2d::CCObject *v24; // rdi\n  _QWORD *v25; // [rsp+70h] [rbp+8h]\n  cocos2d::CCArray *v26; // [rsp+78h] [rbp+10h]\n  _QWORD *v27; // [rsp+80h] [rbp+18h]\n  char v28; // [rsp+88h] [rbp+20h] BYREF\n\n  if ( *(_QWORD *)(a1 + 1568) || (result = cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 944))) != 0 )\n  {\n    v3 = (cocos2d::CCArray *)cocos2d::CCArray::create(a1);\n    v4 = *(struct cocos2d::CCObject **)(a1 + 1568);\n    v5 = v3;\n    if ( v4 )\n      cocos2d::CCArray::addObject(v3, v4);\n    else\n      cocos2d::CCArray::addObjectsFromArray(v3, *(struct cocos2d::CCArray **)(a1 + 944));\n    EditorUI::deselectAll(a1);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 1512) + 1072LL))(*(_QWORD *)(a1 + 1512));\n    v7 = cocos2d::CCArray::create(v6);\n    v26 = (cocos2d::CCArray *)v7;\n    if ( v5 )\n    {\n      v8 = *((unsigned int **)v5 + 7);\n      v9 = *v8;\n      if ( (_DWORD)v9 )\n      {\n        v10 = *((_QWORD **)v8 + 2);\n        v25 = v10;\n        v11 = &v10[v9 - 1];\n        v27 = v11;\n        if ( v10 <= v11 )\n        {\n          do\n          {\n            v12 = *v10;\n            if ( !*v10 )\n              break;\n            if ( *(_BYTE *)(v12 + 1178) )\n            {\n              v13 = cocos2d::CCDictionary::objectForKey(\n                      *(cocos2d::CCDictionary **)(*(_QWORD *)(a1 + 1512) + 3976LL),\n                      *(unsigned int *)(v12 + 924));\n              if ( v13 )\n              {\n                v14 = *((unsigned int **)v13 + 7);\n                v15 = *v14;\n                if ( (_DWORD)v15 )\n                {\n                  v16 = *((_QWORD *)v14 + 2);\n                  v17 = v16 + 8 * (v15 - 1);\n                  if ( v16 <= v17 )\n                  {\n                    do\n                    {\n                      if ( !*(_QWORD *)v16 )\n                        break;\n                      v18 = *(_DWORD *)(*(_QWORD *)v16 + 56LL);\n                      v19 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v12 + 200LL))(v12);\n                      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v28, v19);\n                      Object = (struct cocos2d::CCObject *)EditorUI::createObject(a1, 0xBD8u, v20);\n                      LevelEditorLayer::removeSpecial(*(_QWORD *)(a1 + 1512), Object);\n                      cocos2d::CCArray::addObject(v26, Object);\n                      if ( v18 < 0 )\n                        v18 = 0;\n                      if ( v18 > 9999 )\n                        v18 = 9999;\n                      *((_DWORD *)Object + 370) = v18;\n                      KeyframeGameObject::updateShadowObjects(Object, *(_QWORD *)(a1 + 1512), a1);\n                      v22 = *(_QWORD *)(a1 + 1512);\n                      v24 = (struct cocos2d::CCObject *)cocos2d::CCArray::create(v23);\n                      (*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v24 + 64LL))(\n                        v24,\n                        *(unsigned int *)(v22 + 13880));\n                      cocos2d::CCDictionary::setObject(\n                        *(cocos2d::CCDictionary **)(v22 + 13872),\n                        v24,\n                        *(int *)(v22 + 13880));\n                      ++*(_DWORD *)(v22 + 13880);\n                      *((_DWORD *)Object + 468) = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v24 + 56LL))(v24);\n                      *((_DWORD *)Object + 469) = 0;\n                      LevelEditorLayer::addSpecial(*(_QWORD *)(a1 + 1512), Object);\n                      v16 += 8LL;\n                    }\n                    while ( v16 <= v17 );\n                    v10 = v25;\n                    v11 = v27;\n                  }\n                }\n              }\n            }\n            v25 = ++v10;\n          }\n          while ( v10 <= v11 );\n          v7 = (__int64)v26;\n        }\n      }\n    }\n    return EditorUI::selectObjects(a1, v7, 0);\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::createNewKeyframeAnim from 0x1401b90b0 to 0x1401b9353 (675 bytes)\n; \n; 4 xrefs:\n; > SetGroupIDLayer::onAnim @ 0x140591cf5\n; > <???> @ 0x1408a1fdc\n; > <???> @ 0x1408a2040\n; > <???> @ 0x14091a36c\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:27:59 +0000\n; \npush    rbx                                                            ; +0x0, 0x1401b90b0\npush    rbp                                                            ; +0x2, 0x1401b90b2\nsub     rsp, 58h                                                       ; +0x3, 0x1401b90b3\ncmp     qword ptr [rcx+620h], 0                                        ; +0x7, 0x1401b90b7\nmov     rbp, rcx                                                       ; +0xf, 0x1401b90bf\njnz     short loc_1401B90D9                                            ; +0x12, 0x1401b90c2\nmov     rcx, [rcx+3B0h]                                                ; +0x14, 0x1401b90c4\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x1b, 0x1401b90cb\ntest    eax, eax                                                       ; +0x21, 0x1401b90d1\njz      loc_1401B934C                                                  ; +0x23, 0x1401b90d3\nmov     [rsp+68h+var_20], rdi                                          ; +0x29, 0x1401b90d9\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x2e, 0x1401b90de\nmov     rdx, [rbp+620h]                                                ; +0x34, 0x1401b90e4\nmov     rdi, rax                                                       ; +0x3b, 0x1401b90eb\nmov     rcx, rax                                                       ; +0x3e, 0x1401b90ee\ntest    rdx, rdx                                                       ; +0x41, 0x1401b90f1\njz      short loc_1401B90FE                                            ; +0x44, 0x1401b90f4\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x46, 0x1401b90f6\njmp     short loc_1401B910B                                            ; +0x4c, 0x1401b90fc\nmov     rdx, [rbp+3B0h]                                                ; +0x4e, 0x1401b90fe\ncall    cs:?addObjectsFromArray@CCArray@cocos2d@@QEAAXPEAV12@@Z; cocos2d::CCArray::addObjectsFromArray(cocos2d::CCArray *) ; +0x55, 0x1401b9105\nmov     rcx, rbp                                                       ; +0x5b, 0x1401b910b\ncall    EditorUI__deselectAll                                          ; +0x5e, 0x1401b910e\nmov     rcx, [rbp+5E8h]                                                ; +0x63, 0x1401b9113\nxorps   xmm1, xmm1                                                     ; +0x6a, 0x1401b911a\nmov     rax, [rcx]                                                     ; +0x6d, 0x1401b911d\ncall    qword ptr [rax+430h]                                           ; +0x70, 0x1401b9120\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x76, 0x1401b9126\nmov     [rsp+68h+arg_8], rax                                           ; +0x7c, 0x1401b912c\ntest    rdi, rdi                                                       ; +0x81, 0x1401b9131\njz      loc_1401B9339                                                  ; +0x84, 0x1401b9134\nmov     [rsp+68h+var_28], r12                                          ; +0x8a, 0x1401b913a\nmov     r12, [rdi+38h]                                                 ; +0x8f, 0x1401b913f\nmov     ecx, [r12]                                                     ; +0x93, 0x1401b9143\ntest    ecx, ecx                                                       ; +0x97, 0x1401b9147\njz      loc_1401B9334                                                  ; +0x99, 0x1401b9149\nmov     r12, [r12+10h]                                                 ; +0x9f, 0x1401b914f\nlea     rdi, [rcx-1]                                                   ; +0xa4, 0x1401b9154\nmov     [rsp+68h+arg_0], r12                                           ; +0xa8, 0x1401b9158\nlea     rdi, [r12+rdi*8]                                               ; +0xad, 0x1401b915d\nmov     [rsp+68h+arg_10], rdi                                          ; +0xb1, 0x1401b9161\ncmp     r12, rdi                                                       ; +0xb9, 0x1401b9169\nja      loc_1401B9334                                                  ; +0xbc, 0x1401b916c\nmov     [rsp+68h+var_18], rsi                                          ; +0xc2, 0x1401b9172\nmov     [rsp+68h+var_30], r13                                          ; +0xc7, 0x1401b9177\nmov     [rsp+68h+var_38], r14                                          ; +0xcc, 0x1401b917c\nmov     [rsp+68h+var_40], r15                                          ; +0xd1, 0x1401b9181\nnop     word ptr [rax+rax+00000000h]                                   ; +0xd6, 0x1401b9186\nmov     r15, [r12]                                                     ; +0xe0, 0x1401b9190\ntest    r15, r15                                                       ; +0xe4, 0x1401b9194\njz      loc_1401B931B                                                  ; +0xe7, 0x1401b9197\ncmp     byte ptr [r15+49Ah], 0                                         ; +0xed, 0x1401b919d\njz      loc_1401B9309                                                  ; +0xf5, 0x1401b91a5\nmov     rcx, [rbp+5E8h]                                                ; +0xfb, 0x1401b91ab\nmov     edx, [r15+39Ch]                                                ; +0x102, 0x1401b91b2\nmov     rcx, [rcx+0F88h]                                               ; +0x109, 0x1401b91b9\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x110, 0x1401b91c0\ntest    rax, rax                                                       ; +0x116, 0x1401b91c6\njz      loc_1401B9309                                                  ; +0x119, 0x1401b91c9\nmov     r14, [rax+38h]                                                 ; +0x11f, 0x1401b91cf\nmov     eax, [r14]                                                     ; +0x123, 0x1401b91d3\ntest    eax, eax                                                       ; +0x126, 0x1401b91d6\njz      loc_1401B9309                                                  ; +0x128, 0x1401b91d8\nmov     r14, [r14+10h]                                                 ; +0x12e, 0x1401b91de\nlea     r13, [rax-1]                                                   ; +0x132, 0x1401b91e2\nlea     r13, [r14+r13*8]                                               ; +0x136, 0x1401b91e6\ncmp     r14, r13                                                       ; +0x13a, 0x1401b91ea\nja      loc_1401B9309                                                  ; +0x13d, 0x1401b91ed\nmov     r12, [rsp+68h+arg_8]                                           ; +0x143, 0x1401b91f3\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x148, 0x1401b91f8\nmov     rbx, [r14]                                                     ; +0x150, 0x1401b9200\ntest    rbx, rbx                                                       ; +0x153, 0x1401b9203\njz      loc_1401B92FC                                                  ; +0x156, 0x1401b9206\nmov     rax, [r15]                                                     ; +0x15c, 0x1401b920c\nmov     rcx, r15                                                       ; +0x15f, 0x1401b920f\nmov     ebx, [rbx+38h]                                                 ; +0x162, 0x1401b9212\ncall    qword ptr [rax+0C8h]                                           ; +0x165, 0x1401b9215\nmov     rdx, rax                                                       ; +0x16b, 0x1401b921b\nlea     rcx, [rsp+68h+arg_18]                                          ; +0x16e, 0x1401b921e\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x176, 0x1401b9226\nmov     edx, 0BD8h                                                     ; +0x17c, 0x1401b922c\nmov     rcx, rbp                                                       ; +0x181, 0x1401b9231\nmov     r8, rax                                                        ; +0x184, 0x1401b9234\ncall    EditorUI__createObject                                         ; +0x187, 0x1401b9237\nmov     rcx, [rbp+5E8h]                                                ; +0x18c, 0x1401b923c\nmov     rdx, rax                                                       ; +0x193, 0x1401b9243\nmov     rsi, rax                                                       ; +0x196, 0x1401b9246\ncall    LevelEditorLayer__removeSpecial                                ; +0x199, 0x1401b9249\nmov     rdx, rsi                                                       ; +0x19e, 0x1401b924e\nmov     rcx, r12                                                       ; +0x1a1, 0x1401b9251\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0x1a4, 0x1401b9254\ntest    ebx, ebx                                                       ; +0x1aa, 0x1401b925a\nmov     eax, 0                                                         ; +0x1ac, 0x1401b925c\nmov     r8, rbp                                                        ; +0x1b1, 0x1401b9261\nmov     rcx, rsi                                                       ; +0x1b4, 0x1401b9264\ncmovs   ebx, eax                                                       ; +0x1b7, 0x1401b9267\nmov     eax, 270Fh                                                     ; +0x1ba, 0x1401b926a\ncmp     ebx, eax                                                       ; +0x1bf, 0x1401b926f\ncmovg   ebx, eax                                                       ; +0x1c1, 0x1401b9271\nmov     [rsi+5C8h], ebx                                                ; +0x1c4, 0x1401b9274\nmov     rdx, [rbp+5E8h]                                                ; +0x1ca, 0x1401b927a\ncall    KeyframeGameObject__updateShadowObjects                        ; +0x1d1, 0x1401b9281\nmov     rbx, [rbp+5E8h]                                                ; +0x1d6, 0x1401b9286\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x1dd, 0x1401b928d\nmov     edx, [rbx+3638h]                                               ; +0x1e3, 0x1401b9293\nmov     rdi, rax                                                       ; +0x1e9, 0x1401b9299\nmov     rcx, [rax]                                                     ; +0x1ec, 0x1401b929c\nmov     r8, [rcx+40h]                                                  ; +0x1ef, 0x1401b929f\nmov     rcx, rax                                                       ; +0x1f3, 0x1401b92a3\ncall    r8                                                             ; +0x1f6, 0x1401b92a6\nmovsxd  r8, dword ptr [rbx+3638h]                                      ; +0x1f9, 0x1401b92a9\nmov     rdx, rdi                                                       ; +0x200, 0x1401b92b0\nmov     rcx, [rbx+3630h]                                               ; +0x203, 0x1401b92b3\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,__int64) ; +0x20a, 0x1401b92ba\ninc     dword ptr [rbx+3638h]                                          ; +0x210, 0x1401b92c0\nmov     rcx, [rdi]                                                     ; +0x216, 0x1401b92c6\nmov     rdx, [rcx+38h]                                                 ; +0x219, 0x1401b92c9\nmov     rcx, rdi                                                       ; +0x21d, 0x1401b92cd\ncall    rdx                                                            ; +0x220, 0x1401b92d0\nmov     [rsi+750h], eax                                                ; +0x222, 0x1401b92d2\nmov     rdx, rsi                                                       ; +0x228, 0x1401b92d8\nxor     eax, eax                                                       ; +0x22b, 0x1401b92db\nmov     [rsi+754h], eax                                                ; +0x22d, 0x1401b92dd\nmov     rcx, [rbp+5E8h]                                                ; +0x233, 0x1401b92e3\ncall    LevelEditorLayer__addSpecial                                   ; +0x23a, 0x1401b92ea\nadd     r14, 8                                                         ; +0x23f, 0x1401b92ef\ncmp     r14, r13                                                       ; +0x243, 0x1401b92f3\njbe     loc_1401B9200                                                  ; +0x246, 0x1401b92f6\nmov     r12, [rsp+68h+arg_0]                                           ; +0x24c, 0x1401b92fc\nmov     rdi, [rsp+68h+arg_10]                                          ; +0x251, 0x1401b9301\nadd     r12, 8                                                         ; +0x259, 0x1401b9309\nmov     [rsp+68h+arg_0], r12                                           ; +0x25d, 0x1401b930d\ncmp     r12, rdi                                                       ; +0x262, 0x1401b9312\njbe     loc_1401B9190                                                  ; +0x265, 0x1401b9315\nmov     rax, [rsp+68h+arg_8]                                           ; +0x26b, 0x1401b931b\nmov     r15, [rsp+68h+var_40]                                          ; +0x270, 0x1401b9320\nmov     r14, [rsp+68h+var_38]                                          ; +0x275, 0x1401b9325\nmov     r13, [rsp+68h+var_30]                                          ; +0x27a, 0x1401b932a\nmov     rsi, [rsp+68h+var_18]                                          ; +0x27f, 0x1401b932f\nmov     r12, [rsp+68h+var_28]                                          ; +0x284, 0x1401b9334\nxor     r8d, r8d                                                       ; +0x289, 0x1401b9339\nmov     rdx, rax                                                       ; +0x28c, 0x1401b933c\nmov     rcx, rbp                                                       ; +0x28f, 0x1401b933f\ncall    EditorUI__selectObjects                                        ; +0x292, 0x1401b9342\nmov     rdi, [rsp+68h+var_20]                                          ; +0x297, 0x1401b9347\nadd     rsp, 58h                                                       ; +0x29c, 0x1401b934c\npop     rbp                                                            ; +0x2a0, 0x1401b9350\npop     rbx                                                            ; +0x2a1, 0x1401b9351\nretn                                                                   ; +0x2a2, 0x1401b9352", "xrefs": ["SetGroupIDLayer::onAnim @ 0x140591cf5", "<???> @ 0x1408a1fdc", "<???> @ 0x1408a2040", "<???> @ 0x14091a36c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}