{"type": "func", "start": 6442834736, "end": 6442835247, "name": "cocos2d::CCProgressTimer::draw", "pseudocode": "// \n// cocos2d::CCProgressTimer::draw from 0x18005db30 to 0x18005dd2f (511 bytes)\n// \n// 5 xrefs:\n// > <???> @ 0x1800f9b20\n// > <???> @ 0x180139368\n// > <???> @ 0x180139378\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b31ec\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::CCProgressTimer::draw(cocos2d::CCProgressTimer *this, float a2)\n{\n  cocos2d::CCGLProgram *v3; // rax\n  cocos2d::CCGLProgram *v4; // rax\n  GLenum v5; // ebx\n  GLenum *v6; // rax\n  unsigned int v7; // r8d\n  unsigned int v8; // edx\n  __int64 v9; // rax\n  unsigned int v10; // eax\n  unsigned int v11; // edx\n  cocos2d::CCProgressTimerType m_eType; // eax\n  GLsizei m_nVertexDataCount; // eax\n  char v14; // [rsp+40h] [rbp+8h] BYREF\n  char v15; // [rsp+48h] [rbp+10h] BYREF\n\n  if ( this->m_pVertexData && this->m_pSprite )\n  {\n    cocos2d::CCNode::updateTweenActionInt((cocos2d::CCNode *)(unsigned int)this->m_eGLServerState, a2);\n    ((void (__fastcall *)(cocos2d::CCProgressTimer *))this->getShaderProgram)(this);\n    v3 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCProgressTimer *))this->getShaderProgram)(this);\n    cocos2d::CCGLProgram::use(v3);\n    v4 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCProgressTimer *))this->getShaderProgram)(this);\n    cocos2d::CCGLProgram::setUniformsForBuiltins(v4);\n    v5 = *(_DWORD *)(((__int64 (__fastcall *)(cocos2d::CCTextureProtocol *, char *))this->m_pSprite->getBlendFunc)(\n                       &this->m_pSprite->cocos2d::CCTextureProtocol,\n                       &v14)\n                   + 4);\n    v6 = (GLenum *)((__int64 (__fastcall *)(cocos2d::CCTextureProtocol *, char *))this->m_pSprite->getBlendFunc)(\n                     &this->m_pSprite->cocos2d::CCTextureProtocol,\n                     &v15);\n    cocos2d::ccGLBlendFunc(*v6, v5, v7);\n    cocos2d::ccGLEnableVertexAttribs((cocos2d *)7, v8);\n    v9 = ((__int64 (__fastcall *)(cocos2d::CCTextureProtocol *))this->m_pSprite->getTexture)(&this->m_pSprite->cocos2d::CCTextureProtocol);\n    v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 96LL))(v9);\n    cocos2d::ccGLBindTexture2D((cocos2d *)v10, v11);\n    _glewVertexAttribPointer(0, 2, 5126);\n    _glewVertexAttribPointer(2, 2, 5126);\n    _glewVertexAttribPointer(1, 4, 5121);\n    m_eType = this->m_eType;\n    if ( m_eType == kCCProgressTimerTypeRadial )\n    {\n      glDrawArrays(6u, 0, this->m_nVertexDataCount);\n      ++g_uNumberOfDraws;\n      return;\n    }\n    if ( m_eType == kCCProgressTimerTypeBar )\n    {\n      m_nVertexDataCount = this->m_nVertexDataCount;\n      if ( !this->m_bReverseDirection )\n      {\n        glDrawArrays(5u, 0, m_nVertexDataCount);\n        ++g_uNumberOfDraws;\n        return;\n      }\n      glDrawArrays(5u, 0, m_nVertexDataCount / 2);\n      glDrawArrays(5u, 4, this->m_nVertexDataCount / 2);\n      ++g_uNumberOfDraws;\n    }\n    ++g_uNumberOfDraws;\n  }\n}", "assembly": "; \n; cocos2d::CCProgressTimer::draw from 0x18005db30 to 0x18005dd2f (511 bytes)\n; \n; 5 xrefs:\n; > <???> @ 0x1800f9b20\n; > <???> @ 0x180139368\n; > <???> @ 0x180139378\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b31ec\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    rdi                                                            ; +0x0, 0x18005db30\nsub     rsp, 30h                                                       ; +0x2, 0x18005db32\ncmp     qword ptr [rcx+170h], 0                                        ; +0x6, 0x18005db36\nmov     rdi, rcx                                                       ; +0xe, 0x18005db3e\njz      loc_18005DD29                                                  ; +0x11, 0x18005db41\ncmp     qword ptr [rcx+160h], 0                                        ; +0x17, 0x18005db47\njz      loc_18005DD29                                                  ; +0x1f, 0x18005db4f\nmov     ecx, [rcx+0F8h]; this                                          ; +0x25, 0x18005db55\nmov     [rsp+38h+arg_10], rbx                                          ; +0x2b, 0x18005db5b\ncall    ?updateTweenActionInt@CCNode@cocos2d@@UEAAXMH@Z; cocos2d::CCNode::updateTweenActionInt(float,int) ; +0x30, 0x18005db60\nmov     rax, [rdi]                                                     ; +0x35, 0x18005db65\nmov     rcx, rdi                                                       ; +0x38, 0x18005db68\ncall    qword ptr [rax+278h]                                           ; +0x3b, 0x18005db6b\nmov     rax, [rdi]                                                     ; +0x41, 0x18005db71\nmov     rcx, rdi                                                       ; +0x44, 0x18005db74\ncall    qword ptr [rax+278h]                                           ; +0x47, 0x18005db77\nmov     rcx, rax; this                                                 ; +0x4d, 0x18005db7d\ncall    ?use@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::use(void) ; +0x50, 0x18005db80\nmov     rax, [rdi]                                                     ; +0x55, 0x18005db85\nmov     rcx, rdi                                                       ; +0x58, 0x18005db88\ncall    qword ptr [rax+278h]                                           ; +0x5b, 0x18005db8b\nmov     rcx, rax; this                                                 ; +0x61, 0x18005db91\ncall    ?setUniformsForBuiltins@CCGLProgram@cocos2d@@QEAAXXZ; cocos2d::CCGLProgram::setUniformsForBuiltins(void) ; +0x64, 0x18005db94\nmov     rcx, [rdi+160h]                                                ; +0x69, 0x18005db99\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x70, 0x18005dba0\nadd     rcx, 158h                                                      ; +0x75, 0x18005dba5\nmov     rax, [rcx]                                                     ; +0x7c, 0x18005dbac\ncall    qword ptr [rax+8]                                              ; +0x7f, 0x18005dbaf\nmov     rcx, [rdi+160h]                                                ; +0x82, 0x18005dbb2\nlea     rdx, [rsp+38h+arg_8]                                           ; +0x89, 0x18005dbb9\nadd     rcx, 158h                                                      ; +0x8e, 0x18005dbbe\nmov     ebx, [rax+4]                                                   ; +0x95, 0x18005dbc5\nmov     rax, [rcx]                                                     ; +0x98, 0x18005dbc8\ncall    qword ptr [rax+8]                                              ; +0x9b, 0x18005dbcb\nmov     edx, ebx; dfactor                                              ; +0x9e, 0x18005dbce\nmov     ecx, [rax]; sfactor                                            ; +0xa0, 0x18005dbd0\ncall    ?ccGLBlendFunc@cocos2d@@YAXII@Z; cocos2d::ccGLBlendFunc(uint,uint) ; +0xa2, 0x18005dbd2\nmov     ecx, 7; this                                                   ; +0xa7, 0x18005dbd7\ncall    ?ccGLEnableVertexAttribs@cocos2d@@YAXI@Z; cocos2d::ccGLEnableVertexAttribs(uint) ; +0xac, 0x18005dbdc\nmov     rcx, [rdi+160h]                                                ; +0xb1, 0x18005dbe1\nadd     rcx, 158h                                                      ; +0xb8, 0x18005dbe8\nmov     rax, [rcx]                                                     ; +0xbf, 0x18005dbef\ncall    qword ptr [rax+10h]                                            ; +0xc2, 0x18005dbf2\nmov     rcx, rax                                                       ; +0xc5, 0x18005dbf5\nmov     rdx, [rax]                                                     ; +0xc8, 0x18005dbf8\ncall    qword ptr [rdx+60h]                                            ; +0xcb, 0x18005dbfb\nmov     ecx, eax; this                                                 ; +0xce, 0x18005dbfe\ncall    ?ccGLBindTexture2D@cocos2d@@YAXI@Z; cocos2d::ccGLBindTexture2D(uint) ; +0xd0, 0x18005dc00\nmov     rax, [rdi+170h]                                                ; +0xd5, 0x18005dc05\nxor     r9d, r9d                                                       ; +0xdc, 0x18005dc0c\nmov     [rsp+38h+var_10], rax                                          ; +0xdf, 0x18005dc0f\nxor     ecx, ecx                                                       ; +0xe4, 0x18005dc14\nmov     rax, cs:__glewVertexAttribPointer                              ; +0xe6, 0x18005dc16\nmov     r8d, 1406h                                                     ; +0xed, 0x18005dc1d\nmov     [rsp+38h+var_18], 14h                                          ; +0xf3, 0x18005dc23\nlea     edx, [r9+2]                                                    ; +0xfb, 0x18005dc2b\ncall    qword ptr [rax]                                                ; +0xff, 0x18005dc2f\nmov     rax, [rdi+170h]                                                ; +0x101, 0x18005dc31\nmov     edx, 2                                                         ; +0x108, 0x18005dc38\nadd     rax, 0Ch                                                       ; +0x10d, 0x18005dc3d\nxor     r9d, r9d                                                       ; +0x111, 0x18005dc41\nmov     [rsp+38h+var_10], rax                                          ; +0x114, 0x18005dc44\nmov     ecx, edx                                                       ; +0x119, 0x18005dc49\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x11b, 0x18005dc4b\nmov     r8d, 1406h                                                     ; +0x122, 0x18005dc52\nmov     [rsp+38h+var_18], 14h                                          ; +0x128, 0x18005dc58\ncall    qword ptr [rax]                                                ; +0x130, 0x18005dc60\nmov     rax, [rdi+170h]                                                ; +0x132, 0x18005dc62\nmov     edx, 4                                                         ; +0x139, 0x18005dc69\nadd     rax, 8                                                         ; +0x13e, 0x18005dc6e\nmov     r9b, 1                                                         ; +0x142, 0x18005dc72\nmov     [rsp+38h+var_10], rax                                          ; +0x145, 0x18005dc75\nmov     r8d, 1401h                                                     ; +0x14a, 0x18005dc7a\nmov     rax, cs:__glewVertexAttribPointer                              ; +0x150, 0x18005dc80\nlea     ecx, [rdx-3]                                                   ; +0x157, 0x18005dc87\nmov     [rsp+38h+var_18], 14h                                          ; +0x15a, 0x18005dc8a\ncall    qword ptr [rax]                                                ; +0x162, 0x18005dc92\nmov     eax, [rdi+158h]                                                ; +0x164, 0x18005dc94\nmov     rbx, [rsp+38h+arg_10]                                          ; +0x16a, 0x18005dc9a\ntest    eax, eax                                                       ; +0x16f, 0x18005dc9f\njnz     short loc_18005DCC1                                            ; +0x171, 0x18005dca1\nmov     r8d, [rdi+168h]; count                                         ; +0x173, 0x18005dca3\nlea     ecx, [rax+6]; mode                                             ; +0x17a, 0x18005dcaa\nxor     edx, edx; first                                                ; +0x17d, 0x18005dcad\ncall    cs:glDrawArrays                                                ; +0x17f, 0x18005dcaf\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x185, 0x18005dcb5\nadd     rsp, 30h                                                       ; +0x18b, 0x18005dcbb\npop     rdi                                                            ; +0x18f, 0x18005dcbf\nretn                                                                   ; +0x190, 0x18005dcc0\ncmp     eax, 1                                                         ; +0x191, 0x18005dcc1\njnz     short loc_18005DD23                                            ; +0x194, 0x18005dcc4\ncmp     byte ptr [rdi+188h], 0                                         ; +0x196, 0x18005dcc6\nmov     ecx, 5; mode                                                   ; +0x19d, 0x18005dccd\nmov     eax, [rdi+168h]                                                ; +0x1a2, 0x18005dcd2\njnz     short loc_18005DCF1                                            ; +0x1a8, 0x18005dcd8\nmov     r8d, eax; count                                                ; +0x1aa, 0x18005dcda\nxor     edx, edx; first                                                ; +0x1ad, 0x18005dcdd\ncall    cs:glDrawArrays                                                ; +0x1af, 0x18005dcdf\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x1b5, 0x18005dce5\nadd     rsp, 30h                                                       ; +0x1bb, 0x18005dceb\npop     rdi                                                            ; +0x1bf, 0x18005dcef\nretn                                                                   ; +0x1c0, 0x18005dcf0\ncdq                                                                    ; +0x1c1, 0x18005dcf1\nsub     eax, edx                                                       ; +0x1c2, 0x18005dcf2\nxor     edx, edx; first                                                ; +0x1c4, 0x18005dcf4\nsar     eax, 1                                                         ; +0x1c6, 0x18005dcf6\nmov     r8d, eax; count                                                ; +0x1c8, 0x18005dcf8\ncall    cs:glDrawArrays                                                ; +0x1cb, 0x18005dcfb\nmov     eax, [rdi+168h]                                                ; +0x1d1, 0x18005dd01\ncdq                                                                    ; +0x1d7, 0x18005dd07\nsub     eax, edx                                                       ; +0x1d8, 0x18005dd08\nmov     edx, 4; first                                                  ; +0x1da, 0x18005dd0a\nsar     eax, 1                                                         ; +0x1df, 0x18005dd0f\nmov     r8d, eax; count                                                ; +0x1e1, 0x18005dd11\nlea     ecx, [rdx+1]; mode                                             ; +0x1e4, 0x18005dd14\ncall    cs:glDrawArrays                                                ; +0x1e7, 0x18005dd17\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x1ed, 0x18005dd1d\ninc     cs:?g_uNumberOfDraws@@3IA; uint g_uNumberOfDraws               ; +0x1f3, 0x18005dd23\nadd     rsp, 30h                                                       ; +0x1f9, 0x18005dd29\npop     rdi                                                            ; +0x1fd, 0x18005dd2d\nretn                                                                   ; +0x1fe, 0x18005dd2e", "xrefs": ["<???> @ 0x1800f9b20", "<???> @ 0x180139368", "<???> @ 0x180139378", "<???> @ 0x1801438a8", "<???> @ 0x1801b31ec"], "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"}