{"type": "func", "start": 6442520112, "end": 6442520666, "name": "cocos2d::ccDrawCircleSegment", "pseudocode": "// \n// cocos2d::ccDrawCircleSegment from 0x180010e30 to 0x18001105a (554 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x18013b4c8\n// > <???> @ 0x18013b510\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801b82b4\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::ccDrawCircleSegment(\n        cocos2d *this,\n        const struct cocos2d::CCPoint *a2,\n        float a3,\n        float a4,\n        int a5,\n        unsigned __int8 a6,\n        float a7,\n        float a8)\n{\n  float v8; // xmm1_4\n  float *v10; // rdi\n  int v11; // esi\n  float v12; // xmm9_4\n  float v13; // xmm10_4\n  __int64 v14; // rbx\n  float v15; // xmm6_4\n  cocos2d::CCGLProgram *v16; // rcx\n  unsigned int v17; // edx\n\n  if ( *(float *)&dword_1801ACB6C > 0.0 )\n  {\n    cocos2d::ccDrawInit(this);\n    v10 = (float *)calloc(8LL * (unsigned int)(a5 + 2), 1u);\n    if ( v10 )\n    {\n      v11 = 0;\n      v12 = *(float *)this;\n      v13 = *((float *)this + 1);\n      do\n      {\n        v14 = (unsigned int)(2 * v11);\n        v15 = (float)((float)v11 * (float)(a4 / (float)a5)) + a3;\n        v10[v14] = (float)((float)(cosf(v15) * v8) * a7) + v12;\n        ++v11;\n        v10[(unsigned int)(v14 + 1)] = (float)((float)(sinf(v15) * v8) * a8) + v13;\n      }\n      while ( v11 <= (unsigned int)a5 );\n      v16 = qword_1801B2358;\n      v10[2 * a5 + 2] = v12;\n      v10[2 * a5 + 3] = v13;\n      cocos2d::CCGLProgram::use(v16);\n      cocos2d::CCGLProgram::setUniformsForBuiltins(qword_1801B2358);\n      cocos2d::CCGLProgram::setUniformLocationWith4fv(qword_1801B2358, dword_1801ACB58, &flt_1801ACB60, 1u);\n      cocos2d::ccGLEnableVertexAttribs((cocos2d *)1, v17);\n      _glewVertexAttribPointer(0, 2, 5126, 0, 0, v10);\n      glDrawArrays(3u, 0, a6 + a5 + 1);\n      free(v10);\n      ++g_uNumberOfDraws;\n    }\n  }\n}", "assembly": "; \n; cocos2d::ccDrawCircleSegment from 0x180010e30 to 0x18001105a (554 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x18013b4c8\n; > <???> @ 0x18013b510\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801b82b4\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, 0x180010e30\npush    rbx                                                            ; +0x3, 0x180010e33\nsub     rsp, 0B0h                                                      ; +0x4, 0x180010e34\nmovaps  xmmword ptr [rax-28h], xmm7                                    ; +0xb, 0x180010e3b\nxorps   xmm0, xmm0                                                     ; +0xf, 0x180010e3f\ncomiss  xmm0, cs:dword_1801ACB6C                                       ; +0x12, 0x180010e42\nmov     rbx, rcx                                                       ; +0x19, 0x180010e49\nmovaps  xmmword ptr [rax-38h], xmm8                                    ; +0x1c, 0x180010e4c\nmovaps  xmm7, xmm3                                                     ; +0x21, 0x180010e51\nmovaps  xmmword ptr [rax-68h], xmm11                                   ; +0x24, 0x180010e54\nmovaps  xmm8, xmm1                                                     ; +0x29, 0x180010e59\nmovaps  xmm11, xmm2                                                    ; +0x2d, 0x180010e5d\njnb     loc_18001103E                                                  ; +0x31, 0x180010e61\nmov     [rax+8], rbp                                                   ; +0x37, 0x180010e67\nmov     [rax+18h], rdi                                                 ; +0x3b, 0x180010e6b\nmov     [rax+20h], r14                                                 ; +0x3f, 0x180010e6f\ncall    ?ccDrawInit@cocos2d@@YAXXZ_0; cocos2d::ccDrawInit(void)        ; +0x43, 0x180010e73\nmov     r14d, [rsp+0B8h+arg_20]                                        ; +0x48, 0x180010e78\nxorps   xmm0, xmm0                                                     ; +0x50, 0x180010e80\nmovzx   ebp, [rsp+0B8h+arg_28]                                         ; +0x53, 0x180010e83\nmov     edx, 1; Size                                                   ; +0x5b, 0x180010e8b\ncvtsi2ss xmm0, r14                                                     ; +0x60, 0x180010e90\nlea     ecx, [r14+2]                                                   ; +0x65, 0x180010e95\nshl     rcx, 3; Count                                                  ; +0x69, 0x180010e99\ndivss   xmm7, xmm0                                                     ; +0x6d, 0x180010e9d\ncall    cs:calloc                                                      ; +0x71, 0x180010ea1\nmov     rdi, rax                                                       ; +0x77, 0x180010ea7\ntest    rax, rax                                                       ; +0x7a, 0x180010eaa\njz      loc_180011026                                                  ; +0x7d, 0x180010ead\nmov     [rsp+0B8h+arg_8], rsi                                          ; +0x83, 0x180010eb3\nxor     esi, esi                                                       ; +0x8b, 0x180010ebb\nmovaps  [rsp+0B8h+var_18], xmm6                                        ; +0x8d, 0x180010ebd\nmovaps  [rsp+0B8h+var_48], xmm9                                        ; +0x95, 0x180010ec5\nmovss   xmm9, dword ptr [rbx]                                          ; +0x9b, 0x180010ecb\nmovaps  [rsp+0B8h+var_58], xmm10                                       ; +0xa0, 0x180010ed0\nmovss   xmm10, dword ptr [rbx+4]                                       ; +0xa6, 0x180010ed6\nmovaps  [rsp+0B8h+var_78], xmm12                                       ; +0xac, 0x180010edc\nmovss   xmm12, [rsp+0B8h+arg_38]                                       ; +0xb2, 0x180010ee2\nmovaps  [rsp+0B8h+var_88], xmm13                                       ; +0xbc, 0x180010eec\nmovss   xmm13, dword ptr [rsp+0B8h+arg_30]                             ; +0xc2, 0x180010ef2\nnop     dword ptr [rax+00h]                                            ; +0xcc, 0x180010efc\nxorps   xmm6, xmm6                                                     ; +0xd0, 0x180010f00\nmov     eax, esi                                                       ; +0xd3, 0x180010f03\nlea     ebx, [rsi+rsi]                                                 ; +0xd5, 0x180010f05\ncvtsi2ss xmm6, rax                                                     ; +0xd8, 0x180010f08\nmulss   xmm6, xmm7                                                     ; +0xdd, 0x180010f0d\naddss   xmm6, xmm11                                                    ; +0xe1, 0x180010f11\nmovaps  xmm0, xmm6; X                                                  ; +0xe6, 0x180010f16\ncall    cosf                                                           ; +0xe9, 0x180010f19\nmulss   xmm0, xmm8                                                     ; +0xee, 0x180010f1e\nmulss   xmm0, xmm13                                                    ; +0xf3, 0x180010f23\naddss   xmm0, xmm9                                                     ; +0xf8, 0x180010f28\nmovss   dword ptr [rdi+rbx*4], xmm0                                    ; +0xfd, 0x180010f2d\nmovaps  xmm0, xmm6; X                                                  ; +0x102, 0x180010f32\ncall    sinf                                                           ; +0x105, 0x180010f35\nmulss   xmm0, xmm8                                                     ; +0x10a, 0x180010f3a\nlea     eax, [rbx+1]                                                   ; +0x10f, 0x180010f3f\ninc     esi                                                            ; +0x112, 0x180010f42\nmulss   xmm0, xmm12                                                    ; +0x114, 0x180010f44\naddss   xmm0, xmm10                                                    ; +0x119, 0x180010f49\nmovss   dword ptr [rdi+rax*4], xmm0                                    ; +0x11e, 0x180010f4e\ncmp     esi, r14d                                                      ; +0x123, 0x180010f53\njbe     short loc_180010F00                                            ; +0x126, 0x180010f56\nmov     rcx, cs:qword_1801B2358; this                                  ; +0x128, 0x180010f58\nlea     r8d, [r14+r14]                                                 ; +0x12f, 0x180010f5f\nmovaps  xmm13, [rsp+0B8h+var_88]                                       ; +0x133, 0x180010f63\nlea     eax, [r8+2]                                                    ; +0x139, 0x180010f69\nmovaps  xmm12, [rsp+0B8h+var_78]                                       ; +0x13d, 0x180010f6d\nmovaps  xmm6, [rsp+0B8h+var_18]                                        ; +0x143, 0x180010f73\nmov     rsi, [rsp+0B8h+arg_8]                                          ; +0x14b, 0x180010f7b\nmovss   dword ptr [rdi+rax*4], xmm9                                    ; +0x153, 0x180010f83\nlea     eax, [r8+3]                                                    ; +0x159, 0x180010f89\nmovss   dword ptr [rdi+rax*4], xmm10                                   ; +0x15d, 0x180010f8d\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x163, 0x180010f93\nmov     rcx, cs:qword_1801B2358; this                                  ; +0x168, 0x180010f98\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x16f, 0x180010f9f\nmov     edx, cs:dword_1801ACB58; int                                   ; +0x174, 0x180010fa4\nlea     r8, flt_1801ACB60; float *                                     ; +0x17a, 0x180010faa\nmov     rcx, cs:qword_1801B2358; this                                  ; +0x181, 0x180010fb1\nmov     r9d, 1; unsigned int                                           ; +0x188, 0x180010fb8\ncall    ?setUniformLocationWith4fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWith4fv(int,float *,uint) ; +0x18e, 0x180010fbe\nmov     ecx, 1; this                                                   ; +0x193, 0x180010fc3\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x198, 0x180010fc8\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x19d, 0x180010fcd\nxor     r9d, r9d                                                       ; +0x1a4, 0x180010fd4\nmov     [rsp+0B8h+var_90], rdi                                         ; +0x1a7, 0x180010fd7\nmov     edx, 2                                                         ; +0x1ac, 0x180010fdc\nxor     ecx, ecx                                                       ; +0x1b1, 0x180010fe1\nmov     [rsp+0B8h+var_98], 0                                           ; +0x1b3, 0x180010fe3\nmov     r8d, 1406h                                                     ; +0x1bb, 0x180010feb\nmov     r10, [rax]                                                     ; +0x1c1, 0x180010ff1\ncall    r10                                                            ; +0x1c4, 0x180010ff4\nlea     r8d, [r14+1]                                                   ; +0x1c7, 0x180010ff7\nxor     edx, edx; first                                                ; +0x1cb, 0x180010ffb\nadd     r8d, ebp; count                                                ; +0x1cd, 0x180010ffd\nmov     ecx, 3; mode                                                   ; +0x1d0, 0x180011000\ncall    cs:glDrawArrays                                                ; +0x1d5, 0x180011005\nmov     rcx, rdi; Block                                                ; +0x1db, 0x18001100b\ncall    cs:__imp_free                                                  ; +0x1de, 0x18001100e\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x1e4, 0x180011014\nmovaps  xmm10, [rsp+0B8h+var_58]                                       ; +0x1ea, 0x18001101a\nmovaps  xmm9, [rsp+0B8h+var_48]                                        ; +0x1f0, 0x180011020\nmov     rdi, [rsp+0B8h+arg_10]                                         ; +0x1f6, 0x180011026\nmov     rbp, [rsp+0B8h+arg_0]                                          ; +0x1fe, 0x18001102e\nmov     r14, [rsp+0B8h+arg_18]                                         ; +0x206, 0x180011036\nlea     r11, [rsp+0B8h+var_8]                                          ; +0x20e, 0x18001103e\nmovaps  xmm7, xmmword ptr [r11-20h]                                    ; +0x216, 0x180011046\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x21b, 0x18001104b\nmovaps  xmm11, xmmword ptr [r11-60h]                                   ; +0x220, 0x180011050\nmov     rsp, r11                                                       ; +0x225, 0x180011055\npop     rbx                                                            ; +0x228, 0x180011058\nretn                                                                   ; +0x229, 0x180011059", "xrefs": ["<???> @ 0x18013b4c8", "<???> @ 0x18013b510", "<???> @ 0x18014cf68", "<???> @ 0x1801b82b4"], "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"}