{"type": "func", "start": 6442520384, "end": 6442521128, "name": "cocos2d::ccDrawCubicBezier", "pseudocode": "// \n// cocos2d::ccDrawCubicBezier from 0x180010f40 to 0x180011228 (744 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x1801326ec\n// > <???> @ 0x180132740\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ae23c\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::ccDrawCubicBezier(\n        cocos2d *this,\n        const struct cocos2d::CCPoint *a2,\n        const struct cocos2d::CCPoint *a3,\n        const struct cocos2d::CCPoint *a4,\n        const struct cocos2d::CCPoint *a5)\n{\n  unsigned int v8; // esi\n  GLsizei v9; // ebp\n  _DWORD *v10; // rax\n  _DWORD *v11; // rbx\n  float v12; // xmm10_4\n  __int64 v13; // rdi\n  __int64 v14; // r15\n  float v15; // xmm0_4\n  float *v16; // rsi\n  float v17; // xmm11_4\n  float v18; // xmm9_4\n  float v19; // xmm8_4\n  float v20; // xmm6_4\n  float v21; // xmm0_4\n  cocos2d::CCGLProgram *v22; // rcx\n  unsigned int v23; // edx\n  unsigned int v25; // [rsp+110h] [rbp+28h]\n\n  cocos2d::ccDrawInit(this);\n  v8 = (unsigned int)a5;\n  v25 = (_DWORD)a5 + 1;\n  v9 = v25;\n  v10 = operator new(saturated_mul(v25, 8u));\n  v11 = v10;\n  v12 = 0.0;\n  v13 = v8;\n  if ( v8 )\n  {\n    v14 = v8;\n    v15 = (float)(int)v8;\n    v16 = (float *)v10;\n    v17 = 1.0 / v15;\n    do\n    {\n      v18 = (float)(powf(1.0 - v12, 2.0) * 3.0) * v12;\n      v19 = (float)((float)((float)(1.0 - v12) * 3.0) * v12) * v12;\n      v20 = (float)(v12 * v12) * v12;\n      *v16 = (float)((float)((float)(powf(1.0 - v12, 3.0) * *(float *)this) + (float)(v18 * a2->x))\n                   + (float)(v19 * a3->x))\n           + (float)(v20 * a4->x);\n      v21 = powf(1.0 - v12, 3.0);\n      v12 = v12 + v17;\n      v16[1] = (float)((float)((float)(v21 * *((float *)this + 1)) + (float)(v18 * a2->y)) + (float)(v19 * a3->y))\n             + (float)(v20 * a4->y);\n      v16 += 2;\n      --v14;\n    }\n    while ( v14 );\n    v9 = v25;\n  }\n  v22 = (cocos2d::CCGLProgram *)qword_1801A8338;\n  v11[2 * v13] = LODWORD(a4->x);\n  v11[2 * v13 + 1] = LODWORD(a4->y);\n  cocos2d::CCGLProgram::use(v22);\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, v23);\n  _glewVertexAttribPointer(0, 2, 5126);\n  glDrawArrays(3u, 0, v9);\n  if ( v11 )\n    j_j_free_0(v11);\n  ++g_uNumberOfDraws;\n}", "assembly": "; \n; cocos2d::ccDrawCubicBezier from 0x180010f40 to 0x180011228 (744 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x1801326ec\n; > <???> @ 0x180132740\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ae23c\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, 0x180010f40\nmov     [rax+8], rcx                                                   ; +0x3, 0x180010f43\npush    rbx                                                            ; +0x7, 0x180010f47\nsub     rsp, 0E0h                                                      ; +0x8, 0x180010f48\nmov     [rax+10h], rbp                                                 ; +0xf, 0x180010f4f\nmov     [rax+18h], rsi                                                 ; +0x13, 0x180010f53\nmov     [rax+20h], rdi                                                 ; +0x17, 0x180010f57\nmov     [rax-10h], r12                                                 ; +0x1b, 0x180010f5b\nmov     r12, r8                                                        ; +0x1f, 0x180010f5f\nmov     [rax-18h], r13                                                 ; +0x22, 0x180010f62\nmov     r13, rdx                                                       ; +0x26, 0x180010f66\nmov     [rax-20h], r14                                                 ; +0x29, 0x180010f69\nmov     r14, r9                                                        ; +0x2d, 0x180010f6d\nmovaps  xmmword ptr [rax-78h], xmm10                                   ; +0x30, 0x180010f70\ncall    ?ccDrawInit@cocos2d@@YAXXZ_0; cocos2d::ccDrawInit(void)        ; +0x35, 0x180010f75\nmov     esi, dword ptr [rsp+0E8h+arg_20]                               ; +0x3a, 0x180010f7a\nmov     rcx, 0FFFFFFFFFFFFFFFFh                                        ; +0x41, 0x180010f81\nmov     eax, 8                                                         ; +0x48, 0x180010f88\nlea     ebp, [rsi+1]                                                   ; +0x4d, 0x180010f8d\nmov     r10d, ebp                                                      ; +0x50, 0x180010f90\nmul     r10                                                            ; +0x53, 0x180010f93\nmov     dword ptr [rsp+0E8h+arg_20], ebp                               ; +0x56, 0x180010f96\ncmovo   rax, rcx                                                       ; +0x5d, 0x180010f9d\nmov     rcx, rax; Size                                                 ; +0x61, 0x180010fa1\ncall    j_??2@YAPEAX_K@Z; operator new(unsigned __int64)               ; +0x64, 0x180010fa4\nmov     rbx, rax                                                       ; +0x69, 0x180010fa9\nxorps   xmm10, xmm10                                                   ; +0x6c, 0x180010fac\nmov     edi, esi                                                       ; +0x70, 0x180010fb0\ntest    esi, esi                                                       ; +0x72, 0x180010fb2\njz      loc_180011154                                                  ; +0x74, 0x180010fb4\nmov     rbp, [rsp+0E8h+arg_0]                                          ; +0x7a, 0x180010fba\nxorps   xmm0, xmm0                                                     ; +0x82, 0x180010fc2\nmov     [rsp+0E8h+var_28], r15                                         ; +0x85, 0x180010fc5\nmov     r15d, edi                                                      ; +0x8d, 0x180010fcd\nmovaps  [rsp+0E8h+var_38], xmm6                                        ; +0x90, 0x180010fd0\nmovaps  [rsp+0E8h+var_48], xmm7                                        ; +0x98, 0x180010fd8\nmovaps  [rsp+0E8h+var_58], xmm8                                        ; +0xa0, 0x180010fe0\nmovaps  [rsp+0E8h+var_68], xmm9                                        ; +0xa9, 0x180010fe9\nmovaps  [rsp+0E8h+var_88], xmm11                                       ; +0xb2, 0x180010ff2\nmovaps  [rsp+0E8h+var_98], xmm12                                       ; +0xb8, 0x180010ff8\nmovss   xmm12, cs:flt_1800E6700                                        ; +0xbe, 0x180010ffe\ncvtsi2ss xmm0, rsi                                                     ; +0xc7, 0x180011007\nmov     rsi, rax                                                       ; +0xcc, 0x18001100c\nmovaps  [rsp+0E8h+var_A8], xmm13                                       ; +0xcf, 0x18001100f\nmovss   xmm13, cs:flt_1800E61A8                                        ; +0xd5, 0x180011015\nmovaps  xmm11, xmm13                                                   ; +0xde, 0x18001101e\nmovaps  [rsp+0E8h+var_B8], xmm14                                       ; +0xe2, 0x180011022\nmovss   xmm14, cs:Y                                                    ; +0xe8, 0x180011028\ndivss   xmm11, xmm0                                                    ; +0xf1, 0x180011031\nnop     word ptr [rax+rax+00000000h]                                   ; +0xf6, 0x180011036\nmovaps  xmm7, xmm13                                                    ; +0x100, 0x180011040\nmovaps  xmm1, xmm14; Y                                                 ; +0x104, 0x180011044\nsubss   xmm7, xmm10                                                    ; +0x108, 0x180011048\nmovaps  xmm0, xmm7; X                                                  ; +0x10d, 0x18001104d\ncall    powf                                                           ; +0x110, 0x180011050\nmovaps  xmm9, xmm0                                                     ; +0x115, 0x180011055\nmovaps  xmm8, xmm7                                                     ; +0x119, 0x180011059\nmulss   xmm8, xmm12                                                    ; +0x11d, 0x18001105d\nmovaps  xmm6, xmm10                                                    ; +0x122, 0x180011062\nmulss   xmm9, xmm12                                                    ; +0x126, 0x180011066\nmovaps  xmm1, xmm12; Y                                                 ; +0x12b, 0x18001106b\nmulss   xmm6, xmm10                                                    ; +0x12f, 0x18001106f\nmovaps  xmm0, xmm7; X                                                  ; +0x134, 0x180011074\nmulss   xmm8, xmm10                                                    ; +0x137, 0x180011077\nmulss   xmm9, xmm10                                                    ; +0x13c, 0x18001107c\nmulss   xmm8, xmm10                                                    ; +0x141, 0x180011081\nmulss   xmm6, xmm10                                                    ; +0x146, 0x180011086\ncall    powf                                                           ; +0x14b, 0x18001108b\nmulss   xmm0, dword ptr [rbp+0]                                        ; +0x150, 0x180011090\nmovaps  xmm1, xmm9                                                     ; +0x155, 0x180011095\nmulss   xmm1, dword ptr [r13+0]                                        ; +0x159, 0x180011099\nmovaps  xmm2, xmm8                                                     ; +0x15f, 0x18001109f\nmulss   xmm2, dword ptr [r12]                                          ; +0x163, 0x1800110a3\naddss   xmm0, xmm1                                                     ; +0x169, 0x1800110a9\nmovaps  xmm1, xmm6                                                     ; +0x16d, 0x1800110ad\nmulss   xmm1, dword ptr [r14]                                          ; +0x170, 0x1800110b0\naddss   xmm0, xmm2                                                     ; +0x175, 0x1800110b5\naddss   xmm0, xmm1                                                     ; +0x179, 0x1800110b9\nmovaps  xmm1, xmm12; Y                                                 ; +0x17d, 0x1800110bd\nmovss   dword ptr [rsi], xmm0                                          ; +0x181, 0x1800110c1\nmovaps  xmm0, xmm7; X                                                  ; +0x185, 0x1800110c5\ncall    powf                                                           ; +0x188, 0x1800110c8\nmulss   xmm0, dword ptr [rbp+4]                                        ; +0x18d, 0x1800110cd\naddss   xmm10, xmm11                                                   ; +0x192, 0x1800110d2\nmulss   xmm9, dword ptr [r13+4]                                        ; +0x197, 0x1800110d7\nmulss   xmm8, dword ptr [r12+4]                                        ; +0x19d, 0x1800110dd\nmulss   xmm6, dword ptr [r14+4]                                        ; +0x1a4, 0x1800110e4\naddss   xmm0, xmm9                                                     ; +0x1aa, 0x1800110ea\naddss   xmm0, xmm8                                                     ; +0x1af, 0x1800110ef\naddss   xmm0, xmm6                                                     ; +0x1b4, 0x1800110f4\nmovss   dword ptr [rsi+4], xmm0                                        ; +0x1b8, 0x1800110f8\nadd     rsi, 8                                                         ; +0x1bd, 0x1800110fd\nsub     r15, 1                                                         ; +0x1c1, 0x180011101\njnz     loc_180011040                                                  ; +0x1c5, 0x180011105\nmovaps  xmm14, [rsp+0E8h+var_B8]                                       ; +0x1cb, 0x18001110b\nmovaps  xmm13, [rsp+0E8h+var_A8]                                       ; +0x1d1, 0x180011111\nmovaps  xmm12, [rsp+0E8h+var_98]                                       ; +0x1d7, 0x180011117\nmovaps  xmm11, [rsp+0E8h+var_88]                                       ; +0x1dd, 0x18001111d\nmovaps  xmm9, [rsp+0E8h+var_68]                                        ; +0x1e3, 0x180011123\nmovaps  xmm8, [rsp+0E8h+var_58]                                        ; +0x1ec, 0x18001112c\nmovaps  xmm7, [rsp+0E8h+var_48]                                        ; +0x1f5, 0x180011135\nmovaps  xmm6, [rsp+0E8h+var_38]                                        ; +0x1fd, 0x18001113d\nmov     r15, [rsp+0E8h+var_28]                                         ; +0x205, 0x180011145\nmov     ebp, dword ptr [rsp+0E8h+arg_20]                               ; +0x20d, 0x18001114d\nmov     eax, [r14]                                                     ; +0x214, 0x180011154\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x217, 0x180011157\nmov     [rbx+rdi*8], eax                                               ; +0x21e, 0x18001115e\nmov     eax, [r14+4]                                                   ; +0x221, 0x180011161\nmov     [rbx+rdi*8+4], eax                                             ; +0x225, 0x180011165\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x229, 0x180011169\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x22e, 0x18001116e\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x235, 0x180011175\nmov     edx, cs:dword_1801A2B58; int                                   ; +0x23a, 0x18001117a\nlea     r8, flt_1801A2B60; float *                                     ; +0x240, 0x180011180\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x247, 0x180011187\nmov     r9d, 1; unsigned int                                           ; +0x24e, 0x18001118e\ncall    ?setUniformLocationWith4fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWith4fv(int,float *,uint) ; +0x254, 0x180011194\nmov     ecx, 1; this                                                   ; +0x259, 0x180011199\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x25e, 0x18001119e\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x263, 0x1800111a3\nxor     r9d, r9d                                                       ; +0x26a, 0x1800111aa\nmov     [rsp+0E8h+var_C0], rbx                                         ; +0x26d, 0x1800111ad\nxor     ecx, ecx                                                       ; +0x272, 0x1800111b2\nmov     r8d, 1406h                                                     ; +0x274, 0x1800111b4\nmov     [rsp+0E8h+var_C8], 0                                           ; +0x27a, 0x1800111ba\nlea     edx, [r9+2]                                                    ; +0x282, 0x1800111c2\ncall    qword ptr [rax]                                                ; +0x286, 0x1800111c6\nxor     edx, edx; first                                                ; +0x288, 0x1800111c8\nmov     r8d, ebp; count                                                ; +0x28a, 0x1800111ca\nlea     ecx, [rdx+3]; mode                                             ; +0x28d, 0x1800111cd\ncall    cs:glDrawArrays                                                ; +0x290, 0x1800111d0\nmovaps  xmm10, [rsp+0E8h+var_78]                                       ; +0x296, 0x1800111d6\nmov     r14, [rsp+0E8h+var_20]                                         ; +0x29c, 0x1800111dc\nmov     r13, [rsp+0E8h+var_18]                                         ; +0x2a4, 0x1800111e4\nmov     r12, [rsp+0E8h+var_10]                                         ; +0x2ac, 0x1800111ec\nmov     rdi, [rsp+0E8h+arg_18]                                         ; +0x2b4, 0x1800111f4\nmov     rsi, [rsp+0E8h+arg_10]                                         ; +0x2bc, 0x1800111fc\nmov     rbp, [rsp+0E8h+arg_8]                                          ; +0x2c4, 0x180011204\ntest    rbx, rbx                                                       ; +0x2cc, 0x18001120c\njz      short loc_180011219                                            ; +0x2cf, 0x18001120f\nmov     rcx, rbx; Block                                                ; +0x2d1, 0x180011211\ncall    j_j_free_0                                                     ; +0x2d4, 0x180011214\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x2d9, 0x180011219\nadd     rsp, 0E0h                                                      ; +0x2df, 0x18001121f\npop     rbx                                                            ; +0x2e6, 0x180011226\nretn                                                                   ; +0x2e7, 0x180011227", "xrefs": ["<???> @ 0x1801326ec", "<???> @ 0x180132740", "<???> @ 0x1801438a8", "<???> @ 0x1801ae23c"], "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"}