{"type": "func", "start": 5371596288, "end": 5371597136, "name": "KeyframeObject::setupSpline", "pseudocode": "// \n// KeyframeObject::setupSpline from 0x1402c0e00 to 0x1402c1150 (848 bytes)\n// \n// 2 xrefs:\n// > GJEffectManager::createKeyframeCommand @ 0x14025d90f\n// > <???> @ 0x1406d2984\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=12\nvoid KeyframeObject::setupSpline(KeyframeObject *a1, std::vector<KeyframeObject *> *a2)\n{\n  unsigned __int64 v4; // rsi\n  int v5; // edx\n  std::_Vector_val<std::_Simple_types<KeyframeObject *>>::pointer Myfirst; // r9\n  __int64 v7; // rcx\n  std::_Simple_types<KeyframeObject *>::value_type v8; // r8\n  double m_unk000; // xmm1_8\n  _QWORD *v10; // [rsp+20h] [rbp-E0h] BYREF\n  char *v11; // [rsp+28h] [rbp-D8h]\n  char *v12; // [rsp+30h] [rbp-D0h]\n  void *v13[2]; // [rsp+38h] [rbp-C8h] BYREF\n  char *v14; // [rsp+48h] [rbp-B8h]\n  __int128 v15; // [rsp+50h] [rbp-B0h] BYREF\n  __int64 v16; // [rsp+60h] [rbp-A0h]\n  __int128 v17; // [rsp+68h] [rbp-98h] BYREF\n  __int64 v18; // [rsp+78h] [rbp-88h]\n  __int128 v19; // [rsp+80h] [rbp-80h] BYREF\n  __int64 v20; // [rsp+90h] [rbp-70h]\n  __int128 v21; // [rsp+98h] [rbp-68h] BYREF\n  __int64 v22; // [rsp+A8h] [rbp-58h]\n  __int128 v23; // [rsp+B0h] [rbp-50h] BYREF\n  __int64 v24; // [rsp+C0h] [rbp-40h]\n  __int128 v25; // [rsp+C8h] [rbp-38h] BYREF\n  __int64 v26; // [rsp+D8h] [rbp-28h]\n  int v27; // [rsp+E8h] [rbp-18h]\n  int v28; // [rsp+ECh] [rbp-14h]\n  int v29; // [rsp+F0h] [rbp-10h]\n  __int128 v30; // [rsp+F8h] [rbp-8h]\n  char v31; // [rsp+108h] [rbp+8h]\n\n  v4 = a2->_Mypair._Myval2._Mylast - a2->_Mypair._Myval2._Myfirst;\n  if ( v4 >= 3 )\n  {\n    v15 = 0;\n    v16 = 0;\n    if ( v4 > 0x1FFFFFFFFFFFFFFFLL )\n      sub_140062A20(a1, a2);\n    *(_QWORD *)&v15 = sub_14003AA10(8 * v4);\n    v16 = 8 * v4 + v15;\n    memset((void *)v15, 0, 8 * v4);\n    *((_QWORD *)&v15 + 1) = v16;\n    v13[0] = sub_14003AA10(8 * v4);\n    v14 = (char *)v13[0] + 8 * v4;\n    memset(v13[0], 0, 8 * v4);\n    v13[1] = v14;\n    v10 = sub_14003AA10(8 * v4);\n    v12 = (char *)&v10[v4];\n    memset(v10, 0, 8 * v4);\n    v11 = v12;\n    v5 = 0;\n    Myfirst = a2->_Mypair._Myval2._Myfirst;\n    v7 = 0;\n    do\n    {\n      v8 = Myfirst[v7];\n      if ( v5 )\n      {\n        *(double *)(v7 * 8 + v15) = v8->m_unk188.x + *(double *)(v7 * 8 + v15 - 8);\n        *(double *)((char *)v13[0] + v7 * 8) = v8->m_unk188.y + *(double *)((char *)v13[0] + v7 * 8 - 8);\n        m_unk000 = Myfirst[v7 - 1]->m_unk000;\n        if ( m_unk000 < 0.00001 )\n          m_unk000 = 0.00001;\n        *(double *)&v10[v7] = m_unk000 + *(double *)&v10[v7 - 1];\n      }\n      else\n      {\n        *(_QWORD *)(v7 * 8 + v15) = 0;\n        *(_QWORD *)((char *)v13[0] + v7 * 8) = 0;\n        v10[v7] = 0;\n      }\n      ++v5;\n      ++v7;\n    }\n    while ( v5 < v4 );\n    v17 = 0;\n    v18 = 0;\n    v19 = 0;\n    v20 = 0;\n    v21 = 0;\n    v22 = 0;\n    v23 = 0;\n    v24 = 0;\n    v25 = 0;\n    v26 = 0;\n    v27 = 30;\n    v28 = 2;\n    v29 = 2;\n    v30 = 0;\n    v31 = 0;\n    sub_1404C5230(&v17, &v10, &v15, 30);\n    sub_1402C1150(&a1->m_spline1, &v17);\n    sub_14005D100((__int64)&v25);\n    sub_14005D100((__int64)&v23);\n    sub_14005D100((__int64)&v21);\n    sub_14005D100((__int64)&v19);\n    sub_14005D100((__int64)&v17);\n    v17 = 0;\n    v18 = 0;\n    v19 = 0;\n    v20 = 0;\n    v21 = 0;\n    v22 = 0;\n    v23 = 0;\n    v24 = 0;\n    v25 = 0;\n    v26 = 0;\n    v27 = 30;\n    v28 = 2;\n    v29 = 2;\n    v30 = 0;\n    v31 = 0;\n    sub_1404C5230(&v17, &v10, v13, 30);\n    sub_1402C1150(&a1->m_spline2, &v17);\n    sub_14005D100((__int64)&v25);\n    sub_14005D100((__int64)&v23);\n    sub_14005D100((__int64)&v21);\n    sub_14005D100((__int64)&v19);\n    sub_14005D100((__int64)&v17);\n    *(_QWORD *)&a1->m_unk170 = v10[((v11 - (char *)v10) >> 3) - 1];\n    sub_14005D100((__int64)&v10);\n    sub_14005D100((__int64)v13);\n    sub_14005D100((__int64)&v15);\n  }\n}", "assembly": "; \n; KeyframeObject::setupSpline from 0x1402c0e00 to 0x1402c1150 (848 bytes)\n; \n; 2 xrefs:\n; > GJEffectManager::createKeyframeCommand @ 0x14025d90f\n; > <???> @ 0x1406d2984\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-8+arg_0], rbx                                             ; +0x0, 0x1402c0e00\nmov     [rsp-8+arg_8], rsi                                             ; +0x5, 0x1402c0e05\nmov     [rsp-8+arg_10], rdi                                            ; +0xa, 0x1402c0e0a\nmov     [rsp-8+arg_18], r12                                            ; +0xf, 0x1402c0e0f\npush    rbp                                                            ; +0x14, 0x1402c0e14\npush    r14                                                            ; +0x15, 0x1402c0e15\npush    r15                                                            ; +0x17, 0x1402c0e17\nlea     rbp, [rsp-10h]                                                 ; +0x19, 0x1402c0e19\nsub     rsp, 110h                                                      ; +0x1e, 0x1402c0e1e\nmov     r14, rdx                                                       ; +0x25, 0x1402c0e25\nmov     r15, rcx                                                       ; +0x28, 0x1402c0e28\nmov     rsi, [rdx+8]                                                   ; +0x2b, 0x1402c0e2b\nsub     rsi, [rdx]                                                     ; +0x2f, 0x1402c0e2f\nsar     rsi, 3                                                         ; +0x32, 0x1402c0e32\ncmp     rsi, 3                                                         ; +0x36, 0x1402c0e36\njb      loc_1402C1129                                                  ; +0x3a, 0x1402c0e3a\nxorps   xmm0, xmm0                                                     ; +0x40, 0x1402c0e40\nmovdqu  [rsp+120h+var_D0], xmm0                                        ; +0x43, 0x1402c0e43\nxor     r12d, r12d                                                     ; +0x49, 0x1402c0e49\nmov     [rsp+120h+var_C0], r12                                         ; +0x4c, 0x1402c0e4c\nmov     rax, 1FFFFFFFFFFFFFFFh                                         ; +0x51, 0x1402c0e51\ncmp     rsi, rax                                                       ; +0x5b, 0x1402c0e5b\nja      loc_1402C114A                                                  ; +0x5e, 0x1402c0e5e\nlea     rdi, ds:0[rsi*8]                                               ; +0x64, 0x1402c0e64\nmov     rcx, rdi                                                       ; +0x6c, 0x1402c0e6c\ncall    sub_14003AA10                                                  ; +0x6f, 0x1402c0e6f\nmov     qword ptr [rsp+120h+var_D0], rax                               ; +0x74, 0x1402c0e74\nlea     rbx, [rdi+rax]                                                 ; +0x79, 0x1402c0e79\nmov     [rsp+120h+var_C0], rbx                                         ; +0x7d, 0x1402c0e7d\nmov     r8, rdi; Size                                                  ; +0x82, 0x1402c0e82\nxor     edx, edx; Val                                                  ; +0x85, 0x1402c0e85\nmov     rcx, rax; void *                                               ; +0x87, 0x1402c0e87\ncall    memset                                                         ; +0x8a, 0x1402c0e8a\nmov     qword ptr [rsp+120h+var_D0+8], rbx                             ; +0x8f, 0x1402c0e8f\nxorps   xmm0, xmm0                                                     ; +0x94, 0x1402c0e94\nmovdqu  [rsp+120h+var_E8], xmm0                                        ; +0x97, 0x1402c0e97\nmov     [rsp+120h+var_D8], r12                                         ; +0x9d, 0x1402c0e9d\nmov     rcx, rdi                                                       ; +0xa2, 0x1402c0ea2\ncall    sub_14003AA10                                                  ; +0xa5, 0x1402c0ea5\nmov     qword ptr [rsp+120h+var_E8], rax                               ; +0xaa, 0x1402c0eaa\nlea     rbx, [rdi+rax]                                                 ; +0xaf, 0x1402c0eaf\nmov     [rsp+120h+var_D8], rbx                                         ; +0xb3, 0x1402c0eb3\nmov     r8, rdi; Size                                                  ; +0xb8, 0x1402c0eb8\nxor     edx, edx; Val                                                  ; +0xbb, 0x1402c0ebb\nmov     rcx, rax; void *                                               ; +0xbd, 0x1402c0ebd\ncall    memset                                                         ; +0xc0, 0x1402c0ec0\nmov     qword ptr [rsp+120h+var_E8+8], rbx                             ; +0xc5, 0x1402c0ec5\nxorps   xmm0, xmm0                                                     ; +0xca, 0x1402c0eca\nmovdqu  [rsp+120h+var_100], xmm0                                       ; +0xcd, 0x1402c0ecd\nmov     [rsp+120h+var_F0], r12                                         ; +0xd3, 0x1402c0ed3\nmov     rcx, rdi                                                       ; +0xd8, 0x1402c0ed8\ncall    sub_14003AA10                                                  ; +0xdb, 0x1402c0edb\nmov     qword ptr [rsp+120h+var_100], rax                              ; +0xe0, 0x1402c0ee0\nlea     rbx, [rdi+rax]                                                 ; +0xe5, 0x1402c0ee5\nmov     [rsp+120h+var_F0], rbx                                         ; +0xe9, 0x1402c0ee9\nmov     r8, rdi; Size                                                  ; +0xee, 0x1402c0eee\nxor     edx, edx; Val                                                  ; +0xf1, 0x1402c0ef1\nmov     rcx, rax; void *                                               ; +0xf3, 0x1402c0ef3\ncall    memset                                                         ; +0xf6, 0x1402c0ef6\nmov     qword ptr [rsp+120h+var_100+8], rbx                            ; +0xfb, 0x1402c0efb\nmov     edx, r12d                                                      ; +0x100, 0x1402c0f00\nmov     r9, [r14]                                                      ; +0x103, 0x1402c0f03\nmov     ecx, r12d                                                      ; +0x106, 0x1402c0f06\nmovsd   xmm2, cs:qword_140622AE8                                       ; +0x109, 0x1402c0f09\nmov     r8, [rcx+r9]                                                   ; +0x111, 0x1402c0f11\nmov     rax, qword ptr [rsp+120h+var_D0]                               ; +0x115, 0x1402c0f15\ntest    edx, edx                                                       ; +0x11a, 0x1402c0f1a\njnz     short loc_1402C0F36                                            ; +0x11c, 0x1402c0f1c\nmov     [rcx+rax], r12                                                 ; +0x11e, 0x1402c0f1e\nmov     rax, qword ptr [rsp+120h+var_E8]                               ; +0x122, 0x1402c0f22\nmov     [rcx+rax], r12                                                 ; +0x127, 0x1402c0f27\nmov     rax, qword ptr [rsp+120h+var_100]                              ; +0x12b, 0x1402c0f2b\nmov     [rcx+rax], r12                                                 ; +0x130, 0x1402c0f30\njmp     short loc_1402C0F8B                                            ; +0x134, 0x1402c0f34\nmovss   xmm0, dword ptr [r8+188h]                                      ; +0x136, 0x1402c0f36\ncvtps2pd xmm0, xmm0                                                    ; +0x13f, 0x1402c0f3f\naddsd   xmm0, qword ptr [rcx+rax-8]                                    ; +0x142, 0x1402c0f42\nmovsd   qword ptr [rcx+rax], xmm0                                      ; +0x148, 0x1402c0f48\nmov     rax, qword ptr [rsp+120h+var_E8]                               ; +0x14d, 0x1402c0f4d\nmovss   xmm0, dword ptr [r8+18Ch]                                      ; +0x152, 0x1402c0f52\ncvtps2pd xmm0, xmm0                                                    ; +0x15b, 0x1402c0f5b\naddsd   xmm0, qword ptr [rcx+rax-8]                                    ; +0x15e, 0x1402c0f5e\nmovsd   qword ptr [rcx+rax], xmm0                                      ; +0x164, 0x1402c0f64\nmov     rax, [rcx+r9-8]                                                ; +0x169, 0x1402c0f69\nmovsd   xmm1, qword ptr [rax]                                          ; +0x16e, 0x1402c0f6e\ncomisd  xmm2, xmm1                                                     ; +0x172, 0x1402c0f72\njbe     short loc_1402C0F7B                                            ; +0x176, 0x1402c0f76\nmovaps  xmm1, xmm2                                                     ; +0x178, 0x1402c0f78\nmov     rax, qword ptr [rsp+120h+var_100]                              ; +0x17b, 0x1402c0f7b\naddsd   xmm1, qword ptr [rcx+rax-8]                                    ; +0x180, 0x1402c0f80\nmovsd   qword ptr [rcx+rax], xmm1                                      ; +0x186, 0x1402c0f86\ninc     edx                                                            ; +0x18b, 0x1402c0f8b\nadd     rcx, 8                                                         ; +0x18d, 0x1402c0f8d\nmovsxd  rax, edx                                                       ; +0x191, 0x1402c0f91\ncmp     rax, rsi                                                       ; +0x194, 0x1402c0f94\njb      loc_1402C0F11                                                  ; +0x197, 0x1402c0f97\nxorps   xmm0, xmm0                                                     ; +0x19d, 0x1402c0f9d\nmovdqu  [rsp+120h+var_B8], xmm0                                        ; +0x1a0, 0x1402c0fa0\nmov     [rsp+120h+var_A8], r12                                         ; +0x1a6, 0x1402c0fa6\nmovdqu  [rbp+20h+var_A0], xmm0                                         ; +0x1ab, 0x1402c0fab\nmov     [rbp+20h+var_90], r12                                          ; +0x1b0, 0x1402c0fb0\nmovdqu  [rbp+20h+var_88], xmm0                                         ; +0x1b4, 0x1402c0fb4\nmov     [rbp+20h+var_78], r12                                          ; +0x1b9, 0x1402c0fb9\nmovdqu  [rbp+20h+var_70], xmm0                                         ; +0x1bd, 0x1402c0fbd\nmov     [rbp+20h+var_60], r12                                          ; +0x1c2, 0x1402c0fc2\nmovdqu  [rbp+20h+var_58], xmm0                                         ; +0x1c6, 0x1402c0fc6\nmov     [rbp+20h+var_48], r12                                          ; +0x1cb, 0x1402c0fcb\nmov     [rbp+20h+var_38], 1Eh                                          ; +0x1cf, 0x1402c0fcf\nmov     [rbp+20h+var_34], 2                                            ; +0x1d6, 0x1402c0fd6\nmov     [rbp+20h+var_30], 2                                            ; +0x1dd, 0x1402c0fdd\nmovups  [rbp+20h+var_28], xmm0                                         ; +0x1e4, 0x1402c0fe4\nmov     [rbp+20h+var_18], 0                                            ; +0x1e8, 0x1402c0fe8\nmov     r9d, 1Eh                                                       ; +0x1ec, 0x1402c0fec\nlea     r8, [rsp+120h+var_D0]                                          ; +0x1f2, 0x1402c0ff2\nlea     rdx, [rsp+120h+var_100]                                        ; +0x1f7, 0x1402c0ff7\nlea     rcx, [rsp+120h+var_B8]                                         ; +0x1fc, 0x1402c0ffc\ncall    sub_1404C5230                                                  ; +0x201, 0x1402c1001\nnop                                                                    ; +0x206, 0x1402c1006\nlea     rcx, [r15+20h]                                                 ; +0x207, 0x1402c1007\nlea     rdx, [rsp+120h+var_B8]                                         ; +0x20b, 0x1402c100b\ncall    sub_1402C1150                                                  ; +0x210, 0x1402c1010\nlea     rcx, [rbp+20h+var_58]                                          ; +0x215, 0x1402c1015\ncall    sub_14005D100                                                  ; +0x219, 0x1402c1019\nlea     rcx, [rbp+20h+var_70]                                          ; +0x21e, 0x1402c101e\ncall    sub_14005D100                                                  ; +0x222, 0x1402c1022\nlea     rcx, [rbp+20h+var_88]                                          ; +0x227, 0x1402c1027\ncall    sub_14005D100                                                  ; +0x22b, 0x1402c102b\nlea     rcx, [rbp+20h+var_A0]                                          ; +0x230, 0x1402c1030\ncall    sub_14005D100                                                  ; +0x234, 0x1402c1034\nlea     rcx, [rsp+120h+var_B8]                                         ; +0x239, 0x1402c1039\ncall    sub_14005D100                                                  ; +0x23e, 0x1402c103e\nxorps   xmm0, xmm0                                                     ; +0x243, 0x1402c1043\nmovdqu  [rsp+120h+var_B8], xmm0                                        ; +0x246, 0x1402c1046\nmov     [rsp+120h+var_A8], r12                                         ; +0x24c, 0x1402c104c\nmovdqu  [rbp+20h+var_A0], xmm0                                         ; +0x251, 0x1402c1051\nmov     [rbp+20h+var_90], r12                                          ; +0x256, 0x1402c1056\nmovdqu  [rbp+20h+var_88], xmm0                                         ; +0x25a, 0x1402c105a\nmov     [rbp+20h+var_78], r12                                          ; +0x25f, 0x1402c105f\nmovdqu  [rbp+20h+var_70], xmm0                                         ; +0x263, 0x1402c1063\nmov     [rbp+20h+var_60], r12                                          ; +0x268, 0x1402c1068\nmovdqu  [rbp+20h+var_58], xmm0                                         ; +0x26c, 0x1402c106c\nmov     [rbp+20h+var_48], r12                                          ; +0x271, 0x1402c1071\nmov     [rbp+20h+var_38], 1Eh                                          ; +0x275, 0x1402c1075\nmov     [rbp+20h+var_34], 2                                            ; +0x27c, 0x1402c107c\nmov     [rbp+20h+var_30], 2                                            ; +0x283, 0x1402c1083\nmovups  [rbp+20h+var_28], xmm0                                         ; +0x28a, 0x1402c108a\nmov     [rbp+20h+var_18], 0                                            ; +0x28e, 0x1402c108e\nmov     r9d, 1Eh                                                       ; +0x292, 0x1402c1092\nlea     r8, [rsp+120h+var_E8]                                          ; +0x298, 0x1402c1098\nlea     rdx, [rsp+120h+var_100]                                        ; +0x29d, 0x1402c109d\nlea     rcx, [rsp+120h+var_B8]                                         ; +0x2a2, 0x1402c10a2\ncall    sub_1404C5230                                                  ; +0x2a7, 0x1402c10a7\nnop                                                                    ; +0x2ac, 0x1402c10ac\nlea     rcx, [r15+0C8h]                                                ; +0x2ad, 0x1402c10ad\nlea     rdx, [rsp+120h+var_B8]                                         ; +0x2b4, 0x1402c10b4\ncall    sub_1402C1150                                                  ; +0x2b9, 0x1402c10b9\nlea     rcx, [rbp+20h+var_58]                                          ; +0x2be, 0x1402c10be\ncall    sub_14005D100                                                  ; +0x2c2, 0x1402c10c2\nlea     rcx, [rbp+20h+var_70]                                          ; +0x2c7, 0x1402c10c7\ncall    sub_14005D100                                                  ; +0x2cb, 0x1402c10cb\nlea     rcx, [rbp+20h+var_88]                                          ; +0x2d0, 0x1402c10d0\ncall    sub_14005D100                                                  ; +0x2d4, 0x1402c10d4\nlea     rcx, [rbp+20h+var_A0]                                          ; +0x2d9, 0x1402c10d9\ncall    sub_14005D100                                                  ; +0x2dd, 0x1402c10dd\nlea     rcx, [rsp+120h+var_B8]                                         ; +0x2e2, 0x1402c10e2\ncall    sub_14005D100                                                  ; +0x2e7, 0x1402c10e7\nmov     rcx, qword ptr [rsp+120h+var_100+8]                            ; +0x2ec, 0x1402c10ec\nmov     rax, qword ptr [rsp+120h+var_100]                              ; +0x2f1, 0x1402c10f1\nsub     rcx, rax                                                       ; +0x2f6, 0x1402c10f6\nsar     rcx, 3                                                         ; +0x2f9, 0x1402c10f9\nmov     rax, [rax+rcx*8-8]                                             ; +0x2fd, 0x1402c10fd\nmov     [r15+170h], rax                                                ; +0x302, 0x1402c1102\nlea     rcx, [rsp+120h+var_100]                                        ; +0x309, 0x1402c1109\ncall    sub_14005D100                                                  ; +0x30e, 0x1402c110e\nnop                                                                    ; +0x313, 0x1402c1113\nlea     rcx, [rsp+120h+var_E8]                                         ; +0x314, 0x1402c1114\ncall    sub_14005D100                                                  ; +0x319, 0x1402c1119\nnop                                                                    ; +0x31e, 0x1402c111e\nlea     rcx, [rsp+120h+var_D0]                                         ; +0x31f, 0x1402c111f\ncall    sub_14005D100                                                  ; +0x324, 0x1402c1124\nlea     r11, [rsp+120h+var_10]                                         ; +0x329, 0x1402c1129\nmov     rbx, [r11+20h]                                                 ; +0x331, 0x1402c1131\nmov     rsi, [r11+28h]                                                 ; +0x335, 0x1402c1135\nmov     rdi, [r11+30h]                                                 ; +0x339, 0x1402c1139\nmov     r12, [r11+38h]                                                 ; +0x33d, 0x1402c113d\nmov     rsp, r11                                                       ; +0x341, 0x1402c1141\npop     r15                                                            ; +0x344, 0x1402c1144\npop     r14                                                            ; +0x346, 0x1402c1146\npop     rbp                                                            ; +0x348, 0x1402c1148\nretn                                                                   ; +0x349, 0x1402c1149\ncall    sub_140062A20                                                  ; +0x34a, 0x1402c114a\nalign 10h                                                              ; +0x34f, 0x1402c114f", "xrefs": ["GJEffectManager::createKeyframeCommand @ 0x14025d90f", "<???> @ 0x1406d2984"], "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"}