{"type": "func", "start": 6442518848, "end": 6442519488, "name": "cocos2d::ccDrawCardinalSpline", "pseudocode": "// \n// cocos2d::ccDrawCardinalSpline from 0x180010940 to 0x180010bc0 (640 bytes)\n// \n// 5 xrefs:\n// > cocos2d::ccDrawCatmullRom @ 0x180010bcb\n// > <???> @ 0x18013b698\n// > <???> @ 0x18013b6d4\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801b8230\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:21:22 +0000\n// \n\nvoid __fastcall cocos2d::ccDrawCardinalSpline(cocos2d *this, struct cocos2d::CCPointArray *a2, float a3)\n{\n  int v3; // r8d\n  int v4; // xmm1_4\n  int 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; // xmm9_4\n  float v14; // xmm6_4\n  float v15; // xmm6_4\n  unsigned int v16; // ebx\n  int v17; // xmm1_4\n  unsigned int v18; // edx\n  _BYTE v19[8]; // [rsp+40h] [rbp-88h] BYREF\n  _BYTE v20[8]; // [rsp+48h] [rbp-80h] BYREF\n  _BYTE v21[8]; // [rsp+50h] [rbp-78h] BYREF\n  _BYTE v22[8]; // [rsp+58h] [rbp-70h] BYREF\n  int v23; // [rsp+E8h] [rbp+20h] BYREF\n  int v24; // [rsp+ECh] [rbp+24h]\n\n  v6 = v4;\n  v7 = v3;\n  cocos2d::ccDrawInit(this);\n  v8 = v7 + 1;\n  v9 = (_DWORD *)sub_1800E4C6C(saturated_mul((unsigned int)(v7 + 1), 8u));\n  v10 = 0;\n  v11 = 1.0 / (float)(int)cocos2d::CCPointArray::count(this);\n  if ( v7 != -1 )\n  {\n    v12 = v9;\n    v13 = (float)v7;\n    do\n    {\n      v14 = (float)v10 / v13;\n      if ( v14 == 1.0 )\n      {\n        v15 = 1.0;\n        v16 = cocos2d::CCPointArray::count(this) - 1;\n      }\n      else\n      {\n        v16 = (int)(float)(v14 / v11);\n        v15 = (float)(v14 - (float)((float)(int)v16 * v11)) / v11;\n      }\n      cocos2d::CCPointArray::getControlPointAtIndex(this, v22, v16 - 1);\n      cocos2d::CCPointArray::getControlPointAtIndex(this, v21, v16);\n      cocos2d::CCPointArray::getControlPointAtIndex(this, v20, v16 + 1);\n      cocos2d::CCPointArray::getControlPointAtIndex(this, v19, v16 + 2);\n      cocos2d::ccCardinalSplineAt(&v23, v22, v21, v20, v19, v6, LODWORD(v15));\n      ++v10;\n      v17 = v24;\n      *v12 = v23;\n      v12[1] = v17;\n      v12 += 2;\n    }\n    while ( v10 < v8 );\n  }\n  cocos2d::CCGLProgram::use(qword_1801B2358);\n  cocos2d::CCGLProgram::setUniformsForBuiltins(qword_1801B2358);\n  cocos2d::CCGLProgram::setUniformLocationWith4fv(qword_1801B2358, dword_1801ACB58, &flt_1801ACB60, 1u);\n  cocos2d::ccGLEnableVertexAttribs((cocos2d *)1, v18);\n  _glewVertexAttribPointer(0, 2, 5126, 0, 0, v9);\n  glDrawArrays(3u, 0, v8);\n  if ( v9 )\n    j_j_free_0(v9);\n  ++g_uNumberOfDraws;\n}", "assembly": "; \n; cocos2d::ccDrawCardinalSpline from 0x180010940 to 0x180010bc0 (640 bytes)\n; \n; 5 xrefs:\n; > cocos2d::ccDrawCatmullRom @ 0x180010bcb\n; > <???> @ 0x18013b698\n; > <???> @ 0x18013b6d4\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801b8230\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:21:22 +0000\n; \nmov     rax, rsp                                                       ; +0x0, 0x180010940\npush    r14                                                            ; +0x3, 0x180010943\nsub     rsp, 0C0h                                                      ; +0x5, 0x180010945\nmov     [rax+8], rbx                                                   ; +0xc, 0x18001094c\nmov     [rax+18h], rsi                                                 ; +0x10, 0x180010950\nmov     [rax-10h], rdi                                                 ; +0x14, 0x180010954\nmov     rdi, rcx                                                       ; +0x18, 0x180010958\nmov     [rax-18h], r15                                                 ; +0x1b, 0x18001095b\nmovaps  xmmword ptr [rax-38h], xmm7                                    ; +0x1f, 0x18001095f\nmovaps  xmmword ptr [rax-48h], xmm8                                    ; +0x23, 0x180010963\nmovaps  xmmword ptr [rax-68h], xmm10                                   ; +0x28, 0x180010968\nmovaps  xmm10, xmm1                                                    ; +0x2d, 0x18001096d\nmov     ebx, r8d                                                       ; +0x31, 0x180010971\ncall    ?ccDrawInit@cocos2d@@YAXXZ_0; cocos2d::ccDrawInit(void)        ; +0x34, 0x180010974\nmov     rcx, 0FFFFFFFFFFFFFFFFh                                        ; +0x39, 0x180010979\nlea     r15d, [rbx+1]                                                  ; +0x40, 0x180010980\nmov     edx, r15d                                                      ; +0x44, 0x180010984\nmov     eax, 8                                                         ; +0x47, 0x180010987\nmul     rdx                                                            ; +0x4c, 0x18001098c\ncmovb   rax, rcx                                                       ; +0x4f, 0x18001098f\nmov     rcx, rax; Size                                                 ; +0x53, 0x180010993\ncall    sub_1800E4C6C                                                  ; +0x56, 0x180010996\nmov     rcx, rdi; this                                                 ; +0x5b, 0x18001099b\nmov     r14, rax                                                       ; +0x5e, 0x18001099e\ncall    ?count@CCPointArray@cocos2d@@QEAAIXZ; cocos2d::CCPointArray::count(void) ; +0x61, 0x1800109a1\nmovss   xmm8, cs:flt_1800EC208                                         ; +0x66, 0x1800109a6\nxorps   xmm0, xmm0                                                     ; +0x6f, 0x1800109af\nmov     ecx, eax                                                       ; +0x72, 0x1800109b2\nxor     esi, esi                                                       ; +0x74, 0x1800109b4\nmovaps  xmm7, xmm8                                                     ; +0x76, 0x1800109b6\ncvtsi2ss xmm0, rcx                                                     ; +0x7a, 0x1800109ba\ndivss   xmm7, xmm0                                                     ; +0x7f, 0x1800109bf\ntest    r15d, r15d                                                     ; +0x83, 0x1800109c3\njz      loc_180010AF1                                                  ; +0x86, 0x1800109c6\nmov     [rsp+0C8h+arg_8], rbp                                          ; +0x8c, 0x1800109cc\nmov     rbp, r14                                                       ; +0x94, 0x1800109d4\nmovaps  [rsp+0C8h+var_28], xmm6                                        ; +0x97, 0x1800109d7\nmovaps  [rsp+0C8h+var_58], xmm9                                        ; +0x9f, 0x1800109df\nxorps   xmm9, xmm9                                                     ; +0xa5, 0x1800109e5\ncvtsi2ss xmm9, rbx                                                     ; +0xa9, 0x1800109e9\nxchg    ax, ax                                                         ; +0xae, 0x1800109ee\nxorps   xmm6, xmm6                                                     ; +0xb0, 0x1800109f0\nmov     eax, esi                                                       ; +0xb3, 0x1800109f3\ncvtsi2ss xmm6, rax                                                     ; +0xb5, 0x1800109f5\ndivss   xmm6, xmm9                                                     ; +0xba, 0x1800109fa\nucomiss xmm6, xmm8                                                     ; +0xbf, 0x1800109ff\njp      short loc_180010A18                                            ; +0xc3, 0x180010a03\njnz     short loc_180010A18                                            ; +0xc5, 0x180010a05\nmov     rcx, rdi; this                                                 ; +0xc7, 0x180010a07\ncall    ?count@CCPointArray@cocos2d@@QEAAIXZ; cocos2d::CCPointArray::count(void) ; +0xca, 0x180010a0a\nmovaps  xmm6, xmm8                                                     ; +0xcf, 0x180010a0f\nlea     ebx, [rax-1]                                                   ; +0xd3, 0x180010a13\njmp     short loc_180010A3A                                            ; +0xd6, 0x180010a16\nmovaps  xmm0, xmm6                                                     ; +0xd8, 0x180010a18\ndivss   xmm0, xmm7                                                     ; +0xdb, 0x180010a1b\ncvttss2si rbx, xmm0                                                    ; +0xdf, 0x180010a1f\nxorps   xmm0, xmm0                                                     ; +0xe4, 0x180010a24\nmov     eax, ebx                                                       ; +0xe7, 0x180010a27\ncvtsi2ss xmm0, rax                                                     ; +0xe9, 0x180010a29\nmulss   xmm0, xmm7                                                     ; +0xee, 0x180010a2e\nsubss   xmm6, xmm0                                                     ; +0xf2, 0x180010a32\ndivss   xmm6, xmm7                                                     ; +0xf6, 0x180010a36\nlea     r8d, [rbx-1]                                                   ; +0xfa, 0x180010a3a\nmov     rcx, rdi                                                       ; +0xfe, 0x180010a3e\nlea     rdx, [rsp+0C8h+var_70]                                         ; +0x101, 0x180010a41\ncall    ?getControlPointAtIndex@CCPointArray@cocos2d@@QEAA?AVCCPoint@2@I@Z; cocos2d::CCPointArray::getControlPointAtIndex(uint) ; +0x106, 0x180010a46\nmov     r8d, ebx                                                       ; +0x10b, 0x180010a4b\nlea     rdx, [rsp+0C8h+var_78]                                         ; +0x10e, 0x180010a4e\nmov     rcx, rdi                                                       ; +0x113, 0x180010a53\ncall    ?getControlPointAtIndex@CCPointArray@cocos2d@@QEAA?AVCCPoint@2@I@Z; cocos2d::CCPointArray::getControlPointAtIndex(uint) ; +0x116, 0x180010a56\nlea     r8d, [rbx+1]                                                   ; +0x11b, 0x180010a5b\nmov     rcx, rdi                                                       ; +0x11f, 0x180010a5f\nlea     rdx, [rsp+0C8h+var_80]                                         ; +0x122, 0x180010a62\ncall    ?getControlPointAtIndex@CCPointArray@cocos2d@@QEAA?AVCCPoint@2@I@Z; cocos2d::CCPointArray::getControlPointAtIndex(uint) ; +0x127, 0x180010a67\nlea     r8d, [rbx+2]                                                   ; +0x12c, 0x180010a6c\nmov     rcx, rdi                                                       ; +0x130, 0x180010a70\nlea     rdx, [rsp+0C8h+var_88]                                         ; +0x133, 0x180010a73\ncall    ?getControlPointAtIndex@CCPointArray@cocos2d@@QEAA?AVCCPoint@2@I@Z; cocos2d::CCPointArray::getControlPointAtIndex(uint) ; +0x138, 0x180010a78\nmovss   [rsp+0C8h+var_98], xmm6                                        ; +0x13d, 0x180010a7d\nlea     rax, [rsp+0C8h+var_88]                                         ; +0x143, 0x180010a83\nmovss   dword ptr [rsp+0C8h+var_A0], xmm10                             ; +0x148, 0x180010a88\nlea     r9, [rsp+0C8h+var_80]                                          ; +0x14f, 0x180010a8f\nlea     r8, [rsp+0C8h+var_78]                                          ; +0x154, 0x180010a94\nmov     [rsp+0C8h+var_A8], rax                                         ; +0x159, 0x180010a99\nlea     rdx, [rsp+0C8h+var_70]                                         ; +0x15e, 0x180010a9e\nlea     rcx, [rsp+0C8h+arg_18]                                         ; +0x163, 0x180010aa3\ncall    ?ccCardinalSplineAt@cocos2d@@YA?AVCCPoint@1@AEAV21@000MM@Z; cocos2d::ccCardinalSplineAt(cocos2d::CCPoint &,cocos2d::CCPoint &,cocos2d::CCPoint &,cocos2d::CCPoint &,float,float) ; +0x16b, 0x180010aab\nmovss   xmm0, [rsp+0C8h+arg_18]                                        ; +0x170, 0x180010ab0\ninc     esi                                                            ; +0x179, 0x180010ab9\nmovss   xmm1, [rsp+0C8h+arg_1C]                                        ; +0x17b, 0x180010abb\nmovss   dword ptr [rbp+0], xmm0                                        ; +0x184, 0x180010ac4\nmovss   dword ptr [rbp+4], xmm1                                        ; +0x189, 0x180010ac9\nadd     rbp, 8                                                         ; +0x18e, 0x180010ace\ncmp     esi, r15d                                                      ; +0x192, 0x180010ad2\njb      loc_1800109F0                                                  ; +0x195, 0x180010ad5\nmovaps  xmm9, [rsp+0C8h+var_58]                                        ; +0x19b, 0x180010adb\nmovaps  xmm6, [rsp+0C8h+var_28]                                        ; +0x1a1, 0x180010ae1\nmov     rbp, [rsp+0C8h+arg_8]                                          ; +0x1a9, 0x180010ae9\nmov     rcx, cs:qword_1801B2358; this                                  ; +0x1b1, 0x180010af1\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x1b8, 0x180010af8\nmov     rcx, cs:qword_1801B2358; this                                  ; +0x1bd, 0x180010afd\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x1c4, 0x180010b04\nmov     edx, cs:dword_1801ACB58; int                                   ; +0x1c9, 0x180010b09\nlea     r8, flt_1801ACB60; float *                                     ; +0x1cf, 0x180010b0f\nmov     rcx, cs:qword_1801B2358; this                                  ; +0x1d6, 0x180010b16\nmov     r9d, 1; unsigned int                                           ; +0x1dd, 0x180010b1d\ncall    ?setUniformLocationWith4fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWith4fv(int,float *,uint) ; +0x1e3, 0x180010b23\nmov     ecx, 1; this                                                   ; +0x1e8, 0x180010b28\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x1ed, 0x180010b2d\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x1f2, 0x180010b32\nxor     r9d, r9d                                                       ; +0x1f9, 0x180010b39\nmov     [rsp+0C8h+var_A0], r14                                         ; +0x1fc, 0x180010b3c\nmov     edx, 2                                                         ; +0x201, 0x180010b41\nxor     ecx, ecx                                                       ; +0x206, 0x180010b46\nmov     dword ptr [rsp+0C8h+var_A8], 0                                 ; +0x208, 0x180010b48\nmov     r8d, 1406h                                                     ; +0x210, 0x180010b50\nmov     r10, [rax]                                                     ; +0x216, 0x180010b56\ncall    r10                                                            ; +0x219, 0x180010b59\nmov     r8d, r15d; count                                               ; +0x21c, 0x180010b5c\nxor     edx, edx; first                                                ; +0x21f, 0x180010b5f\nmov     ecx, 3; mode                                                   ; +0x221, 0x180010b61\ncall    cs:glDrawArrays                                                ; +0x226, 0x180010b66\nmovaps  xmm10, [rsp+0C8h+var_68]                                       ; +0x22c, 0x180010b6c\nmovaps  xmm8, [rsp+0C8h+var_48]                                        ; +0x232, 0x180010b72\nmovaps  xmm7, [rsp+0C8h+var_38]                                        ; +0x23b, 0x180010b7b\nmov     r15, [rsp+0C8h+var_18]                                         ; +0x243, 0x180010b83\nmov     rdi, [rsp+0C8h+var_10]                                         ; +0x24b, 0x180010b8b\nmov     rsi, [rsp+0C8h+arg_10]                                         ; +0x253, 0x180010b93\nmov     rbx, [rsp+0C8h+arg_0]                                          ; +0x25b, 0x180010b9b\ntest    r14, r14                                                       ; +0x263, 0x180010ba3\njz      short loc_180010BB0                                            ; +0x266, 0x180010ba6\nmov     rcx, r14; Block                                                ; +0x268, 0x180010ba8\ncall    j_j_free_0                                                     ; +0x26b, 0x180010bab\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x270, 0x180010bb0\nadd     rsp, 0C0h                                                      ; +0x276, 0x180010bb6\npop     r14                                                            ; +0x27d, 0x180010bbd\nretn                                                                   ; +0x27f, 0x180010bbf", "xrefs": ["cocos2d::ccDrawCatmullRom @ 0x180010bcb", "<???> @ 0x18013b698", "<???> @ 0x18013b6d4", "<???> @ 0x18014cf68", "<???> @ 0x1801b8230"], "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"}