{"type": "func", "start": 6442520832, "end": 6442521534, "name": "cocos2d::ccDrawCubicBezier", "pseudocode": "// \n// cocos2d::ccDrawCubicBezier from 0x180011100 to 0x1800113be (702 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x18013b614\n// > <???> @ 0x18013b660\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801b82f0\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::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  __int64 v10; // rax\n  _DWORD *v11; // rbx\n  float v12; // xmm8_4\n  __int64 v13; // rdi\n  __int64 v14; // r15\n  float v15; // xmm0_4\n  float *v16; // rsi\n  float v17; // xmm9_4\n  float v18; // xmm6_4\n  float v19; // xmm4_4\n  float v20; // xmm3_4\n  float v21; // xmm7_4\n  cocos2d::CCGLProgram *v22; // rcx\n  unsigned int v23; // edx\n  unsigned int v25; // [rsp+F0h] [rbp+28h]\n\n  cocos2d::ccDrawInit(this);\n  v8 = (unsigned int)a5;\n  v25 = (_DWORD)a5 + 1;\n  v9 = v25;\n  v10 = sub_1800E4C6C(saturated_mul(v25, 8u));\n  v11 = (_DWORD *)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 = powf(1.0 - v12, 3.0);\n      v19 = (float)(powf(1.0 - v12, 2.0) * 3.0) * v12;\n      v20 = (float)(v12 * v12) * v12;\n      v21 = (float)((float)((float)(1.0 - v12) * 3.0) * v12) * v12;\n      v12 = v12 + v17;\n      *v16 = (float)((float)((float)(v18 * *(float *)this) + (float)(v19 * *(float *)a2)) + (float)(v21 * *(float *)a3))\n           + (float)(v20 * *(float *)a4);\n      v16[1] = (float)((float)((float)(v19 * *((float *)a2 + 1)) + (float)(v18 * *((float *)this + 1)))\n                     + (float)(v21 * *((float *)a3 + 1)))\n             + (float)(v20 * *((float *)a4 + 1));\n      v16 += 2;\n      --v14;\n    }\n    while ( v14 );\n    v9 = v25;\n  }\n  v22 = qword_1801B2358;\n  v11[2 * v13] = *(_DWORD *)a4;\n  v11[2 * v13 + 1] = *((_DWORD *)a4 + 1);\n  cocos2d::CCGLProgram::use(v22);\n  cocos2d::CCGLProgram::setUniformsForBuiltins(qword_1801B2358);\n  cocos2d::CCGLProgram::setUniformLocationWith4fv(qword_1801B2358, dword_1801ACB58, &flt_1801ACB60, 1u);\n  cocos2d::ccGLEnableVertexAttribs((cocos2d *)1, v23);\n  _glewVertexAttribPointer(0, 2, 5126, 0, 0, v11);\n  glDrawArrays(3u, 0, v9);\n  if ( v11 )\n    j_j_free_0(v11);\n  ++g_uNumberOfDraws;\n}", "assembly": "; \n; cocos2d::ccDrawCubicBezier from 0x180011100 to 0x1800113be (702 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x18013b614\n; > <???> @ 0x18013b660\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801b82f0\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, 0x180011100\nmov     [rax+8], rcx                                                   ; +0x3, 0x180011103\npush    rbx                                                            ; +0x7, 0x180011107\nsub     rsp, 0C0h                                                      ; +0x8, 0x180011108\nmov     [rax+10h], rbp                                                 ; +0xf, 0x18001110f\nmov     [rax+18h], rsi                                                 ; +0x13, 0x180011113\nmov     [rax+20h], rdi                                                 ; +0x17, 0x180011117\nmov     [rax-10h], r12                                                 ; +0x1b, 0x18001111b\nmov     r12, r8                                                        ; +0x1f, 0x18001111f\nmov     [rax-18h], r13                                                 ; +0x22, 0x180011122\nmov     r13, rdx                                                       ; +0x26, 0x180011126\nmov     [rax-20h], r14                                                 ; +0x29, 0x180011129\nmov     r14, r9                                                        ; +0x2d, 0x18001112d\nmovaps  xmmword ptr [rax-58h], xmm8                                    ; +0x30, 0x180011130\ncall    ?ccDrawInit@cocos2d@@YAXXZ_0; cocos2d::ccDrawInit(void)        ; +0x35, 0x180011135\nmov     esi, dword ptr [rsp+0C8h+arg_20]                               ; +0x3a, 0x18001113a\nmov     rcx, 0FFFFFFFFFFFFFFFFh                                        ; +0x41, 0x180011141\nmov     eax, 8                                                         ; +0x48, 0x180011148\nlea     ebp, [rsi+1]                                                   ; +0x4d, 0x18001114d\nmov     r10d, ebp                                                      ; +0x50, 0x180011150\nmul     r10                                                            ; +0x53, 0x180011153\nmov     dword ptr [rsp+0C8h+arg_20], ebp                               ; +0x56, 0x180011156\ncmovb   rax, rcx                                                       ; +0x5d, 0x18001115d\nmov     rcx, rax; Size                                                 ; +0x61, 0x180011161\ncall    sub_1800E4C6C                                                  ; +0x64, 0x180011164\nmov     rbx, rax                                                       ; +0x69, 0x180011169\nxorps   xmm8, xmm8                                                     ; +0x6c, 0x18001116c\nmov     edi, esi                                                       ; +0x70, 0x180011170\ntest    esi, esi                                                       ; +0x72, 0x180011172\njz      loc_1800112E3                                                  ; +0x74, 0x180011174\nmov     rbp, [rsp+0C8h+arg_0]                                          ; +0x7a, 0x18001117a\nxorps   xmm0, xmm0                                                     ; +0x82, 0x180011182\nmov     [rsp+0C8h+var_28], r15                                         ; +0x85, 0x180011185\nmov     r15d, edi                                                      ; +0x8d, 0x18001118d\nmovaps  [rsp+0C8h+var_38], xmm6                                        ; +0x90, 0x180011190\nmovaps  [rsp+0C8h+var_48], xmm7                                        ; +0x98, 0x180011198\nmovaps  [rsp+0C8h+var_68], xmm9                                        ; +0xa0, 0x1800111a0\nmovaps  [rsp+0C8h+var_78], xmm10                                       ; +0xa6, 0x1800111a6\nmovss   xmm10, cs:flt_1800EC208                                        ; +0xac, 0x1800111ac\ncvtsi2ss xmm0, rsi                                                     ; +0xb5, 0x1800111b5\nmov     rsi, rax                                                       ; +0xba, 0x1800111ba\nmovaps  [rsp+0C8h+var_88], xmm11                                       ; +0xbd, 0x1800111bd\nmovaps  xmm9, xmm10                                                    ; +0xc3, 0x1800111c3\nmovss   xmm11, cs:Y                                                    ; +0xc7, 0x1800111c7\nmovaps  [rsp+0C8h+var_98], xmm12                                       ; +0xd0, 0x1800111d0\nmovss   xmm12, cs:X                                                    ; +0xd6, 0x1800111d6\ndivss   xmm9, xmm0                                                     ; +0xdf, 0x1800111df\nnop     dword ptr [rax+00h]                                            ; +0xe4, 0x1800111e4\nnop     dword ptr [rax+rax+00000000h]                                  ; +0xe8, 0x1800111e8\nmovaps  xmm7, xmm10                                                    ; +0xf0, 0x1800111f0\nmovaps  xmm1, xmm11; Y                                                 ; +0xf4, 0x1800111f4\nsubss   xmm7, xmm8                                                     ; +0xf8, 0x1800111f8\nmovaps  xmm0, xmm7; X                                                  ; +0xfd, 0x1800111fd\ncall    powf                                                           ; +0x100, 0x180011200\nmovaps  xmm6, xmm0                                                     ; +0x105, 0x180011205\nmovaps  xmm1, xmm12; Y                                                 ; +0x108, 0x180011208\nmovaps  xmm0, xmm7; X                                                  ; +0x10c, 0x18001120c\ncall    powf                                                           ; +0x10f, 0x18001120f\nmovaps  xmm4, xmm0                                                     ; +0x114, 0x180011214\nmulss   xmm7, xmm11                                                    ; +0x117, 0x180011217\nmulss   xmm4, xmm11                                                    ; +0x11c, 0x18001121c\nmovaps  xmm3, xmm8                                                     ; +0x121, 0x180011221\nmulss   xmm3, xmm8                                                     ; +0x125, 0x180011225\nmovaps  xmm2, xmm6                                                     ; +0x12a, 0x18001122a\nmulss   xmm2, dword ptr [rbp+0]                                        ; +0x12d, 0x18001122d\nmulss   xmm4, xmm8                                                     ; +0x132, 0x180011232\nmulss   xmm7, xmm8                                                     ; +0x137, 0x180011237\nmovaps  xmm0, xmm4                                                     ; +0x13c, 0x18001123c\nmulss   xmm3, xmm8                                                     ; +0x13f, 0x18001123f\nmulss   xmm0, dword ptr [r13+0]                                        ; +0x144, 0x180011244\nmulss   xmm7, xmm8                                                     ; +0x14a, 0x18001124a\naddss   xmm8, xmm9                                                     ; +0x14f, 0x18001124f\naddss   xmm2, xmm0                                                     ; +0x154, 0x180011254\nmovaps  xmm0, xmm3                                                     ; +0x158, 0x180011258\nmulss   xmm0, dword ptr [r14]                                          ; +0x15b, 0x18001125b\nmovaps  xmm1, xmm7                                                     ; +0x160, 0x180011260\nmulss   xmm1, dword ptr [r12]                                          ; +0x163, 0x180011263\naddss   xmm2, xmm1                                                     ; +0x169, 0x180011269\naddss   xmm2, xmm0                                                     ; +0x16d, 0x18001126d\nmovss   dword ptr [rsi], xmm2                                          ; +0x171, 0x180011271\nmulss   xmm4, dword ptr [r13+4]                                        ; +0x175, 0x180011275\nmulss   xmm6, dword ptr [rbp+4]                                        ; +0x17b, 0x18001127b\nmulss   xmm7, dword ptr [r12+4]                                        ; +0x180, 0x180011280\nmulss   xmm3, dword ptr [r14+4]                                        ; +0x187, 0x180011287\naddss   xmm4, xmm6                                                     ; +0x18d, 0x18001128d\naddss   xmm4, xmm7                                                     ; +0x191, 0x180011291\naddss   xmm4, xmm3                                                     ; +0x195, 0x180011295\nmovss   dword ptr [rsi+4], xmm4                                        ; +0x199, 0x180011299\nadd     rsi, 8                                                         ; +0x19e, 0x18001129e\nsub     r15, 1                                                         ; +0x1a2, 0x1800112a2\njnz     loc_1800111F0                                                  ; +0x1a6, 0x1800112a6\nmovaps  xmm12, [rsp+0C8h+var_98]                                       ; +0x1ac, 0x1800112ac\nmovaps  xmm11, [rsp+0C8h+var_88]                                       ; +0x1b2, 0x1800112b2\nmovaps  xmm10, [rsp+0C8h+var_78]                                       ; +0x1b8, 0x1800112b8\nmovaps  xmm9, [rsp+0C8h+var_68]                                        ; +0x1be, 0x1800112be\nmovaps  xmm7, [rsp+0C8h+var_48]                                        ; +0x1c4, 0x1800112c4\nmovaps  xmm6, [rsp+0C8h+var_38]                                        ; +0x1cc, 0x1800112cc\nmov     r15, [rsp+0C8h+var_28]                                         ; +0x1d4, 0x1800112d4\nmov     ebp, dword ptr [rsp+0C8h+arg_20]                               ; +0x1dc, 0x1800112dc\nmov     eax, [r14]                                                     ; +0x1e3, 0x1800112e3\nmov     rcx, cs:qword_1801B2358; this                                  ; +0x1e6, 0x1800112e6\nmov     [rbx+rdi*8], eax                                               ; +0x1ed, 0x1800112ed\nmov     eax, [r14+4]                                                   ; +0x1f0, 0x1800112f0\nmov     [rbx+rdi*8+4], eax                                             ; +0x1f4, 0x1800112f4\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x1f8, 0x1800112f8\nmov     rcx, cs:qword_1801B2358; this                                  ; +0x1fd, 0x1800112fd\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x204, 0x180011304\nmov     edx, cs:dword_1801ACB58; int                                   ; +0x209, 0x180011309\nlea     r8, flt_1801ACB60; float *                                     ; +0x20f, 0x18001130f\nmov     rcx, cs:qword_1801B2358; this                                  ; +0x216, 0x180011316\nmov     r9d, 1; unsigned int                                           ; +0x21d, 0x18001131d\ncall    ?setUniformLocationWith4fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWith4fv(int,float *,uint) ; +0x223, 0x180011323\nmov     ecx, 1; this                                                   ; +0x228, 0x180011328\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x22d, 0x18001132d\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x232, 0x180011332\nxor     r9d, r9d                                                       ; +0x239, 0x180011339\nmov     [rsp+0C8h+var_A0], rbx                                         ; +0x23c, 0x18001133c\nmov     edx, 2                                                         ; +0x241, 0x180011341\nxor     ecx, ecx                                                       ; +0x246, 0x180011346\nmov     [rsp+0C8h+var_A8], 0                                           ; +0x248, 0x180011348\nmov     r8d, 1406h                                                     ; +0x250, 0x180011350\nmov     r10, [rax]                                                     ; +0x256, 0x180011356\ncall    r10                                                            ; +0x259, 0x180011359\nmov     r8d, ebp; count                                                ; +0x25c, 0x18001135c\nxor     edx, edx; first                                                ; +0x25f, 0x18001135f\nmov     ecx, 3; mode                                                   ; +0x261, 0x180011361\ncall    cs:glDrawArrays                                                ; +0x266, 0x180011366\nmovaps  xmm8, [rsp+0C8h+var_58]                                        ; +0x26c, 0x18001136c\nmov     r14, [rsp+0C8h+var_20]                                         ; +0x272, 0x180011372\nmov     r13, [rsp+0C8h+var_18]                                         ; +0x27a, 0x18001137a\nmov     r12, [rsp+0C8h+var_10]                                         ; +0x282, 0x180011382\nmov     rdi, [rsp+0C8h+arg_18]                                         ; +0x28a, 0x18001138a\nmov     rsi, [rsp+0C8h+arg_10]                                         ; +0x292, 0x180011392\nmov     rbp, [rsp+0C8h+arg_8]                                          ; +0x29a, 0x18001139a\ntest    rbx, rbx                                                       ; +0x2a2, 0x1800113a2\njz      short loc_1800113AF                                            ; +0x2a5, 0x1800113a5\nmov     rcx, rbx; Block                                                ; +0x2a7, 0x1800113a7\ncall    j_j_free_0                                                     ; +0x2aa, 0x1800113aa\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x2af, 0x1800113af\nadd     rsp, 0C0h                                                      ; +0x2b5, 0x1800113b5\npop     rbx                                                            ; +0x2bc, 0x1800113bc\nretn                                                                   ; +0x2bd, 0x1800113bd", "xrefs": ["<???> @ 0x18013b614", "<???> @ 0x18013b660", "<???> @ 0x18014cf68", "<???> @ 0x1801b82f0"], "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"}