{"type": "func", "start": 5370903488, "end": 5370904113, "name": "GJBaseGameLayer::playKeyframeAnimation", "pseudocode": "// \n// GJBaseGameLayer::playKeyframeAnimation from 0x140217bc0 to 0x140217e31 (625 bytes)\n// \n// 2 xrefs:\n// > EffectGameObject::triggerObject @ 0x1404a7578\n// > <???> @ 0x1406cd1e8\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\n// Hidden C++ exception states: #wind=1\nvoid GJBaseGameLayer::playKeyframeAnimation(\n        GJBaseGameLayer *a1,\n        KeyframeAnimTriggerObject *a2,\n        std::vector<int> *const a3)\n{\n  cocos2d::CCArray *Group; // rdi\n  __int64 v7; // r8\n  cocos2d::ccArray *data; // rdi\n  __int64 num; // rax\n  cocos2d::CCObject **arr; // rdi\n  cocos2d::CCObject **v11; // r15\n  cocos2d::CCObject *v12; // rsi\n  unsigned int m_uAutoReleaseCount; // edx\n  __int64 v14; // rax\n  cocos2d::CCArray *v15; // r14\n  GameObject *MainObject; // r9\n  int m_targetGroupID; // edx\n  char v18[16]; // [rsp+70h] [rbp-78h] BYREF\n  char v19[8]; // [rsp+80h] [rbp-68h] BYREF\n  void *v20; // [rsp+88h] [rbp-60h] BYREF\n  __int64 v21[3]; // [rsp+98h] [rbp-50h] BYREF\n  __int64 v22; // [rsp+B0h] [rbp-38h]\n  unsigned int v23; // [rsp+F8h] [rbp+10h] BYREF\n\n  Group = GJBaseGameLayer::getGroup(a1, a2->m_animationID);\n  v23 = 0;\n  sub_14005E660((__int64)v19, &v23, v7);\n  if ( Group )\n  {\n    data = Group->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = data->arr;\n      v11 = &arr[num - 1];\n      if ( arr <= v11 )\n      {\n        while ( 1 )\n        {\n          v12 = *arr;\n          if ( !*arr )\n            goto LABEL_17;\n          if ( v12[18].m_eObjType == 3032 )\n            break;\nLABEL_16:\n          if ( ++arr > v11 )\n            goto LABEL_17;\n        }\n        m_uAutoReleaseCount = v12[33].m_uAutoReleaseCount;\n        v23 = m_uAutoReleaseCount;\n        v14 = *(_QWORD *)(v21[0]\n                        + 16\n                        * (v22\n                         & (0x100000001B3LL\n                          * (((unsigned __int64)m_uAutoReleaseCount >> 24)\n                           ^ (0x100000001B3LL\n                            * (BYTE2(m_uAutoReleaseCount)\n                             ^ (0x100000001B3LL\n                              * ((0x100000001B3LL * ((unsigned __int8)m_uAutoReleaseCount ^ 0xCBF29CE484222325uLL))\n                               ^ BYTE1(m_uAutoReleaseCount))))))))\n                        + 8);\n        if ( (void *)v14 != v20 )\n        {\n          if ( m_uAutoReleaseCount == *(_DWORD *)(v14 + 16) )\n            goto LABEL_12;\n          while ( v14 != *(_QWORD *)(v21[0]\n                                   + 16\n                                   * (v22\n                                    & (0x100000001B3LL\n                                     * (((unsigned __int64)m_uAutoReleaseCount >> 24)\n                                      ^ (0x100000001B3LL\n                                       * (BYTE2(m_uAutoReleaseCount)\n                                        ^ (0x100000001B3LL\n                                         * ((0x100000001B3LL\n                                           * ((unsigned __int8)m_uAutoReleaseCount ^ 0xCBF29CE484222325uLL))\n                                          ^ BYTE1(m_uAutoReleaseCount))))))))) )\n          {\n            v14 = *(_QWORD *)(v14 + 8);\n            if ( m_uAutoReleaseCount == *(_DWORD *)(v14 + 16) )\n              goto LABEL_12;\n          }\n        }\n        v14 = 0;\nLABEL_12:\n        if ( !v14 )\n        {\n          sub_140060D70((__int64)v19, (__int64)v18, (unsigned __int8 *)&v23);\n          v15 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(a1->m_keyframeGroups, (int)v23);\n          MainObject = GJBaseGameLayer::tryGetMainObject(a1, a2->m_centerGroupID);\n          m_targetGroupID = a2->m_targetGroupID;\n          if ( !m_targetGroupID )\n            m_targetGroupID = v12[26].m_uAutoReleaseCount;\n          GJEffectManager::createKeyframeCommand(\n            a1->m_effectManager,\n            m_targetGroupID,\n            v15,\n            MainObject,\n            a2->m_uniqueID,\n            a2->m_controlID,\n            0,\n            a2->m_positionXMod,\n            a2->m_positionYMod,\n            a2->m_rotationMod,\n            a2->m_scaleXMod,\n            a2->m_scaleYMod,\n            a2->m_timeMod,\n            a3);\n        }\n        goto LABEL_16;\n      }\n    }\n  }\nLABEL_17:\n  sub_14005D100((__int64)v21);\n  sub_14005D870(&v20);\n}", "assembly": "; \n; GJBaseGameLayer::playKeyframeAnimation from 0x140217bc0 to 0x140217e31 (625 bytes)\n; \n; 2 xrefs:\n; > EffectGameObject::triggerObject @ 0x1404a7578\n; > <???> @ 0x1406cd1e8\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\nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140217bc0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140217bc5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x140217bca\npush    rdi                                                            ; +0xf, 0x140217bcf\npush    r12                                                            ; +0x10, 0x140217bd0\npush    r13                                                            ; +0x12, 0x140217bd2\npush    r14                                                            ; +0x14, 0x140217bd4\npush    r15                                                            ; +0x16, 0x140217bd6\nsub     rsp, 0C0h                                                      ; +0x18, 0x140217bd8\nmov     r12, r8                                                        ; +0x1f, 0x140217bdf\nmov     rbx, rdx                                                       ; +0x22, 0x140217be2\nmov     rbp, rcx                                                       ; +0x25, 0x140217be5\nmov     edx, [rdx+684h]                                                ; +0x28, 0x140217be8\ncall    GJBaseGameLayer__getGroup                                      ; +0x2e, 0x140217bee\nmov     rdi, rax                                                       ; +0x33, 0x140217bf3\nmov     [rsp+0E8h+arg_8], 0                                            ; +0x36, 0x140217bf6\nlea     rdx, [rsp+0E8h+arg_8]                                          ; +0x41, 0x140217c01\nlea     rcx, [rsp+0E8h+var_68]                                         ; +0x49, 0x140217c09\ncall    sub_14005E660                                                  ; +0x51, 0x140217c11\nnop                                                                    ; +0x56, 0x140217c16\ntest    rdi, rdi                                                       ; +0x57, 0x140217c17\njz      loc_140217DF6                                                  ; +0x5a, 0x140217c1a\nmov     rdi, [rdi+38h]                                                 ; +0x60, 0x140217c20\nmov     eax, [rdi]                                                     ; +0x64, 0x140217c24\ntest    eax, eax                                                       ; +0x66, 0x140217c26\njz      loc_140217DF6                                                  ; +0x68, 0x140217c28\nmov     rdi, [rdi+10h]                                                 ; +0x6e, 0x140217c2e\nlea     r15, [rax-1]                                                   ; +0x72, 0x140217c32\nlea     r15, [rdi+r15*8]                                               ; +0x76, 0x140217c36\ncmp     rdi, r15                                                       ; +0x7a, 0x140217c3a\nja      loc_140217DF6                                                  ; +0x7d, 0x140217c3d\nmov     rcx, 0CBF29CE484222325h                                        ; +0x83, 0x140217c43\nmov     r13, 100000001B3h                                              ; +0x8d, 0x140217c4d\nnop     word ptr [rax+rax+00000000h]                                   ; +0x97, 0x140217c57\nmov     rsi, [rdi]                                                     ; +0xa0, 0x140217c60\ntest    rsi, rsi                                                       ; +0xa3, 0x140217c63\njz      loc_140217DF6                                                  ; +0xa6, 0x140217c66\ncmp     dword ptr [rsi+40Ch], 0BD8h                                    ; +0xac, 0x140217c6c\njnz     loc_140217DE9                                                  ; +0xb6, 0x140217c76\nmov     edx, [rsi+750h]                                                ; +0xbc, 0x140217c7c\nmov     [rsp+0E8h+arg_8], edx                                          ; +0xc2, 0x140217c82\nmov     eax, edx                                                       ; +0xc9, 0x140217c89\nshr     eax, 8                                                         ; +0xcb, 0x140217c8b\nmovzx   r8d, al                                                        ; +0xce, 0x140217c8e\nmovzx   eax, dl                                                        ; +0xd2, 0x140217c92\nxor     rax, rcx                                                       ; +0xd5, 0x140217c95\nimul    rax, r13                                                       ; +0xd8, 0x140217c98\nxor     r8, rax                                                        ; +0xdc, 0x140217c9c\nimul    r8, r13                                                        ; +0xdf, 0x140217c9f\nmov     eax, edx                                                       ; +0xe3, 0x140217ca3\nshr     eax, 10h                                                       ; +0xe5, 0x140217ca5\nmovzx   ecx, al                                                        ; +0xe8, 0x140217ca8\nxor     r8, rcx                                                        ; +0xeb, 0x140217cab\nimul    r8, r13                                                        ; +0xee, 0x140217cae\nmov     eax, edx                                                       ; +0xf2, 0x140217cb2\nshr     rax, 18h                                                       ; +0xf4, 0x140217cb4\nxor     r8, rax                                                        ; +0xf8, 0x140217cb8\nimul    r8, r13                                                        ; +0xfb, 0x140217cbb\nand     r8, [rsp+0E8h+var_38]                                          ; +0xff, 0x140217cbf\nadd     r8, r8                                                         ; +0x107, 0x140217cc7\nmov     rcx, [rsp+0E8h+var_50]                                         ; +0x10a, 0x140217cca\nmov     rax, [rcx+r8*8+8]                                              ; +0x112, 0x140217cd2\ncmp     rax, [rsp+0E8h+var_60]                                         ; +0x117, 0x140217cd7\njz      short loc_140217D00                                            ; +0x11f, 0x140217cdf\nmov     rcx, [rcx+r8*8]                                                ; +0x121, 0x140217ce1\ncmp     edx, [rax+10h]                                                 ; +0x125, 0x140217ce5\njz      short loc_140217D02                                            ; +0x128, 0x140217ce8\nnop     word ptr [rax+rax+00h]                                         ; +0x12a, 0x140217cea\ncmp     rax, rcx                                                       ; +0x130, 0x140217cf0\njz      short loc_140217D00                                            ; +0x133, 0x140217cf3\nmov     rax, [rax+8]                                                   ; +0x135, 0x140217cf5\ncmp     edx, [rax+10h]                                                 ; +0x139, 0x140217cf9\njnz     short loc_140217CF0                                            ; +0x13c, 0x140217cfc\njmp     short loc_140217D02                                            ; +0x13e, 0x140217cfe\nxor     eax, eax                                                       ; +0x140, 0x140217d00\ntest    rax, rax                                                       ; +0x142, 0x140217d02\njnz     loc_140217DDF                                                  ; +0x145, 0x140217d05\nlea     r8, [rsp+0E8h+arg_8]                                           ; +0x14b, 0x140217d0b\nlea     rdx, [rsp+0E8h+var_78]                                         ; +0x153, 0x140217d13\nlea     rcx, [rsp+0E8h+var_68]                                         ; +0x158, 0x140217d18\ncall    sub_140060D70                                                  ; +0x160, 0x140217d20\nmovsxd  rdx, [rsp+0E8h+arg_8]                                          ; +0x165, 0x140217d25\nmov     rcx, [rbp+3530h]                                               ; +0x16d, 0x140217d2d\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x174, 0x140217d34\nmov     r14, rax                                                       ; +0x17a, 0x140217d3a\nmov     edx, [rbx+5CCh]                                                ; +0x17d, 0x140217d3d\nmov     rcx, rbp                                                       ; +0x183, 0x140217d43\ncall    GJBaseGameLayer__tryGetMainObject                              ; +0x186, 0x140217d46\nmov     r9, rax                                                        ; +0x18b, 0x140217d4b\nmov     edx, [rbx+5C8h]                                                ; +0x18e, 0x140217d4e\ntest    edx, edx                                                       ; +0x194, 0x140217d54\njnz     short loc_140217D5E                                            ; +0x196, 0x140217d56\nmov     edx, [rsi+5C8h]                                                ; +0x198, 0x140217d58\nmov     [rsp+0E8h+var_80], r12                                         ; +0x19e, 0x140217d5e\nmovss   xmm0, dword ptr [rbx+740h]                                     ; +0x1a3, 0x140217d63\nmovss   [rsp+0E8h+var_88], xmm0                                        ; +0x1ab, 0x140217d6b\nmovss   xmm1, dword ptr [rbx+754h]                                     ; +0x1b1, 0x140217d71\nmovss   [rsp+0E8h+var_90], xmm1                                        ; +0x1b9, 0x140217d79\nmovss   xmm0, dword ptr [rbx+750h]                                     ; +0x1bf, 0x140217d7f\nmovss   [rsp+0E8h+var_98], xmm0                                        ; +0x1c7, 0x140217d87\nmovss   xmm1, dword ptr [rbx+74Ch]                                     ; +0x1cd, 0x140217d8d\nmovss   [rsp+0E8h+var_A0], xmm1                                        ; +0x1d5, 0x140217d95\nmovss   xmm0, dword ptr [rbx+748h]                                     ; +0x1db, 0x140217d9b\nmovss   [rsp+0E8h+var_A8], xmm0                                        ; +0x1e3, 0x140217da3\nmovss   xmm1, dword ptr [rbx+744h]                                     ; +0x1e9, 0x140217da9\nmovss   [rsp+0E8h+var_B0], xmm1                                        ; +0x1f1, 0x140217db1\nmov     [rsp+0E8h+var_B8], 0                                           ; +0x1f7, 0x140217db7\nmov     eax, [rbx+698h]                                                ; +0x1fc, 0x140217dbc\nmov     [rsp+0E8h+var_C0], eax                                         ; +0x202, 0x140217dc2\nmov     eax, [rbx+39Ch]                                                ; +0x206, 0x140217dc6\nmov     [rsp+0E8h+var_C8], eax                                         ; +0x20c, 0x140217dcc\nmov     r8, r14                                                        ; +0x210, 0x140217dd0\nmov     rcx, [rbp+950h]                                                ; +0x213, 0x140217dd3\ncall    GJEffectManager__createKeyframeCommand                         ; +0x21a, 0x140217dda\nmov     rcx, 0CBF29CE484222325h                                        ; +0x21f, 0x140217ddf\nadd     rdi, 8                                                         ; +0x229, 0x140217de9\ncmp     rdi, r15                                                       ; +0x22d, 0x140217ded\njbe     loc_140217C60                                                  ; +0x230, 0x140217df0\nlea     rcx, [rsp+0E8h+var_50]                                         ; +0x236, 0x140217df6\ncall    sub_14005D100                                                  ; +0x23e, 0x140217dfe\nlea     rcx, [rsp+0E8h+var_60]                                         ; +0x243, 0x140217e03\ncall    sub_14005D870                                                  ; +0x24b, 0x140217e0b\nlea     r11, [rsp+0E8h+var_28]                                         ; +0x250, 0x140217e10\nmov     rbx, [r11+30h]                                                 ; +0x258, 0x140217e18\nmov     rbp, [r11+40h]                                                 ; +0x25c, 0x140217e1c\nmov     rsi, [r11+48h]                                                 ; +0x260, 0x140217e20\nmov     rsp, r11                                                       ; +0x264, 0x140217e24\npop     r15                                                            ; +0x267, 0x140217e27\npop     r14                                                            ; +0x269, 0x140217e29\npop     r13                                                            ; +0x26b, 0x140217e2b\npop     r12                                                            ; +0x26d, 0x140217e2d\npop     rdi                                                            ; +0x26f, 0x140217e2f\nretn                                                                   ; +0x270, 0x140217e30", "xrefs": ["EffectGameObject::triggerObject @ 0x1404a7578", "<???> @ 0x1406cd1e8"], "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"}