{"type": "func", "start": 6442526384, "end": 6442527063, "name": "cocos2d::CCDrawNode::drawCubicBezier", "pseudocode": "// \n// cocos2d::CCDrawNode::drawCubicBezier from 0x1800126b0 to 0x180012957 (679 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCDrawNode::drawPreciseCubicBezier @ 0x1800142a9\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801b8464\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\n// Hidden C++ exception states: #wind=1\nvoid __fastcall cocos2d::CCDrawNode::drawCubicBezier(\n        cocos2d::CCDrawNode *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        int a6,\n        const struct cocos2d::_ccColor4F *a7,\n        float a8)\n{\n  unsigned __int64 v8; // rbx\n  __int64 v9; // rax\n  __int64 v10; // rax\n  float *v11; // r14\n  cocos2d::CCSize *v12; // rsi\n  float v13; // xmm8_4\n  float *v14; // rsi\n  __int64 v15; // r13\n  float v16; // xmm6_4\n  float v17; // xmm4_4\n  float v18; // xmm7_4\n  float v19; // xmm3_4\n  float *v20; // rdx\n  unsigned int i; // edi\n  float *v22; // rbx\n\n  v8 = (unsigned int)(a6 + 1);\n  v9 = 8 * v8;\n  if ( !is_mul_ok(v8, 8u) )\n    v9 = -1;\n  v10 = sub_1800E4C74(v9, &unk_18012B640);\n  v11 = (float *)v10;\n  if ( v10 )\n  {\n    v12 = (cocos2d::CCSize *)v10;\n    if ( a6 != -1 )\n    {\n      do\n      {\n        cocos2d::CCSize::CCSize(v12);\n        v12 = (cocos2d::CCSize *)((char *)v12 + 8);\n        --v8;\n      }\n      while ( v8 );\n    }\n  }\n  else\n  {\n    v11 = nullptr;\n  }\n  if ( v11 )\n  {\n    v13 = 0.0;\n    if ( a6 )\n    {\n      v14 = v11;\n      v15 = (unsigned int)a6;\n      do\n      {\n        v16 = powf(1.0 - v13, 3.0);\n        v17 = (float)(powf(1.0 - v13, 2.0) * 3.0) * v13;\n        v18 = (float)((float)((float)(1.0 - v13) * 3.0) * v13) * v13;\n        v19 = (float)(v13 * v13) * v13;\n        *v14 = (float)((float)((float)(v17 * *(float *)a3) + (float)(v16 * *(float *)a2)) + (float)(v18 * *(float *)a4))\n             + (float)(v19 * *(float *)a5);\n        v14[1] = (float)((float)((float)(v17 * *((float *)a3 + 1)) + (float)(v16 * *((float *)a2 + 1)))\n                       + (float)(v18 * *((float *)a4 + 1)))\n               + (float)(v19 * *((float *)a5 + 1));\n        v13 = v13 + (float)(1.0 / (float)a6);\n        v14 += 2;\n        --v15;\n      }\n      while ( v15 );\n      v11[2 * a6] = *(float *)a5;\n      v11[2 * a6 + 1] = *((float *)a5 + 1);\n      v20 = v11;\n      for ( i = 0; i < a6; ++i )\n      {\n        v22 = v20 + 2;\n        cocos2d::CCDrawNode::drawSegmentEx(\n          this,\n          (const struct cocos2d::CCPoint *)v20,\n          (const struct cocos2d::CCPoint *)(v20 + 2),\n          a8,\n          a7,\n          i == 0,\n          i == a6 - 1);\n        v20 = v22;\n      }\n    }\n    else\n    {\n      *v11 = *(float *)a5;\n      v11[1] = *((float *)a5 + 1);\n    }\n    j_j_free_0(v11);\n  }\n}", "assembly": "; \n; cocos2d::CCDrawNode::drawCubicBezier from 0x1800126b0 to 0x180012957 (679 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCDrawNode::drawPreciseCubicBezier @ 0x1800142a9\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801b8464\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, 0x1800126b0\nmov     [rax+20h], r9                                                  ; +0x3, 0x1800126b3\nmov     [rax+18h], r8                                                  ; +0x7, 0x1800126b7\nmov     [rax+10h], rdx                                                 ; +0xb, 0x1800126bb\nmov     [rax+8], rcx                                                   ; +0xf, 0x1800126bf\npush    rbx                                                            ; +0x13, 0x1800126c3\npush    rbp                                                            ; +0x14, 0x1800126c4\npush    rsi                                                            ; +0x15, 0x1800126c5\npush    rdi                                                            ; +0x16, 0x1800126c6\npush    r12                                                            ; +0x17, 0x1800126c7\npush    r13                                                            ; +0x19, 0x1800126c9\npush    r14                                                            ; +0x1b, 0x1800126cb\npush    r15                                                            ; +0x1d, 0x1800126cd\nsub     rsp, 0C8h                                                      ; +0x1f, 0x1800126cf\nmovaps  xmmword ptr [rax-58h], xmm6                                    ; +0x26, 0x1800126d6\nmovaps  xmmword ptr [rax-68h], xmm7                                    ; +0x2a, 0x1800126da\nmovaps  xmmword ptr [rax-78h], xmm8                                    ; +0x2e, 0x1800126de\nmovaps  xmmword ptr [rax-88h], xmm9                                    ; +0x33, 0x1800126e3\nmovaps  [rsp+108h+var_98], xmm10                                       ; +0x3b, 0x1800126eb\nmovaps  [rsp+108h+var_A8], xmm11                                       ; +0x41, 0x1800126f1\nmovaps  [rsp+108h+var_B8], xmm12                                       ; +0x47, 0x1800126f7\nmov     r15, [rsp+108h+arg_20]                                         ; +0x4d, 0x1800126fd\nmov     ebp, [rsp+108h+arg_28]                                         ; +0x55, 0x180012705\nlea     ebx, [rbp+1]                                                   ; +0x5c, 0x18001270c\nmov     eax, 8                                                         ; +0x5f, 0x18001270f\nmul     rbx                                                            ; +0x64, 0x180012714\nmov     rcx, 0FFFFFFFFFFFFFFFFh                                        ; +0x67, 0x180012717\ncmovb   rax, rcx                                                       ; +0x6e, 0x18001271e\nlea     rdx, unk_18012B640                                             ; +0x72, 0x180012722\nmov     rcx, rax                                                       ; +0x79, 0x180012729\ncall    sub_1800E4C74                                                  ; +0x7c, 0x18001272c\nmov     r14, rax                                                       ; +0x81, 0x180012731\nmov     [rsp+108h+var_C0], rax                                         ; +0x84, 0x180012734\nxor     edi, edi                                                       ; +0x89, 0x180012739\nmov     [rsp+108h+var_C8], rdi                                         ; +0x8b, 0x18001273b\ntest    rax, rax                                                       ; +0x90, 0x180012740\njz      short loc_180012764                                            ; +0x93, 0x180012743\nmov     rsi, rax                                                       ; +0x95, 0x180012745\ntest    rbx, rbx                                                       ; +0x98, 0x180012748\njz      short loc_180012767                                            ; +0x9b, 0x18001274b\nnop     dword ptr [rax]                                                ; +0x9d, 0x18001274d\nmov     rcx, rsi; this                                                 ; +0xa0, 0x180012750\ncall    ??0CCSize@cocos2d@@QEAA@XZ; cocos2d::CCSize::CCSize(void)      ; +0xa3, 0x180012753\nadd     rsi, 8                                                         ; +0xa8, 0x180012758\nsub     rbx, 1                                                         ; +0xac, 0x18001275c\njnz     short loc_180012750                                            ; +0xb0, 0x180012760\njmp     short loc_180012767                                            ; +0xb2, 0x180012762\nmov     r14, rdi                                                       ; +0xb4, 0x180012764\ntest    r14, r14                                                       ; +0xb7, 0x180012767\njz      loc_18001291C                                                  ; +0xba, 0x18001276a\nxorps   xmm8, xmm8                                                     ; +0xc0, 0x180012770\ntest    ebp, ebp                                                       ; +0xc4, 0x180012774\njz      loc_180012904                                                  ; +0xc6, 0x180012776\nxorps   xmm0, xmm0                                                     ; +0xcc, 0x18001277c\ncvtsi2ss xmm0, rbp                                                     ; +0xcf, 0x18001277f\nmovss   xmm10, cs:flt_1800EC208                                        ; +0xd4, 0x180012784\nmovaps  xmm9, xmm10                                                    ; +0xdd, 0x18001278d\ndivss   xmm9, xmm0                                                     ; +0xe1, 0x180012791\nmov     rsi, r14                                                       ; +0xe6, 0x180012796\nmov     rbx, rbp                                                       ; +0xe9, 0x180012799\nmov     r13, rbp                                                       ; +0xec, 0x18001279c\nmovss   xmm11, cs:Y                                                    ; +0xef, 0x18001279f\nmovss   xmm12, cs:X                                                    ; +0xf8, 0x1800127a8\nmov     rbp, [rsp+108h+arg_18]                                         ; +0x101, 0x1800127b1\nmov     r12, [rsp+108h+arg_10]                                         ; +0x109, 0x1800127b9\nmov     rdi, [rsp+108h+arg_8]                                          ; +0x111, 0x1800127c1\nnop     dword ptr [rax+00000000h]                                      ; +0x119, 0x1800127c9\nmovaps  xmm7, xmm10                                                    ; +0x120, 0x1800127d0\nsubss   xmm7, xmm8                                                     ; +0x124, 0x1800127d4\nmovaps  xmm1, xmm11; Y                                                 ; +0x129, 0x1800127d9\nmovaps  xmm0, xmm7; X                                                  ; +0x12d, 0x1800127dd\ncall    powf                                                           ; +0x130, 0x1800127e0\nmovaps  xmm6, xmm0                                                     ; +0x135, 0x1800127e5\nmovaps  xmm1, xmm12; Y                                                 ; +0x138, 0x1800127e8\nmovaps  xmm0, xmm7; X                                                  ; +0x13c, 0x1800127ec\ncall    powf                                                           ; +0x13f, 0x1800127ef\nmovaps  xmm4, xmm0                                                     ; +0x144, 0x1800127f4\nmulss   xmm4, xmm11                                                    ; +0x147, 0x1800127f7\nmulss   xmm4, xmm8                                                     ; +0x14c, 0x1800127fc\nmulss   xmm7, xmm11                                                    ; +0x151, 0x180012801\nmulss   xmm7, xmm8                                                     ; +0x156, 0x180012806\nmulss   xmm7, xmm8                                                     ; +0x15b, 0x18001280b\nmovaps  xmm3, xmm8                                                     ; +0x160, 0x180012810\nmulss   xmm3, xmm8                                                     ; +0x164, 0x180012814\nmulss   xmm3, xmm8                                                     ; +0x169, 0x180012819\nmovaps  xmm2, xmm4                                                     ; +0x16e, 0x18001281e\nmulss   xmm2, dword ptr [r12]                                          ; +0x171, 0x180012821\nmovaps  xmm0, xmm6                                                     ; +0x177, 0x180012827\nmulss   xmm0, dword ptr [rdi]                                          ; +0x17a, 0x18001282a\naddss   xmm2, xmm0                                                     ; +0x17e, 0x18001282e\nmovaps  xmm1, xmm7                                                     ; +0x182, 0x180012832\nmulss   xmm1, dword ptr [rbp+0]                                        ; +0x185, 0x180012835\naddss   xmm2, xmm1                                                     ; +0x18a, 0x18001283a\nmovaps  xmm0, xmm3                                                     ; +0x18e, 0x18001283e\nmulss   xmm0, dword ptr [r15]                                          ; +0x191, 0x180012841\naddss   xmm2, xmm0                                                     ; +0x196, 0x180012846\nmovss   dword ptr [rsi], xmm2                                          ; +0x19a, 0x18001284a\nmulss   xmm4, dword ptr [r12+4]                                        ; +0x19e, 0x18001284e\nmulss   xmm6, dword ptr [rdi+4]                                        ; +0x1a5, 0x180012855\naddss   xmm4, xmm6                                                     ; +0x1aa, 0x18001285a\nmulss   xmm7, dword ptr [rbp+4]                                        ; +0x1ae, 0x18001285e\naddss   xmm4, xmm7                                                     ; +0x1b3, 0x180012863\nmulss   xmm3, dword ptr [r15+4]                                        ; +0x1b7, 0x180012867\naddss   xmm4, xmm3                                                     ; +0x1bd, 0x18001286d\nmovss   dword ptr [rsi+4], xmm4                                        ; +0x1c1, 0x180012871\naddss   xmm8, xmm9                                                     ; +0x1c6, 0x180012876\nadd     rsi, 8                                                         ; +0x1cb, 0x18001287b\nsub     r13, 1                                                         ; +0x1cf, 0x18001287f\njnz     loc_1800127D0                                                  ; +0x1d3, 0x180012883\nmov     eax, [r15]                                                     ; +0x1d9, 0x180012889\nmov     [r14+rbx*8], eax                                               ; +0x1dc, 0x18001288c\nmov     eax, [r15+4]                                                   ; +0x1e0, 0x180012890\nmov     [r14+rbx*8+4], eax                                             ; +0x1e4, 0x180012894\nmov     ebp, [rsp+108h+arg_28]                                         ; +0x1e9, 0x180012899\nlea     esi, [rbp-1]                                                   ; +0x1f0, 0x1800128a0\nmov     rdx, r14; struct cocos2d::CCPoint *                            ; +0x1f3, 0x1800128a3\nmovss   xmm6, [rsp+108h+arg_38]                                        ; +0x1f6, 0x1800128a6\nmov     r15, [rsp+108h+arg_30]                                         ; +0x1ff, 0x1800128af\nmov     rdi, [rsp+108h+var_C8]                                         ; +0x207, 0x1800128b7\nmov     r12, [rsp+108h+arg_0]                                          ; +0x20c, 0x1800128bc\nnop     dword ptr [rax+00h]                                            ; +0x214, 0x1800128c4\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x218, 0x1800128c8\nlea     rbx, [rdx+8]                                                   ; +0x220, 0x1800128d0\ncmp     edi, esi                                                       ; +0x224, 0x1800128d4\nsetz    cl                                                             ; +0x226, 0x1800128d6\ntest    edi, edi                                                       ; +0x229, 0x1800128d9\nsetz    al                                                             ; +0x22b, 0x1800128db\nmov     [rsp+108h+var_D8], cl; bool                                    ; +0x22e, 0x1800128de\nmov     [rsp+108h+var_E0], al; bool                                    ; +0x232, 0x1800128e2\nmov     [rsp+108h+var_E8], r15; struct cocos2d::_ccColor4F *           ; +0x236, 0x1800128e6\nmovaps  xmm3, xmm6; float                                              ; +0x23b, 0x1800128eb\nmov     r8, rbx; struct cocos2d::CCPoint *                             ; +0x23e, 0x1800128ee\nmov     rcx, r12; this                                                 ; +0x241, 0x1800128f1\ncall    ?drawSegmentEx@CCDrawNode@cocos2d@@QEAA_NAEBVCCPoint@2@0MAEBU_ccColor4F@2@_N2@Z; cocos2d::CCDrawNode::drawSegmentEx(cocos2d::CCPoint const &,cocos2d::CCPoint const &,float,cocos2d::_ccColor4F const &,bool,bool) ; +0x244, 0x1800128f4\ninc     edi                                                            ; +0x249, 0x1800128f9\nmov     rdx, rbx                                                       ; +0x24b, 0x1800128fb\ncmp     edi, ebp                                                       ; +0x24e, 0x1800128fe\njb      short loc_1800128D0                                            ; +0x250, 0x180012900\njmp     short loc_180012914                                            ; +0x252, 0x180012902\nmov     eax, [r15]                                                     ; +0x254, 0x180012904\nmov     [r14+rbp*8], eax                                               ; +0x257, 0x180012907\nmov     eax, [r15+4]                                                   ; +0x25b, 0x18001290b\nmov     [r14+rbp*8+4], eax                                             ; +0x25f, 0x18001290f\nmov     rcx, r14; Block                                                ; +0x264, 0x180012914\ncall    j_j_free_0                                                     ; +0x267, 0x180012917\nlea     r11, [rsp+108h+var_40]                                         ; +0x26c, 0x18001291c\nmovaps  xmm6, xmmword ptr [r11-18h]                                    ; +0x274, 0x180012924\nmovaps  xmm7, xmmword ptr [r11-28h]                                    ; +0x279, 0x180012929\nmovaps  xmm8, xmmword ptr [r11-38h]                                    ; +0x27e, 0x18001292e\nmovaps  xmm9, xmmword ptr [r11-48h]                                    ; +0x283, 0x180012933\nmovaps  xmm10, xmmword ptr [r11-58h]                                   ; +0x288, 0x180012938\nmovaps  xmm11, xmmword ptr [r11-68h]                                   ; +0x28d, 0x18001293d\nmovaps  xmm12, xmmword ptr [r11-78h]                                   ; +0x292, 0x180012942\nmov     rsp, r11                                                       ; +0x297, 0x180012947\npop     r15                                                            ; +0x29a, 0x18001294a\npop     r14                                                            ; +0x29c, 0x18001294c\npop     r13                                                            ; +0x29e, 0x18001294e\npop     r12                                                            ; +0x2a0, 0x180012950\npop     rdi                                                            ; +0x2a2, 0x180012952\npop     rsi                                                            ; +0x2a3, 0x180012953\npop     rbp                                                            ; +0x2a4, 0x180012954\npop     rbx                                                            ; +0x2a5, 0x180012955\nretn                                                                   ; +0x2a6, 0x180012956", "xrefs": ["cocos2d::CCDrawNode::drawPreciseCubicBezier @ 0x1800142a9", "<???> @ 0x18014cf68", "<???> @ 0x1801b8464"], "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"}