{"type": "func", "start": 6442518400, "end": 6442519033, "name": "cocos2d::ccDrawCardinalSpline", "pseudocode": "// \n// cocos2d::ccDrawCardinalSpline from 0x180010780 to 0x1800109f9 (633 bytes)\n// \n// 5 xrefs:\n// > cocos2d::ccDrawCatmullRom @ 0x180010a0b\n// > <???> @ 0x180132778\n// > <???> @ 0x1801327b4\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ae17c\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 cocos2d::ccDrawCardinalSpline(cocos2d *this, struct cocos2d::CCPointArray *a2, float a3)\n{\n  int v3; // r8d\n  float v4; // xmm1_4\n  float v6; // xmm10_4\n  int v7; // ebx\n  unsigned int v8; // r15d\n  _DWORD *v9; // r14\n  int v10; // esi\n  float v11; // xmm7_4\n  _DWORD *v12; // rbp\n  float v13; // xmm6_4\n  float v14; // xmm6_4\n  int v15; // xmm1_4\n  unsigned int v16; // edx\n  struct cocos2d::CCPoint v17; // [rsp+40h] [rbp-88h] BYREF\n  struct cocos2d::CCPoint v18; // [rsp+48h] [rbp-80h] BYREF\n  struct cocos2d::CCPoint v19; // [rsp+50h] [rbp-78h] BYREF\n  struct cocos2d::CCPoint v20; // [rsp+58h] [rbp-70h] BYREF\n  int v21; // [rsp+E8h] [rbp+20h] BYREF\n  int v22; // [rsp+ECh] [rbp+24h]\n\n  v6 = v4;\n  v7 = v3;\n  cocos2d::ccDrawInit(this);\n  v8 = v7 + 1;\n  v9 = operator new(saturated_mul((unsigned int)(v7 + 1), 8u));\n  v10 = 0;\n  v11 = 1.0 / (float)(int)cocos2d::CCPointArray::count((cocos2d::CCPointArray *)this);\n  if ( v7 != -1 )\n  {\n    v12 = v9;\n    do\n    {\n      v13 = (float)v10 / (float)v7;\n      if ( v13 == 1.0 )\n      {\n        v14 = 1.0;\n        cocos2d::CCPointArray::count((cocos2d::CCPointArray *)this);\n      }\n      else\n      {\n        v14 = (float)(v13 - (float)((float)(int)(float)(v13 / v11) * v11)) / v11;\n      }\n      cocos2d::CCPointArray::getControlPointAtIndex((cocos2d::CCPointArray *)this, (unsigned int)&v20);\n      cocos2d::CCPointArray::getControlPointAtIndex((cocos2d::CCPointArray *)this, (unsigned int)&v19);\n      cocos2d::CCPointArray::getControlPointAtIndex((cocos2d::CCPointArray *)this, (unsigned int)&v18);\n      cocos2d::CCPointArray::getControlPointAtIndex((cocos2d::CCPointArray *)this, (unsigned int)&v17);\n      cocos2d::ccCardinalSplineAt((cocos2d *)&v21, &v20, &v19, &v18, &v17, v6, v14);\n      ++v10;\n      v15 = v22;\n      *v12 = v21;\n      v12[1] = v15;\n      v12 += 2;\n    }\n    while ( v10 < v8 );\n  }\n  cocos2d::CCGLProgram::use((cocos2d::CCGLProgram *)qword_1801A8338);\n  cocos2d::CCGLProgram::setUniformsForBuiltins((cocos2d::CCGLProgram *)qword_1801A8338);\n  cocos2d::CCGLProgram::setUniformLocationWith4fv(\n    (cocos2d::CCGLProgram *)qword_1801A8338,\n    dword_1801A2B58,\n    &flt_1801A2B60,\n    1u);\n  cocos2d::ccGLEnableVertexAttribs((cocos2d *)1, v16);\n  _glewVertexAttribPointer(0, 2, 5126);\n  glDrawArrays(3u, 0, v8);\n  if ( v9 )\n    j_j_free_0(v9);\n  ++g_uNumberOfDraws;\n}", "assembly": "; \n; cocos2d::ccDrawCardinalSpline from 0x180010780 to 0x1800109f9 (633 bytes)\n; \n; 5 xrefs:\n; > cocos2d::ccDrawCatmullRom @ 0x180010a0b\n; > <???> @ 0x180132778\n; > <???> @ 0x1801327b4\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ae17c\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     rax, rsp                                                       ; +0x0, 0x180010780\npush    r14                                                            ; +0x3, 0x180010783\nsub     rsp, 0C0h                                                      ; +0x5, 0x180010785\nmov     [rax+8], rbx                                                   ; +0xc, 0x18001078c\nmov     [rax+18h], rsi                                                 ; +0x10, 0x180010790\nmov     [rax-10h], rdi                                                 ; +0x14, 0x180010794\nmov     rdi, rcx                                                       ; +0x18, 0x180010798\nmov     [rax-18h], r15                                                 ; +0x1b, 0x18001079b\nmovaps  xmmword ptr [rax-38h], xmm7                                    ; +0x1f, 0x18001079f\nmovaps  xmmword ptr [rax-48h], xmm8                                    ; +0x23, 0x1800107a3\nmovaps  xmmword ptr [rax-68h], xmm10                                   ; +0x28, 0x1800107a8\nmovaps  xmm10, xmm1                                                    ; +0x2d, 0x1800107ad\nmov     ebx, r8d                                                       ; +0x31, 0x1800107b1\ncall    ?ccDrawInit@cocos2d@@YAXXZ_0; cocos2d::ccDrawInit(void)        ; +0x34, 0x1800107b4\nmov     rcx, 0FFFFFFFFFFFFFFFFh                                        ; +0x39, 0x1800107b9\nlea     r15d, [rbx+1]                                                  ; +0x40, 0x1800107c0\nmov     edx, r15d                                                      ; +0x44, 0x1800107c4\nmov     eax, 8                                                         ; +0x47, 0x1800107c7\nmul     rdx                                                            ; +0x4c, 0x1800107cc\ncmovo   rax, rcx                                                       ; +0x4f, 0x1800107cf\nmov     rcx, rax; Size                                                 ; +0x53, 0x1800107d3\ncall    j_??2@YAPEAX_K@Z; operator new(unsigned __int64)               ; +0x56, 0x1800107d6\nmov     rcx, rdi; this                                                 ; +0x5b, 0x1800107db\nmov     r14, rax                                                       ; +0x5e, 0x1800107de\ncall    ?count@CCPointArray@cocos2d@@QEAAIXZ; cocos2d::CCPointArray::count(void) ; +0x61, 0x1800107e1\nmovss   xmm8, cs:flt_1800E61A8                                         ; +0x66, 0x1800107e6\nxorps   xmm0, xmm0                                                     ; +0x6f, 0x1800107ef\nmov     ecx, eax                                                       ; +0x72, 0x1800107f2\nxor     esi, esi                                                       ; +0x74, 0x1800107f4\nmovaps  xmm7, xmm8                                                     ; +0x76, 0x1800107f6\ncvtsi2ss xmm0, rcx                                                     ; +0x7a, 0x1800107fa\ndivss   xmm7, xmm0                                                     ; +0x7f, 0x1800107ff\ntest    r15d, r15d                                                     ; +0x83, 0x180010803\njz      loc_180010931                                                  ; +0x86, 0x180010806\nmov     [rsp+0C8h+arg_8], rbp                                          ; +0x8c, 0x18001080c\nmov     rbp, r14                                                       ; +0x94, 0x180010814\nmovaps  [rsp+0C8h+var_28], xmm6                                        ; +0x97, 0x180010817\nmovaps  [rsp+0C8h+var_58], xmm9                                        ; +0x9f, 0x18001081f\nxorps   xmm9, xmm9                                                     ; +0xa5, 0x180010825\ncvtsi2ss xmm9, rbx                                                     ; +0xa9, 0x180010829\nxchg    ax, ax                                                         ; +0xae, 0x18001082e\nxorps   xmm6, xmm6                                                     ; +0xb0, 0x180010830\nmov     eax, esi                                                       ; +0xb3, 0x180010833\ncvtsi2ss xmm6, rax                                                     ; +0xb5, 0x180010835\ndivss   xmm6, xmm9                                                     ; +0xba, 0x18001083a\nucomiss xmm6, xmm8                                                     ; +0xbf, 0x18001083f\njp      short loc_180010858                                            ; +0xc3, 0x180010843\njnz     short loc_180010858                                            ; +0xc5, 0x180010845\nmov     rcx, rdi; this                                                 ; +0xc7, 0x180010847\ncall    ?count@CCPointArray@cocos2d@@QEAAIXZ; cocos2d::CCPointArray::count(void) ; +0xca, 0x18001084a\nmovaps  xmm6, xmm8                                                     ; +0xcf, 0x18001084f\nlea     ebx, [rax-1]                                                   ; +0xd3, 0x180010853\njmp     short loc_18001087A                                            ; +0xd6, 0x180010856\nmovaps  xmm0, xmm6                                                     ; +0xd8, 0x180010858\ndivss   xmm0, xmm7                                                     ; +0xdb, 0x18001085b\ncvttss2si rbx, xmm0                                                    ; +0xdf, 0x18001085f\nxorps   xmm0, xmm0                                                     ; +0xe4, 0x180010864\nmov     eax, ebx                                                       ; +0xe7, 0x180010867\ncvtsi2ss xmm0, rax                                                     ; +0xe9, 0x180010869\nmulss   xmm0, xmm7                                                     ; +0xee, 0x18001086e\nsubss   xmm6, xmm0                                                     ; +0xf2, 0x180010872\ndivss   xmm6, xmm7                                                     ; +0xf6, 0x180010876\nlea     r8d, [rbx-1]                                                   ; +0xfa, 0x18001087a\nmov     rcx, rdi                                                       ; +0xfe, 0x18001087e\nlea     rdx, [rsp+0C8h+var_70]                                         ; +0x101, 0x180010881\ncall    ?getControlPointAtIndex@CCPointArray@cocos2d@@QEAA?AVCCPoint@2@I@Z; cocos2d::CCPointArray::getControlPointAtIndex(uint) ; +0x106, 0x180010886\nmov     r8d, ebx                                                       ; +0x10b, 0x18001088b\nlea     rdx, [rsp+0C8h+var_78]                                         ; +0x10e, 0x18001088e\nmov     rcx, rdi                                                       ; +0x113, 0x180010893\ncall    ?getControlPointAtIndex@CCPointArray@cocos2d@@QEAA?AVCCPoint@2@I@Z; cocos2d::CCPointArray::getControlPointAtIndex(uint) ; +0x116, 0x180010896\nlea     r8d, [rbx+1]                                                   ; +0x11b, 0x18001089b\nmov     rcx, rdi                                                       ; +0x11f, 0x18001089f\nlea     rdx, [rsp+0C8h+var_80]                                         ; +0x122, 0x1800108a2\ncall    ?getControlPointAtIndex@CCPointArray@cocos2d@@QEAA?AVCCPoint@2@I@Z; cocos2d::CCPointArray::getControlPointAtIndex(uint) ; +0x127, 0x1800108a7\nlea     r8d, [rbx+2]                                                   ; +0x12c, 0x1800108ac\nmov     rcx, rdi                                                       ; +0x130, 0x1800108b0\nlea     rdx, [rsp+0C8h+var_88]                                         ; +0x133, 0x1800108b3\ncall    ?getControlPointAtIndex@CCPointArray@cocos2d@@QEAA?AVCCPoint@2@I@Z; cocos2d::CCPointArray::getControlPointAtIndex(uint) ; +0x138, 0x1800108b8\nmovss   [rsp+0C8h+var_98], xmm6                                        ; +0x13d, 0x1800108bd\nlea     rax, [rsp+0C8h+var_88]                                         ; +0x143, 0x1800108c3\nmovss   dword ptr [rsp+0C8h+var_A0], xmm10                             ; +0x148, 0x1800108c8\nlea     r9, [rsp+0C8h+var_80]                                          ; +0x14f, 0x1800108cf\nlea     r8, [rsp+0C8h+var_78]                                          ; +0x154, 0x1800108d4\nmov     [rsp+0C8h+var_A8], rax                                         ; +0x159, 0x1800108d9\nlea     rdx, [rsp+0C8h+var_70]                                         ; +0x15e, 0x1800108de\nlea     rcx, [rsp+0C8h+arg_18]                                         ; +0x163, 0x1800108e3\ncall    ?ccCardinalSplineAt@cocos2d@@YA?AVCCPoint@1@AEAV21@000MM@Z; cocos2d::ccCardinalSplineAt(cocos2d::CCPoint &,cocos2d::CCPoint &,cocos2d::CCPoint &,cocos2d::CCPoint &,float,float) ; +0x16b, 0x1800108eb\nmovss   xmm0, [rsp+0C8h+arg_18]                                        ; +0x170, 0x1800108f0\ninc     esi                                                            ; +0x179, 0x1800108f9\nmovss   xmm1, [rsp+0C8h+arg_1C]                                        ; +0x17b, 0x1800108fb\nmovss   dword ptr [rbp+0], xmm0                                        ; +0x184, 0x180010904\nmovss   dword ptr [rbp+4], xmm1                                        ; +0x189, 0x180010909\nadd     rbp, 8                                                         ; +0x18e, 0x18001090e\ncmp     esi, r15d                                                      ; +0x192, 0x180010912\njb      loc_180010830                                                  ; +0x195, 0x180010915\nmovaps  xmm9, [rsp+0C8h+var_58]                                        ; +0x19b, 0x18001091b\nmovaps  xmm6, [rsp+0C8h+var_28]                                        ; +0x1a1, 0x180010921\nmov     rbp, [rsp+0C8h+arg_8]                                          ; +0x1a9, 0x180010929\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x1b1, 0x180010931\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x1b8, 0x180010938\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x1bd, 0x18001093d\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x1c4, 0x180010944\nmov     edx, cs:dword_1801A2B58; int                                   ; +0x1c9, 0x180010949\nlea     r8, flt_1801A2B60; float *                                     ; +0x1cf, 0x18001094f\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x1d6, 0x180010956\nmov     r9d, 1; unsigned int                                           ; +0x1dd, 0x18001095d\ncall    ?setUniformLocationWith4fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWith4fv(int,float *,uint) ; +0x1e3, 0x180010963\nmov     ecx, 1; this                                                   ; +0x1e8, 0x180010968\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x1ed, 0x18001096d\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x1f2, 0x180010972\nxor     r9d, r9d                                                       ; +0x1f9, 0x180010979\nmov     [rsp+0C8h+var_A0], r14                                         ; +0x1fc, 0x18001097c\nxor     ecx, ecx                                                       ; +0x201, 0x180010981\nmov     r8d, 1406h                                                     ; +0x203, 0x180010983\nmov     dword ptr [rsp+0C8h+var_A8], 0                                 ; +0x209, 0x180010989\nlea     edx, [r9+2]                                                    ; +0x211, 0x180010991\ncall    qword ptr [rax]                                                ; +0x215, 0x180010995\nxor     edx, edx; first                                                ; +0x217, 0x180010997\nmov     r8d, r15d; count                                               ; +0x219, 0x180010999\nlea     ecx, [rdx+3]; mode                                             ; +0x21c, 0x18001099c\ncall    cs:glDrawArrays                                                ; +0x21f, 0x18001099f\nmovaps  xmm10, [rsp+0C8h+var_68]                                       ; +0x225, 0x1800109a5\nmovaps  xmm8, [rsp+0C8h+var_48]                                        ; +0x22b, 0x1800109ab\nmovaps  xmm7, [rsp+0C8h+var_38]                                        ; +0x234, 0x1800109b4\nmov     r15, [rsp+0C8h+var_18]                                         ; +0x23c, 0x1800109bc\nmov     rdi, [rsp+0C8h+var_10]                                         ; +0x244, 0x1800109c4\nmov     rsi, [rsp+0C8h+arg_10]                                         ; +0x24c, 0x1800109cc\nmov     rbx, [rsp+0C8h+arg_0]                                          ; +0x254, 0x1800109d4\ntest    r14, r14                                                       ; +0x25c, 0x1800109dc\njz      short loc_1800109E9                                            ; +0x25f, 0x1800109df\nmov     rcx, r14; Block                                                ; +0x261, 0x1800109e1\ncall    j_j_free_0                                                     ; +0x264, 0x1800109e4\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x269, 0x1800109e9\nadd     rsp, 0C0h                                                      ; +0x26f, 0x1800109ef\npop     r14                                                            ; +0x276, 0x1800109f6\nretn                                                                   ; +0x278, 0x1800109f8", "xrefs": ["cocos2d::ccDrawCatmullRom @ 0x180010a0b", "<???> @ 0x180132778", "<???> @ 0x1801327b4", "<???> @ 0x1801438a8", "<???> @ 0x1801ae17c"], "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"}