{"type": "func", "start": 6443230160, "end": 6443230437, "name": "cocos2d::CCDirector::drawScene", "pseudocode": "// \n// cocos2d::CCDirector::drawScene from 0x1800be3d0 to 0x1800be4e5 (277 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCDisplayLinkDirector::mainLoop @ 0x1800beb06\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b918c\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::CCDirector::drawScene(cocos2d::CCDirector *this)\n{\n  cocos2d::CCEGLView *m_pobOpenGLView; // rcx\n  cocos2d::CCScene *m_pRunningScene; // rcx\n  cocos2d::CCNode *m_pNotificationNode; // rcx\n  struct cocos2d::timezone *v5; // r8\n  cocos2d::CCEGLView *v6; // rcx\n  struct cocos2d::cc_timeval v7; // [rsp+30h] [rbp+8h] BYREF\n\n  if ( !this->m_bPaused )\n    ((void (__fastcall *)(cocos2d::CCScheduler *))this->m_pScheduler->update)(this->m_pScheduler);\n  m_pobOpenGLView = this->m_pobOpenGLView;\n  if ( m_pobOpenGLView )\n    ((void (__fastcall *)(cocos2d::CCEGLView *))m_pobOpenGLView->pollInputEvents)(m_pobOpenGLView);\n  glClear(0x4100u);\n  if ( this->m_pNextScene )\n    cocos2d::CCDirector::setNextScene(this);\n  kmGLPushMatrix();\n  m_pRunningScene = this->m_pRunningScene;\n  if ( m_pRunningScene )\n    ((void (__fastcall *)(cocos2d::CCScene *))m_pRunningScene->visit)(m_pRunningScene);\n  m_pNotificationNode = this->m_pNotificationNode;\n  if ( m_pNotificationNode )\n    ((void (__fastcall *)(cocos2d::CCNode *))m_pNotificationNode->visit)(m_pNotificationNode);\n  if ( this->m_bDisplayStats )\n    cocos2d::CCDirector::showStats(this);\n  if ( this->m_bDisplayFPS )\n    cocos2d::CCDirector::showFPSLabel(this);\n  kmGLPopMatrix();\n  v6 = this->m_pobOpenGLView;\n  ++this->m_uTotalFrames;\n  if ( v6 )\n    ((void (__fastcall *)(cocos2d::CCEGLView *))v6->swapBuffers)(v6);\n  if ( this->m_bDisplayStats )\n  {\n    cocos2d::CCTime::gettimeofdayCocos2d(&v7, nullptr, v5);\n    this->m_fSecondsPerFrame = (float)((float)(v7.tv_usec - this->m_pLastUpdate->tv_usec) / 1000000.0)\n                             + (float)(v7.tv_sec - this->m_pLastUpdate->tv_sec);\n  }\n}", "assembly": "; \n; cocos2d::CCDirector::drawScene from 0x1800be3d0 to 0x1800be4e5 (277 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCDisplayLinkDirector::mainLoop @ 0x1800beb06\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b918c\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, 0x1800be3d0\nsub     rsp, 20h                                                       ; +0x2, 0x1800be3d2\ncmp     byte ptr [rcx+0F8h], 0                                         ; +0x6, 0x1800be3d6\nmov     rbx, rcx                                                       ; +0xd, 0x1800be3dd\njnz     short loc_1800BE3F4                                            ; +0x10, 0x1800be3e0\nmov     rcx, [rcx+68h]                                                 ; +0x12, 0x1800be3e2\nmovss   xmm1, dword ptr [rbx+0A0h]                                     ; +0x16, 0x1800be3e6\nmov     rax, [rcx]                                                     ; +0x1e, 0x1800be3ee\ncall    qword ptr [rax+20h]                                            ; +0x21, 0x1800be3f1\nmov     rcx, [rbx+0B8h]                                                ; +0x24, 0x1800be3f4\ntest    rcx, rcx                                                       ; +0x2b, 0x1800be3fb\njz      short loc_1800BE409                                            ; +0x2e, 0x1800be3fe\nmov     rax, [rcx]                                                     ; +0x30, 0x1800be400\ncall    qword ptr [rax+0A8h]                                           ; +0x33, 0x1800be403\nmov     ecx, 4100h; mask                                               ; +0x39, 0x1800be409\ncall    cs:glClear                                                     ; +0x3e, 0x1800be40e\ncmp     qword ptr [rbx+110h], 0                                        ; +0x44, 0x1800be414\njz      short loc_1800BE426                                            ; +0x4c, 0x1800be41c\nmov     rcx, rbx; this                                                 ; +0x4e, 0x1800be41e\ncall    ?setNextScene@CCDirector@cocos2d@@IEAAXXZ; cocos2d::CCDirector::setNextScene(void) ; +0x51, 0x1800be421\ncall    kmGLPushMatrix                                                 ; +0x56, 0x1800be426\nmov     rcx, [rbx+108h]                                                ; +0x5b, 0x1800be42b\ntest    rcx, rcx                                                       ; +0x62, 0x1800be432\njz      short loc_1800BE440                                            ; +0x65, 0x1800be435\nmov     rax, [rcx]                                                     ; +0x67, 0x1800be437\ncall    qword ptr [rax+2D8h]                                           ; +0x6a, 0x1800be43a\nmov     rcx, [rbx+150h]                                                ; +0x70, 0x1800be440\ntest    rcx, rcx                                                       ; +0x77, 0x1800be447\njz      short loc_1800BE455                                            ; +0x7a, 0x1800be44a\nmov     rax, [rcx]                                                     ; +0x7c, 0x1800be44c\ncall    qword ptr [rax+2D8h]                                           ; +0x7f, 0x1800be44f\ncmp     byte ptr [rbx+0D1h], 0                                         ; +0x85, 0x1800be455\njz      short loc_1800BE466                                            ; +0x8c, 0x1800be45c\nmov     rcx, rbx; this                                                 ; +0x8e, 0x1800be45e\ncall    ?showStats@CCDirector@cocos2d@@IEAAXXZ; cocos2d::CCDirector::showStats(void) ; +0x91, 0x1800be461\ncmp     byte ptr [rbx+168h], 0                                         ; +0x96, 0x1800be466\njz      short loc_1800BE477                                            ; +0x9d, 0x1800be46d\nmov     rcx, rbx; this                                                 ; +0x9f, 0x1800be46f\ncall    ?showFPSLabel@CCDirector@cocos2d@@QEAAXXZ; cocos2d::CCDirector::showFPSLabel(void) ; +0xa2, 0x1800be472\ncall    kmGLPopMatrix                                                  ; +0xa7, 0x1800be477\nmov     rcx, [rbx+0B8h]                                                ; +0xac, 0x1800be47c\ninc     dword ptr [rbx+0FCh]                                           ; +0xb3, 0x1800be483\ntest    rcx, rcx                                                       ; +0xb9, 0x1800be489\njz      short loc_1800BE494                                            ; +0xbc, 0x1800be48c\nmov     rax, [rcx]                                                     ; +0xbe, 0x1800be48e\ncall    qword ptr [rax+18h]                                            ; +0xc1, 0x1800be491\ncmp     byte ptr [rbx+0D1h], 0                                         ; +0xc4, 0x1800be494\njz      short loc_1800BE4DF                                            ; +0xcb, 0x1800be49b\nxor     edx, edx; void *                                               ; +0xcd, 0x1800be49d\nlea     rcx, [rsp+28h+arg_0]; struct cocos2d::cc_timeval *             ; +0xcf, 0x1800be49f\ncall    ?gettimeofdayCocos2d@CCTime@cocos2d@@SAHPEAUcc_timeval@2@PEAX@Z; cocos2d::CCTime::gettimeofdayCocos2d(cocos2d::cc_timeval *,void *) ; +0xd4, 0x1800be4a4\nmov     rcx, [rbx+128h]                                                ; +0xd9, 0x1800be4a9\nmov     eax, [rsp+28h+arg_4]                                           ; +0xe0, 0x1800be4b0\nsub     eax, [rcx+4]                                                   ; +0xe4, 0x1800be4b4\nmovd    xmm1, eax                                                      ; +0xe7, 0x1800be4b7\nmov     eax, [rsp+28h+arg_0]                                           ; +0xeb, 0x1800be4bb\nsub     eax, [rcx]                                                     ; +0xef, 0x1800be4bf\ncvtdq2ps xmm1, xmm1                                                    ; +0xf1, 0x1800be4c1\nmovd    xmm0, eax                                                      ; +0xf4, 0x1800be4c4\ndivss   xmm1, cs:dword_1801075A4                                       ; +0xf8, 0x1800be4c8\ncvtdq2ps xmm0, xmm0                                                    ; +0x100, 0x1800be4d0\naddss   xmm1, xmm0                                                     ; +0x103, 0x1800be4d3\nmovss   dword ptr [rbx+104h], xmm1                                     ; +0x107, 0x1800be4d7\nadd     rsp, 20h                                                       ; +0x10f, 0x1800be4df\npop     rbx                                                            ; +0x113, 0x1800be4e3\nretn                                                                   ; +0x114, 0x1800be4e4", "xrefs": ["cocos2d::CCDisplayLinkDirector::mainLoop @ 0x1800beb06", "<???> @ 0x1801438a8", "<???> @ 0x1801b918c"], "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"}