{"type": "func", "start": 6442521136, "end": 6442521582, "name": "cocos2d::ccDrawFilledCircle", "pseudocode": "// \n// cocos2d::ccDrawFilledCircle from 0x180011230 to 0x1800113ee (446 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x180132620\n// > <???> @ 0x180132630\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ae278\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::ccDrawFilledCircle(cocos2d *this, const struct cocos2d::CCPoint *a2, float a3, float a4)\n{\n  int v4; // r9d\n  float v5; // xmm1_4\n  int v7; // r14d\n  float *v8; // rsi\n  int v9; // edi\n  float v10; // xmm9_4\n  float v11; // xmm10_4\n  __int64 v12; // rbx\n  float v13; // xmm6_4\n  cocos2d::CCGLProgram *v14; // rcx\n  unsigned int v15; // edx\n\n  v7 = v4;\n  cocos2d::ccDrawInit(this);\n  v8 = (float *)calloc(8LL * (unsigned int)(v7 + 2), 1u);\n  if ( v8 )\n  {\n    v9 = 0;\n    v10 = *(float *)this;\n    v11 = *((float *)this + 1);\n    do\n    {\n      v12 = (unsigned int)(2 * v9);\n      v13 = (float)((float)v9 * (float)(6.2831855 / (float)v7)) + a3;\n      v8[v12] = (float)(cosf(v13) * v5) + v10;\n      ++v9;\n      v8[(unsigned int)(v12 + 1)] = (float)(sinf(v13) * v5) + v11;\n    }\n    while ( v9 <= (unsigned int)v7 );\n    v14 = (cocos2d::CCGLProgram *)qword_1801A8338;\n    v8[2 * v7 + 2] = v10;\n    v8[2 * v7 + 3] = v11;\n    cocos2d::CCGLProgram::use(v14);\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, v15);\n    _glewVertexAttribPointer(0, 2, 5126);\n    glDrawArrays(6u, 0, v7 + 1);\n    free(v8);\n    ++g_uNumberOfDraws;\n  }\n}", "assembly": "; \n; cocos2d::ccDrawFilledCircle from 0x180011230 to 0x1800113ee (446 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x180132620\n; > <???> @ 0x180132630\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ae278\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     [rsp+arg_8], rbx                                               ; +0x0, 0x180011230\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x180011235\npush    r14                                                            ; +0xa, 0x18001123a\nsub     rsp, 90h                                                       ; +0xc, 0x18001123c\nmovaps  [rsp+98h+var_28], xmm7                                         ; +0x13, 0x180011243\nmov     rbx, rcx                                                       ; +0x18, 0x180011248\nmovaps  [rsp+98h+var_38], xmm8                                         ; +0x1b, 0x18001124b\nmovaps  xmm8, xmm1                                                     ; +0x21, 0x180011251\nmovaps  [rsp+98h+var_68], xmm11                                        ; +0x25, 0x180011255\nmovaps  xmm11, xmm2                                                    ; +0x2b, 0x18001125b\nmov     r14d, r9d                                                      ; +0x2f, 0x18001125f\ncall    ?ccDrawInit@cocos2d@@YAXXZ_0; cocos2d::ccDrawInit(void)        ; +0x32, 0x180011262\nmovss   xmm7, cs:dword_1800E6704                                       ; +0x37, 0x180011267\nlea     ecx, [r14+2]                                                   ; +0x3f, 0x18001126f\nxorps   xmm0, xmm0                                                     ; +0x43, 0x180011273\nshl     rcx, 3; Count                                                  ; +0x46, 0x180011276\ncvtsi2ss xmm0, r14                                                     ; +0x4a, 0x18001127a\nmov     edx, 1; Size                                                   ; +0x4f, 0x18001127f\ndivss   xmm7, xmm0                                                     ; +0x54, 0x180011284\ncall    cs:calloc                                                      ; +0x58, 0x180011288\nmov     rsi, rax                                                       ; +0x5e, 0x18001128e\ntest    rax, rax                                                       ; +0x61, 0x180011291\njz      loc_1800113C9                                                  ; +0x64, 0x180011294\nmov     [rsp+98h+arg_0], rdi                                           ; +0x6a, 0x18001129a\nxor     edi, edi                                                       ; +0x72, 0x1800112a2\nmovaps  [rsp+98h+var_18], xmm6                                         ; +0x74, 0x1800112a4\nmovaps  [rsp+98h+var_48], xmm9                                         ; +0x7c, 0x1800112ac\nmovss   xmm9, dword ptr [rbx]                                          ; +0x82, 0x1800112b2\nmovaps  [rsp+98h+var_58], xmm10                                        ; +0x87, 0x1800112b7\nmovss   xmm10, dword ptr [rbx+4]                                       ; +0x8d, 0x1800112bd\nxorps   xmm6, xmm6                                                     ; +0x93, 0x1800112c3\nmov     ecx, edi                                                       ; +0x96, 0x1800112c6\nlea     ebx, [rdi+rdi]                                                 ; +0x98, 0x1800112c8\ncvtsi2ss xmm6, rcx                                                     ; +0x9b, 0x1800112cb\nmulss   xmm6, xmm7                                                     ; +0xa0, 0x1800112d0\naddss   xmm6, xmm11                                                    ; +0xa4, 0x1800112d4\nmovaps  xmm0, xmm6; X                                                  ; +0xa9, 0x1800112d9\ncall    cosf                                                           ; +0xac, 0x1800112dc\nmulss   xmm0, xmm8                                                     ; +0xb1, 0x1800112e1\naddss   xmm0, xmm9                                                     ; +0xb6, 0x1800112e6\nmovss   dword ptr [rsi+rbx*4], xmm0                                    ; +0xbb, 0x1800112eb\nmovaps  xmm0, xmm6; X                                                  ; +0xc0, 0x1800112f0\ncall    sinf                                                           ; +0xc3, 0x1800112f3\nmulss   xmm0, xmm8                                                     ; +0xc8, 0x1800112f8\nlea     eax, [rbx+1]                                                   ; +0xcd, 0x1800112fd\ninc     edi                                                            ; +0xd0, 0x180011300\naddss   xmm0, xmm10                                                    ; +0xd2, 0x180011302\nmovss   dword ptr [rsi+rax*4], xmm0                                    ; +0xd7, 0x180011307\ncmp     edi, r14d                                                      ; +0xdc, 0x18001130c\njbe     short loc_1800112C3                                            ; +0xdf, 0x18001130f\nmov     rcx, cs:qword_1801A8338; this                                  ; +0xe1, 0x180011311\nlea     r8d, [r14+r14]                                                 ; +0xe8, 0x180011318\nmovaps  xmm6, [rsp+98h+var_18]                                         ; +0xec, 0x18001131c\nlea     eax, [r8+2]                                                    ; +0xf4, 0x180011324\nmov     rdi, [rsp+98h+arg_0]                                           ; +0xf8, 0x180011328\nmovss   dword ptr [rsi+rax*4], xmm9                                    ; +0x100, 0x180011330\nlea     eax, [r8+3]                                                    ; +0x106, 0x180011336\nmovss   dword ptr [rsi+rax*4], xmm10                                   ; +0x10a, 0x18001133a\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x110, 0x180011340\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x115, 0x180011345\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x11c, 0x18001134c\nmov     edx, cs:dword_1801A2B58; int                                   ; +0x121, 0x180011351\nlea     r8, flt_1801A2B60; float *                                     ; +0x127, 0x180011357\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x12e, 0x18001135e\nmov     r9d, 1; unsigned int                                           ; +0x135, 0x180011365\ncall    ?setUniformLocationWith4fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWith4fv(int,float *,uint) ; +0x13b, 0x18001136b\nmov     ecx, 1; this                                                   ; +0x140, 0x180011370\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x145, 0x180011375\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x14a, 0x18001137a\nxor     r9d, r9d                                                       ; +0x151, 0x180011381\nmov     [rsp+98h+var_70], rsi                                          ; +0x154, 0x180011384\nxor     ecx, ecx                                                       ; +0x159, 0x180011389\nmov     r8d, 1406h                                                     ; +0x15b, 0x18001138b\nmov     [rsp+98h+var_78], 0                                            ; +0x161, 0x180011391\nlea     edx, [r9+2]                                                    ; +0x169, 0x180011399\ncall    qword ptr [rax]                                                ; +0x16d, 0x18001139d\nxor     edx, edx; first                                                ; +0x16f, 0x18001139f\nlea     r8d, [r14+1]; count                                            ; +0x171, 0x1800113a1\nlea     ecx, [rdx+6]; mode                                             ; +0x175, 0x1800113a5\ncall    cs:glDrawArrays                                                ; +0x178, 0x1800113a8\nmov     rcx, rsi; Block                                                ; +0x17e, 0x1800113ae\ncall    cs:__imp_free                                                  ; +0x181, 0x1800113b1\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x187, 0x1800113b7\nmovaps  xmm10, [rsp+98h+var_58]                                        ; +0x18d, 0x1800113bd\nmovaps  xmm9, [rsp+98h+var_48]                                         ; +0x193, 0x1800113c3\nmovaps  xmm7, [rsp+98h+var_28]                                         ; +0x199, 0x1800113c9\nlea     r11, [rsp+98h+var_8]                                           ; +0x19e, 0x1800113ce\nmov     rbx, [r11+18h]                                                 ; +0x1a6, 0x1800113d6\nmov     rsi, [r11+20h]                                                 ; +0x1aa, 0x1800113da\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x1ae, 0x1800113de\nmovaps  xmm11, xmmword ptr [r11-60h]                                   ; +0x1b3, 0x1800113e3\nmov     rsp, r11                                                       ; +0x1b8, 0x1800113e8\npop     r14                                                            ; +0x1bb, 0x1800113eb\nretn                                                                   ; +0x1bd, 0x1800113ed", "xrefs": ["<???> @ 0x180132620", "<???> @ 0x180132630", "<???> @ 0x1801438a8", "<???> @ 0x1801ae278"], "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"}