{"type": "func", "start": 6442519104, "end": 6442519651, "name": "cocos2d::ccDrawCircle", "pseudocode": "// \n// cocos2d::ccDrawCircle from 0x180010a40 to 0x180010c63 (547 bytes)\n// \n// 5 xrefs:\n// > cocos2d::ccDrawCircle @ 0x180010a31\n// > <???> @ 0x18013251c\n// > <???> @ 0x180132564\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ae1c4\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::ccDrawCircle(\n        cocos2d *this,\n        const struct cocos2d::CCPoint *a2,\n        float a3,\n        float a4,\n        unsigned __int8 a5,\n        float a6,\n        float a7)\n{\n  int v7; // r9d\n  float v8; // xmm1_4\n  int v9; // r14d\n  float *v11; // rdi\n  int v12; // esi\n  float v13; // xmm9_4\n  float v14; // xmm10_4\n  __int64 v15; // rbx\n  float v16; // xmm6_4\n  cocos2d::CCGLProgram *v17; // rcx\n  unsigned int v18; // edx\n\n  v9 = v7;\n  if ( *(float *)&dword_1801A2B6C > 0.0 )\n  {\n    cocos2d::ccDrawInit(this);\n    v11 = (float *)calloc(8LL * (unsigned int)(v9 + 2), 1u);\n    if ( v11 )\n    {\n      v12 = 0;\n      v13 = *(float *)this;\n      v14 = *((float *)this + 1);\n      do\n      {\n        v15 = (unsigned int)(2 * v12);\n        v16 = (float)((float)v12 * (float)(6.2831855 / (float)v9)) + a3;\n        v11[v15] = (float)((float)(cosf(v16) * v8) * a6) + v13;\n        ++v12;\n        v11[(unsigned int)(v15 + 1)] = (float)((float)(sinf(v16) * v8) * a7) + v14;\n      }\n      while ( v12 <= (unsigned int)v9 );\n      v17 = (cocos2d::CCGLProgram *)qword_1801A8338;\n      v11[2 * v9 + 2] = v13;\n      v11[2 * v9 + 3] = v14;\n      cocos2d::CCGLProgram::use(v17);\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, v18);\n      _glewVertexAttribPointer(0, 2, 5126);\n      glDrawArrays(3u, 0, v9 + a5 + 1);\n      free(v11);\n      ++g_uNumberOfDraws;\n    }\n  }\n}", "assembly": "; \n; cocos2d::ccDrawCircle from 0x180010a40 to 0x180010c63 (547 bytes)\n; \n; 5 xrefs:\n; > cocos2d::ccDrawCircle @ 0x180010a31\n; > <???> @ 0x18013251c\n; > <???> @ 0x180132564\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ae1c4\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, 0x180010a40\nmov     [rax+20h], rbx                                                 ; +0x3, 0x180010a43\npush    r14                                                            ; +0x7, 0x180010a47\nsub     rsp, 0B0h                                                      ; +0x9, 0x180010a49\nmovaps  xmmword ptr [rax-38h], xmm8                                    ; +0x10, 0x180010a50\nxorps   xmm0, xmm0                                                     ; +0x15, 0x180010a55\ncomiss  xmm0, cs:dword_1801A2B6C                                       ; +0x18, 0x180010a58\nmov     r14d, r9d                                                      ; +0x1f, 0x180010a5f\nmov     rbx, rcx                                                       ; +0x22, 0x180010a62\nmovaps  xmmword ptr [rax-68h], xmm11                                   ; +0x25, 0x180010a65\nmovaps  xmm8, xmm1                                                     ; +0x2a, 0x180010a6a\nmovaps  xmm11, xmm2                                                    ; +0x2e, 0x180010a6e\njnb     loc_180010C47                                                  ; +0x32, 0x180010a72\nmov     [rax+8], rbp                                                   ; +0x38, 0x180010a78\nmov     [rax+18h], rdi                                                 ; +0x3c, 0x180010a7c\nmovaps  xmmword ptr [rax-28h], xmm7                                    ; +0x40, 0x180010a80\ncall    ?ccDrawInit@cocos2d@@YAXXZ_0; cocos2d::ccDrawInit(void)        ; +0x44, 0x180010a84\nmovss   xmm7, cs:dword_1800E6704                                       ; +0x49, 0x180010a89\nlea     ecx, [r14+2]                                                   ; +0x51, 0x180010a91\nmovzx   ebp, [rsp+0B8h+arg_20]                                         ; +0x55, 0x180010a95\nxorps   xmm0, xmm0                                                     ; +0x5d, 0x180010a9d\ncvtsi2ss xmm0, r14                                                     ; +0x60, 0x180010aa0\nshl     rcx, 3; Count                                                  ; +0x65, 0x180010aa5\nmov     edx, 1; Size                                                   ; +0x69, 0x180010aa9\ndivss   xmm7, xmm0                                                     ; +0x6e, 0x180010aae\ncall    cs:calloc                                                      ; +0x72, 0x180010ab2\nmov     rdi, rax                                                       ; +0x78, 0x180010ab8\ntest    rax, rax                                                       ; +0x7b, 0x180010abb\njz      loc_180010C2F                                                  ; +0x7e, 0x180010abe\nmov     [rsp+0B8h+arg_8], rsi                                          ; +0x84, 0x180010ac4\nxor     esi, esi                                                       ; +0x8c, 0x180010acc\nmovaps  [rsp+0B8h+var_18], xmm6                                        ; +0x8e, 0x180010ace\nmovaps  [rsp+0B8h+var_48], xmm9                                        ; +0x96, 0x180010ad6\nmovss   xmm9, dword ptr [rbx]                                          ; +0x9c, 0x180010adc\nmovaps  [rsp+0B8h+var_58], xmm10                                       ; +0xa1, 0x180010ae1\nmovss   xmm10, dword ptr [rbx+4]                                       ; +0xa7, 0x180010ae7\nmovaps  [rsp+0B8h+var_78], xmm12                                       ; +0xad, 0x180010aed\nmovss   xmm12, [rsp+0B8h+arg_30]                                       ; +0xb3, 0x180010af3\nmovaps  [rsp+0B8h+var_88], xmm13                                       ; +0xbd, 0x180010afd\nmovss   xmm13, dword ptr [rsp+0B8h+arg_28]                             ; +0xc3, 0x180010b03\nnop     dword ptr [rax]                                                ; +0xcd, 0x180010b0d\nxorps   xmm6, xmm6                                                     ; +0xd0, 0x180010b10\nmov     eax, esi                                                       ; +0xd3, 0x180010b13\nlea     ebx, [rsi+rsi]                                                 ; +0xd5, 0x180010b15\ncvtsi2ss xmm6, rax                                                     ; +0xd8, 0x180010b18\nmulss   xmm6, xmm7                                                     ; +0xdd, 0x180010b1d\naddss   xmm6, xmm11                                                    ; +0xe1, 0x180010b21\nmovaps  xmm0, xmm6; X                                                  ; +0xe6, 0x180010b26\ncall    cosf                                                           ; +0xe9, 0x180010b29\nmulss   xmm0, xmm8                                                     ; +0xee, 0x180010b2e\nmulss   xmm0, xmm13                                                    ; +0xf3, 0x180010b33\naddss   xmm0, xmm9                                                     ; +0xf8, 0x180010b38\nmovss   dword ptr [rdi+rbx*4], xmm0                                    ; +0xfd, 0x180010b3d\nmovaps  xmm0, xmm6; X                                                  ; +0x102, 0x180010b42\ncall    sinf                                                           ; +0x105, 0x180010b45\nmulss   xmm0, xmm8                                                     ; +0x10a, 0x180010b4a\nlea     eax, [rbx+1]                                                   ; +0x10f, 0x180010b4f\ninc     esi                                                            ; +0x112, 0x180010b52\nmulss   xmm0, xmm12                                                    ; +0x114, 0x180010b54\naddss   xmm0, xmm10                                                    ; +0x119, 0x180010b59\nmovss   dword ptr [rdi+rax*4], xmm0                                    ; +0x11e, 0x180010b5e\ncmp     esi, r14d                                                      ; +0x123, 0x180010b63\njbe     short loc_180010B10                                            ; +0x126, 0x180010b66\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x128, 0x180010b68\nlea     r8d, [r14+r14]                                                 ; +0x12f, 0x180010b6f\nmovaps  xmm13, [rsp+0B8h+var_88]                                       ; +0x133, 0x180010b73\nlea     eax, [r8+2]                                                    ; +0x139, 0x180010b79\nmovaps  xmm12, [rsp+0B8h+var_78]                                       ; +0x13d, 0x180010b7d\nmovaps  xmm6, [rsp+0B8h+var_18]                                        ; +0x143, 0x180010b83\nmov     rsi, [rsp+0B8h+arg_8]                                          ; +0x14b, 0x180010b8b\nmovss   dword ptr [rdi+rax*4], xmm9                                    ; +0x153, 0x180010b93\nlea     eax, [r8+3]                                                    ; +0x159, 0x180010b99\nmovss   dword ptr [rdi+rax*4], xmm10                                   ; +0x15d, 0x180010b9d\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x163, 0x180010ba3\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x168, 0x180010ba8\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x16f, 0x180010baf\nmov     edx, cs:dword_1801A2B58; int                                   ; +0x174, 0x180010bb4\nlea     r8, flt_1801A2B60; float *                                     ; +0x17a, 0x180010bba\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x181, 0x180010bc1\nmov     r9d, 1; unsigned int                                           ; +0x188, 0x180010bc8\ncall    ?setUniformLocationWith4fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWith4fv(int,float *,uint) ; +0x18e, 0x180010bce\nmov     ecx, 1; this                                                   ; +0x193, 0x180010bd3\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x198, 0x180010bd8\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x19d, 0x180010bdd\nxor     r9d, r9d                                                       ; +0x1a4, 0x180010be4\nmov     [rsp+0B8h+var_90], rdi                                         ; +0x1a7, 0x180010be7\nxor     ecx, ecx                                                       ; +0x1ac, 0x180010bec\nmov     r8d, 1406h                                                     ; +0x1ae, 0x180010bee\nmov     [rsp+0B8h+var_98], 0                                           ; +0x1b4, 0x180010bf4\nlea     edx, [r9+2]                                                    ; +0x1bc, 0x180010bfc\ncall    qword ptr [rax]                                                ; +0x1c0, 0x180010c00\nxor     edx, edx; first                                                ; +0x1c2, 0x180010c02\nlea     r8d, [rbp+1]                                                   ; +0x1c4, 0x180010c04\nadd     r8d, r14d; count                                               ; +0x1c8, 0x180010c08\nlea     ecx, [rdx+3]; mode                                             ; +0x1cb, 0x180010c0b\ncall    cs:glDrawArrays                                                ; +0x1ce, 0x180010c0e\nmov     rcx, rdi; Block                                                ; +0x1d4, 0x180010c14\ncall    cs:__imp_free                                                  ; +0x1d7, 0x180010c17\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x1dd, 0x180010c1d\nmovaps  xmm10, [rsp+0B8h+var_58]                                       ; +0x1e3, 0x180010c23\nmovaps  xmm9, [rsp+0B8h+var_48]                                        ; +0x1e9, 0x180010c29\nmov     rdi, [rsp+0B8h+arg_10]                                         ; +0x1ef, 0x180010c2f\nmov     rbp, [rsp+0B8h+arg_0]                                          ; +0x1f7, 0x180010c37\nmovaps  xmm7, [rsp+0B8h+var_28]                                        ; +0x1ff, 0x180010c3f\nlea     r11, [rsp+0B8h+var_8]                                          ; +0x207, 0x180010c47\nmov     rbx, [r11+28h]                                                 ; +0x20f, 0x180010c4f\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x213, 0x180010c53\nmovaps  xmm11, xmmword ptr [r11-60h]                                   ; +0x218, 0x180010c58\nmov     rsp, r11                                                       ; +0x21d, 0x180010c5d\npop     r14                                                            ; +0x220, 0x180010c60\nretn                                                                   ; +0x222, 0x180010c62", "xrefs": ["cocos2d::ccDrawCircle @ 0x180010a31", "<???> @ 0x18013251c", "<???> @ 0x180132564", "<???> @ 0x1801438a8", "<???> @ 0x1801ae1c4"], "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"}