{"type": "func", "start": 6442522544, "end": 6442522719, "name": "cocos2d::ccDrawPoly", "pseudocode": "// \n// cocos2d::ccDrawPoly from 0x1800117b0 to 0x18001185f (175 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ae2d8\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::ccDrawPoly(cocos2d *this, const struct cocos2d::CCPoint *a2, char a3)\n{\n  GLsizei v4; // esi\n  unsigned int v5; // edx\n  GLenum v6; // ecx\n\n  v4 = (int)a2;\n  cocos2d::ccDrawInit(this);\n  cocos2d::CCGLProgram::use((cocos2d::CCGLProgram *)qword_1801A8338);\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, v5);\n  _glewVertexAttribPointer(0, 2, 5126);\n  v6 = 2;\n  if ( !a3 )\n    v6 = 3;\n  glDrawArrays(v6, 0, v4);\n  ++g_uNumberOfDraws;\n}", "assembly": "; \n; cocos2d::ccDrawPoly from 0x1800117b0 to 0x18001185f (175 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ae2d8\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_0], rbx                                               ; +0x0, 0x1800117b0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800117b5\npush    rdi                                                            ; +0xa, 0x1800117ba\nsub     rsp, 30h                                                       ; +0xb, 0x1800117bb\nmovzx   edi, r8b                                                       ; +0xf, 0x1800117bf\nmov     esi, edx                                                       ; +0x13, 0x1800117c3\nmov     rbx, rcx                                                       ; +0x15, 0x1800117c5\ncall    ?ccDrawInit@cocos2d@@YAXXZ_0; cocos2d::ccDrawInit(void)        ; +0x18, 0x1800117c8\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x1d, 0x1800117cd\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x24, 0x1800117d4\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x29, 0x1800117d9\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x30, 0x1800117e0\nmov     edx, cs:dword_1801A2B58; int                                   ; +0x35, 0x1800117e5\nlea     r8, flt_1801A2B60; float *                                     ; +0x3b, 0x1800117eb\nmov     rcx, cs:qword_1801A8338; this                                  ; +0x42, 0x1800117f2\nmov     r9d, 1; unsigned int                                           ; +0x49, 0x1800117f9\ncall    ?setUniformLocationWith4fv@CCGLProgram@cocos2d@@QEAAXHPEAMI@Z; cocos2d::CCGLProgram::setUniformLocationWith4fv(int,float *,uint) ; +0x4f, 0x1800117ff\nmov     ecx, 1; this                                                   ; +0x54, 0x180011804\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x59, 0x180011809\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x5e, 0x18001180e\nxor     r9d, r9d                                                       ; +0x65, 0x180011815\nmov     [rsp+38h+var_10], rbx                                          ; +0x68, 0x180011818\nmov     r8d, 1406h                                                     ; +0x6d, 0x18001181d\nxor     ecx, ecx                                                       ; +0x73, 0x180011823\nmov     [rsp+38h+var_18], 0                                            ; +0x75, 0x180011825\nlea     edx, [r9+2]                                                    ; +0x7d, 0x18001182d\ncall    qword ptr [rax]                                                ; +0x81, 0x180011831\nxor     edx, edx; first                                                ; +0x83, 0x180011833\nmov     r8d, esi; count                                                ; +0x85, 0x180011835\nlea     ecx, [rdx+2]                                                   ; +0x88, 0x180011838\ntest    dil, dil                                                       ; +0x8b, 0x18001183b\njnz     short loc_180011843                                            ; +0x8e, 0x18001183e\nlea     ecx, [rdx+3]; mode                                             ; +0x90, 0x180011840\ncall    cs:glDrawArrays                                                ; +0x93, 0x180011843\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x99, 0x180011849\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x9f, 0x18001184f\nmov     rsi, [rsp+38h+arg_8]                                           ; +0xa4, 0x180011854\nadd     rsp, 30h                                                       ; +0xa9, 0x180011859\npop     rdi                                                            ; +0xad, 0x18001185d\nretn                                                                   ; +0xae, 0x18001185e", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801ae2d8"], "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"}