{"type": "func", "start": 6442522720, "end": 6442523331, "name": "cocos2d::ccDrawQuadBezier", "pseudocode": "// \n// cocos2d::ccDrawQuadBezier from 0x180011860 to 0x180011ac3 (611 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x180132668\n// > <???> @ 0x1801326b4\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ae2e4\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::ccDrawQuadBezier(\n        cocos2d *this,\n        const struct cocos2d::CCPoint *a2,\n        const struct cocos2d::CCPoint *a3,\n        const struct cocos2d::CCPoint *a4)\n{\n  unsigned int v7; // esi\n  GLsizei v8; // r13d\n  _DWORD *v9; // rax\n  _DWORD *v10; // rbx\n  float v11; // xmm9_4\n  __int64 v12; // rdi\n  __int64 v13; // rbp\n  float v14; // xmm0_4\n  float *v15; // rsi\n  float v16; // xmm10_4\n  float v17; // xmm7_4\n  float v18; // xmm8_4\n  float v19; // xmm0_4\n  cocos2d::CCGLProgram *v20; // rcx\n  unsigned int v21; // edx\n\n  v7 = (unsigned int)a4;\n  cocos2d::ccDrawInit(this);\n  v8 = v7 + 1;\n  v9 = operator new(saturated_mul(v7 + 1, 8u));\n  v10 = v9;\n  v11 = 0.0;\n  v12 = v7;\n  if ( v7 )\n  {\n    v13 = v7;\n    v14 = (float)(int)v7;\n    v15 = (float *)v9;\n    v16 = 1.0 / v14;\n    do\n    {\n      v17 = v11 * v11;\n      v18 = (float)((float)(1.0 - v11) + (float)(1.0 - v11)) * v11;\n      *v15 = (float)((float)(powf(1.0 - v11, 2.0) * *(float *)this) + (float)(v18 * a2->x))\n           + (float)((float)(v11 * v11) * a3->x);\n      v19 = powf(1.0 - v11, 2.0);\n      v11 = v11 + v16;\n      v15[1] = (float)((float)(v19 * *((float *)this + 1)) + (float)(v18 * a2->y)) + (float)(v17 * a3->y);\n      v15 += 2;\n      --v13;\n    }\n    while ( v13 );\n  }\n  v20 = (cocos2d::CCGLProgram *)qword_1801A8338;\n  v10[2 * v12] = LODWORD(a3->x);\n  v10[2 * v12 + 1] = LODWORD(a3->y);\n  cocos2d::CCGLProgram::use(v20);\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, v21);\n  _glewVertexAttribPointer(0, 2, 5126);\n  glDrawArrays(3u, 0, v8);\n  if ( v10 )\n    j_j_free_0(v10);\n  ++g_uNumberOfDraws;\n}", "assembly": "; \n; cocos2d::ccDrawQuadBezier from 0x180011860 to 0x180011ac3 (611 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x180132668\n; > <???> @ 0x1801326b4\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ae2e4\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, 0x180011860\npush    rbx                                                            ; +0x3, 0x180011863\nsub     rsp, 0C0h                                                      ; +0x4, 0x180011864\nmov     [rax+10h], rsi                                                 ; +0xb, 0x18001186b\nmov     [rax+18h], rdi                                                 ; +0xf, 0x18001186f\nmov     [rax-10h], r12                                                 ; +0x13, 0x180011873\nmov     r12, rcx                                                       ; +0x17, 0x180011877\nmov     [rax-18h], r13                                                 ; +0x1a, 0x18001187a\nmov     [rax-20h], r14                                                 ; +0x1e, 0x18001187e\nmov     r14, r8                                                        ; +0x22, 0x180011882\nmov     [rax-28h], r15                                                 ; +0x25, 0x180011885\nmov     r15, rdx                                                       ; +0x29, 0x180011889\nmovaps  xmmword ptr [rax-68h], xmm9                                    ; +0x2c, 0x18001188c\nmov     esi, r9d                                                       ; +0x31, 0x180011891\ncall    ?ccDrawInit@cocos2d@@YAXXZ_0; cocos2d::ccDrawInit(void)        ; +0x34, 0x180011894\nmov     rcx, 0FFFFFFFFFFFFFFFFh                                        ; +0x39, 0x180011899\nlea     r13d, [rsi+1]                                                  ; +0x40, 0x1800118a0\nmov     r10d, r13d                                                     ; +0x44, 0x1800118a4\nmov     eax, 8                                                         ; +0x47, 0x1800118a7\nmul     r10                                                            ; +0x4c, 0x1800118ac\ncmovo   rax, rcx                                                       ; +0x4f, 0x1800118af\nmov     rcx, rax; Size                                                 ; +0x53, 0x1800118b3\ncall    j_??2@YAPEAX_K@Z; operator new(unsigned __int64)               ; +0x56, 0x1800118b6\nmov     rbx, rax                                                       ; +0x5b, 0x1800118bb\nxorps   xmm9, xmm9                                                     ; +0x5e, 0x1800118be\nmov     edi, esi                                                       ; +0x62, 0x1800118c2\ntest    esi, esi                                                       ; +0x64, 0x1800118c4\njz      loc_1800119EF                                                  ; +0x66, 0x1800118c6\nmov     [rsp+0C8h+arg_0], rbp                                          ; +0x6c, 0x1800118cc\nxorps   xmm0, xmm0                                                     ; +0x74, 0x1800118d4\nmovaps  [rsp+0C8h+var_38], xmm6                                        ; +0x77, 0x1800118d7\nmov     ebp, edi                                                       ; +0x7f, 0x1800118df\nmovaps  [rsp+0C8h+var_48], xmm7                                        ; +0x81, 0x1800118e1\nmovaps  [rsp+0C8h+var_58], xmm8                                        ; +0x89, 0x1800118e9\nmovaps  [rsp+0C8h+var_78], xmm10                                       ; +0x8f, 0x1800118ef\ncvtsi2ss xmm0, rsi                                                     ; +0x95, 0x1800118f5\nmov     rsi, rax                                                       ; +0x9a, 0x1800118fa\nmovaps  [rsp+0C8h+var_88], xmm11                                       ; +0x9d, 0x1800118fd\nmovss   xmm11, cs:flt_1800E61A8                                        ; +0xa3, 0x180011903\nmovaps  xmm10, xmm11                                                   ; +0xac, 0x18001190c\nmovaps  [rsp+0C8h+var_98], xmm12                                       ; +0xb0, 0x180011910\nmovss   xmm12, cs:Y                                                    ; +0xb6, 0x180011916\ndivss   xmm10, xmm0                                                    ; +0xbf, 0x18001191f\nnop     dword ptr [rax+00h]                                            ; +0xc4, 0x180011924\nnop     dword ptr [rax+rax+00000000h]                                  ; +0xc8, 0x180011928\nmovaps  xmm6, xmm11                                                    ; +0xd0, 0x180011930\nmovaps  xmm7, xmm9                                                     ; +0xd4, 0x180011934\nsubss   xmm6, xmm9                                                     ; +0xd8, 0x180011938\nmulss   xmm7, xmm9                                                     ; +0xdd, 0x18001193d\nmovaps  xmm1, xmm12; Y                                                 ; +0xe2, 0x180011942\nmovaps  xmm8, xmm6                                                     ; +0xe6, 0x180011946\nmovaps  xmm0, xmm6; X                                                  ; +0xea, 0x18001194a\naddss   xmm8, xmm6                                                     ; +0xed, 0x18001194d\nmulss   xmm8, xmm9                                                     ; +0xf2, 0x180011952\ncall    powf                                                           ; +0xf7, 0x180011957\nmulss   xmm0, dword ptr [r12]                                          ; +0xfc, 0x18001195c\nmovaps  xmm1, xmm8                                                     ; +0x102, 0x180011962\nmulss   xmm1, dword ptr [r15]                                          ; +0x106, 0x180011966\nmovaps  xmm2, xmm7                                                     ; +0x10b, 0x18001196b\nmulss   xmm2, dword ptr [r14]                                          ; +0x10e, 0x18001196e\naddss   xmm0, xmm1                                                     ; +0x113, 0x180011973\nmovaps  xmm1, xmm12; Y                                                 ; +0x117, 0x180011977\naddss   xmm0, xmm2                                                     ; +0x11b, 0x18001197b\nmovss   dword ptr [rsi], xmm0                                          ; +0x11f, 0x18001197f\nmovaps  xmm0, xmm6; X                                                  ; +0x123, 0x180011983\ncall    powf                                                           ; +0x126, 0x180011986\nmulss   xmm0, dword ptr [r12+4]                                        ; +0x12b, 0x18001198b\naddss   xmm9, xmm10                                                    ; +0x132, 0x180011992\nmulss   xmm8, dword ptr [r15+4]                                        ; +0x137, 0x180011997\nmulss   xmm7, dword ptr [r14+4]                                        ; +0x13d, 0x18001199d\naddss   xmm0, xmm8                                                     ; +0x143, 0x1800119a3\naddss   xmm0, xmm7                                                     ; +0x148, 0x1800119a8\nmovss   dword ptr [rsi+4], xmm0                                        ; +0x14c, 0x1800119ac\nadd     rsi, 8                                                         ; +0x151, 0x1800119b1\nsub     rbp, 1                                                         ; +0x155, 0x1800119b5\njnz     loc_180011930                                                  ; +0x159, 0x1800119b9\nmovaps  xmm12, [rsp+0C8h+var_98]                                       ; +0x15f, 0x1800119bf\nmovaps  xmm11, [rsp+0C8h+var_88]                                       ; +0x165, 0x1800119c5\nmovaps  xmm10, [rsp+0C8h+var_78]                                       ; +0x16b, 0x1800119cb\nmovaps  xmm8, [rsp+0C8h+var_58]                                        ; +0x171, 0x1800119d1\nmovaps  xmm7, [rsp+0C8h+var_48]                                        ; +0x177, 0x1800119d7\nmovaps  xmm6, [rsp+0C8h+var_38]                                        ; +0x17f, 0x1800119df\nmov     rbp, [rsp+0C8h+arg_0]                                          ; +0x187, 0x1800119e7\nmov     eax, [r14]                                                     ; +0x18f, 0x1800119ef\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x192, 0x1800119f2\nmov     [rbx+rdi*8], eax                                               ; +0x199, 0x1800119f9\nmov     eax, [r14+4]                                                   ; +0x19c, 0x1800119fc\nmov     [rbx+rdi*8+4], eax                                             ; +0x1a0, 0x180011a00\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x1a4, 0x180011a04\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x1a9, 0x180011a09\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x1b0, 0x180011a10\nmov     edx, cs:dword_1801A2B58; int                                   ; +0x1b5, 0x180011a15\nlea     r8, flt_1801A2B60; float *                                     ; +0x1bb, 0x180011a1b\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x1c2, 0x180011a22\nmov     r9d, 1; unsigned int                                           ; +0x1c9, 0x180011a29\ncall    ?setUniformLocationWith4fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWith4fv(int,float *,uint) ; +0x1cf, 0x180011a2f\nmov     ecx, 1; this                                                   ; +0x1d4, 0x180011a34\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x1d9, 0x180011a39\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x1de, 0x180011a3e\nxor     r9d, r9d                                                       ; +0x1e5, 0x180011a45\nmov     [rsp+0C8h+var_A0], rbx                                         ; +0x1e8, 0x180011a48\nxor     ecx, ecx                                                       ; +0x1ed, 0x180011a4d\nmov     r8d, 1406h                                                     ; +0x1ef, 0x180011a4f\nmov     [rsp+0C8h+var_A8], 0                                           ; +0x1f5, 0x180011a55\nlea     edx, [r9+2]                                                    ; +0x1fd, 0x180011a5d\ncall    qword ptr [rax]                                                ; +0x201, 0x180011a61\nxor     edx, edx; first                                                ; +0x203, 0x180011a63\nmov     r8d, r13d; count                                               ; +0x205, 0x180011a65\nlea     ecx, [rdx+3]; mode                                             ; +0x208, 0x180011a68\ncall    cs:glDrawArrays                                                ; +0x20b, 0x180011a6b\nmovaps  xmm9, [rsp+0C8h+var_68]                                        ; +0x211, 0x180011a71\nmov     r15, [rsp+0C8h+var_28]                                         ; +0x217, 0x180011a77\nmov     r14, [rsp+0C8h+var_20]                                         ; +0x21f, 0x180011a7f\nmov     r13, [rsp+0C8h+var_18]                                         ; +0x227, 0x180011a87\nmov     r12, [rsp+0C8h+var_10]                                         ; +0x22f, 0x180011a8f\nmov     rdi, [rsp+0C8h+arg_10]                                         ; +0x237, 0x180011a97\nmov     rsi, [rsp+0C8h+arg_8]                                          ; +0x23f, 0x180011a9f\ntest    rbx, rbx                                                       ; +0x247, 0x180011aa7\njz      short loc_180011AB4                                            ; +0x24a, 0x180011aaa\nmov     rcx, rbx; Block                                                ; +0x24c, 0x180011aac\ncall    j_j_free_0                                                     ; +0x24f, 0x180011aaf\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x254, 0x180011ab4\nadd     rsp, 0C0h                                                      ; +0x25a, 0x180011aba\npop     rbx                                                            ; +0x261, 0x180011ac1\nretn                                                                   ; +0x262, 0x180011ac2", "xrefs": ["<???> @ 0x180132668", "<???> @ 0x1801326b4", "<???> @ 0x1801438a8", "<???> @ 0x1801ae2e4"], "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"}