{"type": "func", "start": 6442831024, "end": 6442831324, "name": "cocos2d::CCMotionStreak::draw", "pseudocode": "// \n// cocos2d::CCMotionStreak::draw from 0x18005ccb0 to 0x18005cddc (300 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x1800f9708\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b3108\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::CCMotionStreak::draw(cocos2d::CCMotionStreak *this, float a2)\n{\n  cocos2d::CCGLProgram *v3; // rax\n  cocos2d::CCGLProgram *v4; // rax\n  unsigned int v5; // edx\n  unsigned int v6; // r8d\n  unsigned int v7; // eax\n  unsigned int v8; // edx\n\n  if ( this->m_uNuPoints > 1 )\n  {\n    cocos2d::CCNode::updateTweenActionInt((cocos2d::CCNode *)(unsigned int)this->m_eGLServerState, a2);\n    ((void (__fastcall *)(cocos2d::CCMotionStreak *))this->getShaderProgram)(this);\n    v3 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCMotionStreak *))this->getShaderProgram)(this);\n    cocos2d::CCGLProgram::use(v3);\n    v4 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCMotionStreak *))this->getShaderProgram)(this);\n    cocos2d::CCGLProgram::setUniformsForBuiltins(v4);\n    cocos2d::ccGLEnableVertexAttribs((cocos2d *)7, v5);\n    cocos2d::ccGLBlendFunc(this->m_tBlendFunc.src, this->m_tBlendFunc.dst, v6);\n    v7 = ((__int64 (__fastcall *)(cocos2d::CCTexture2D *))this->m_pTexture->getName)(this->m_pTexture);\n    cocos2d::ccGLBindTexture2D((cocos2d *)v7, v8);\n    _glewVertexAttribPointer(0, 2, 5126);\n    _glewVertexAttribPointer(2, 2, 5126);\n    _glewVertexAttribPointer(1, 4, 5121);\n    glDrawArrays(5u, 0, 2 * this->m_uNuPoints);\n    ++g_uNumberOfDraws;\n  }\n}", "assembly": "; \n; cocos2d::CCMotionStreak::draw from 0x18005ccb0 to 0x18005cddc (300 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x1800f9708\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b3108\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\npush    rbx                                                            ; +0x0, 0x18005ccb0\nsub     rsp, 30h                                                       ; +0x2, 0x18005ccb2\ncmp     dword ptr [rcx+188h], 1                                        ; +0x6, 0x18005ccb6\nmov     rbx, rcx                                                       ; +0xd, 0x18005ccbd\njbe     loc_18005CDD6                                                  ; +0x10, 0x18005ccc0\nmov     ecx, [rcx+0F8h]; this                                          ; +0x16, 0x18005ccc6\ncall    ?updateTweenActionInt@CCNode@cocos2d@@UEAAXMH@Z; cocos2d::CCNode::updateTweenActionInt(float,int) ; +0x1c, 0x18005cccc\nmov     rax, [rbx]                                                     ; +0x21, 0x18005ccd1\nmov     rcx, rbx                                                       ; +0x24, 0x18005ccd4\ncall    qword ptr [rax+278h]                                           ; +0x27, 0x18005ccd7\nmov     rax, [rbx]                                                     ; +0x2d, 0x18005ccdd\nmov     rcx, rbx                                                       ; +0x30, 0x18005cce0\ncall    qword ptr [rax+278h]                                           ; +0x33, 0x18005cce3\nmov     rcx, rax; this                                                 ; +0x39, 0x18005cce9\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x3c, 0x18005ccec\nmov     rax, [rbx]                                                     ; +0x41, 0x18005ccf1\nmov     rcx, rbx                                                       ; +0x44, 0x18005ccf4\ncall    qword ptr [rax+278h]                                           ; +0x47, 0x18005ccf7\nmov     rcx, rax; this                                                 ; +0x4d, 0x18005ccfd\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x50, 0x18005cd00\nmov     ecx, 7; this                                                   ; +0x55, 0x18005cd05\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0x5a, 0x18005cd0a\nmov     edx, [rbx+174h]; dfactor                                       ; +0x5f, 0x18005cd0f\nmov     ecx, [rbx+170h]; sfactor                                       ; +0x65, 0x18005cd15\ncall    ?ccGLBlendFunc@cocos2d@@YAXII@Z; cocos2d::ccGLBlendFunc(uint,uint) ; +0x6b, 0x18005cd1b\nmov     rcx, [rbx+168h]                                                ; +0x70, 0x18005cd20\nmov     rax, [rcx]                                                     ; +0x77, 0x18005cd27\ncall    qword ptr [rax+60h]                                            ; +0x7a, 0x18005cd2a\nmov     ecx, eax; this                                                 ; +0x7d, 0x18005cd2d\ncall    ?ccGLBindTexture2D@cocos2d@@YAXI@Z; cocos2d::ccGLBindTexture2D(uint) ; +0x7f, 0x18005cd2f\nmov     rax, [rbx+1A0h]                                                ; +0x84, 0x18005cd34\nxor     r9d, r9d                                                       ; +0x8b, 0x18005cd3b\nmov     [rsp+38h+var_10], rax                                          ; +0x8e, 0x18005cd3e\nxor     ecx, ecx                                                       ; +0x93, 0x18005cd43\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x95, 0x18005cd45\nmov     r8d, 1406h                                                     ; +0x9c, 0x18005cd4c\nmov     [rsp+38h+var_18], 0                                            ; +0xa2, 0x18005cd52\nlea     edx, [r9+2]                                                    ; +0xaa, 0x18005cd5a\ncall    qword ptr [rax]                                                ; +0xae, 0x18005cd5e\nmov     rax, [rbx+1B0h]                                                ; +0xb0, 0x18005cd60\nmov     edx, 2                                                         ; +0xb7, 0x18005cd67\nmov     [rsp+38h+var_10], rax                                          ; +0xbc, 0x18005cd6c\nxor     r9d, r9d                                                       ; +0xc1, 0x18005cd71\nmov     rax, cs:__glewVertexAttribPointer                              ; +0xc4, 0x18005cd74\nmov     ecx, edx                                                       ; +0xcb, 0x18005cd7b\nmov     r8d, 1406h                                                     ; +0xcd, 0x18005cd7d\nmov     [rsp+38h+var_18], 0                                            ; +0xd3, 0x18005cd83\ncall    qword ptr [rax]                                                ; +0xdb, 0x18005cd8b\nmov     rax, [rbx+1A8h]                                                ; +0xdd, 0x18005cd8d\nmov     edx, 4                                                         ; +0xe4, 0x18005cd94\nmov     [rsp+38h+var_10], rax                                          ; +0xe9, 0x18005cd99\nmov     r9b, 1                                                         ; +0xee, 0x18005cd9e\nmov     rax, cs:__glewVertexAttribPointer                              ; +0xf1, 0x18005cda1\nmov     r8d, 1401h                                                     ; +0xf8, 0x18005cda8\nmov     [rsp+38h+var_18], 0                                            ; +0xfe, 0x18005cdae\nlea     ecx, [rdx-3]                                                   ; +0x106, 0x18005cdb6\ncall    qword ptr [rax]                                                ; +0x109, 0x18005cdb9\nmov     r8d, [rbx+188h]                                                ; +0x10b, 0x18005cdbb\nxor     edx, edx; first                                                ; +0x112, 0x18005cdc2\nadd     r8d, r8d; count                                                ; +0x114, 0x18005cdc4\nlea     ecx, [rdx+5]; mode                                             ; +0x117, 0x18005cdc7\ncall    cs:glDrawArrays                                                ; +0x11a, 0x18005cdca\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x120, 0x18005cdd0\nadd     rsp, 30h                                                       ; +0x126, 0x18005cdd6\npop     rbx                                                            ; +0x12a, 0x18005cdda\nretn                                                                   ; +0x12b, 0x18005cddb", "xrefs": ["<???> @ 0x1800f9708", "<???> @ 0x1801438a8", "<???> @ 0x1801b3108"], "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"}