{"type": "func", "start": 6443235088, "end": 6443235348, "name": "cocos2d::CCDirector::setNextScene", "pseudocode": "// \n// cocos2d::CCDirector::setNextScene from 0x1800bf710 to 0x1800bf814 (260 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCDirector::drawScene @ 0x1800be421\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b9330\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::setNextScene(cocos2d::CCDirector *this)\n{\n  __int64 v2; // rdi\n  cocos2d::CCScene *m_pRunningScene; // rcx\n  cocos2d::CCScene *v4; // rcx\n  cocos2d::CCScene *v5; // rcx\n  cocos2d::CCScene *m_pNextScene; // rcx\n  cocos2d::CCScene *v7; // rcx\n\n  v2 = _RTDynamicCast(\n         this->m_pRunningScene,\n         0,\n         &cocos2d::CCScene `RTTI Type Descriptor',\n         &cocos2d::CCTransitionScene `RTTI Type Descriptor',\n         0);\n  if ( !_RTDynamicCast(\n          this->m_pNextScene,\n          0,\n          &cocos2d::CCScene `RTTI Type Descriptor',\n          &cocos2d::CCTransitionScene `RTTI Type Descriptor',\n          0) )\n  {\n    m_pRunningScene = this->m_pRunningScene;\n    if ( m_pRunningScene )\n    {\n      ((void (__fastcall *)(cocos2d::CCScene *))m_pRunningScene->onExitTransitionDidStart)(m_pRunningScene);\n      ((void (__fastcall *)(cocos2d::CCScene *))this->m_pRunningScene->onExit)(this->m_pRunningScene);\n    }\n    if ( this->m_bSendCleanupToScene )\n    {\n      v4 = this->m_pRunningScene;\n      if ( v4 )\n        ((void (__fastcall *)(cocos2d::CCScene *))v4->cleanup)(v4);\n    }\n  }\n  v5 = this->m_pRunningScene;\n  if ( v5 )\n    cocos2d::CCObject::release(v5);\n  m_pNextScene = this->m_pNextScene;\n  this->m_pRunningScene = m_pNextScene;\n  cocos2d::CCObject::retain(m_pNextScene);\n  this->m_pNextScene = nullptr;\n  if ( !v2 )\n  {\n    v7 = this->m_pRunningScene;\n    if ( v7 )\n    {\n      ((void (__fastcall *)(cocos2d::CCScene *))v7->onEnter)(v7);\n      ((void (__fastcall *)(cocos2d::CCScene *))this->m_pRunningScene->onEnterTransitionDidFinish)(this->m_pRunningScene);\n    }\n  }\n}", "assembly": "; \n; cocos2d::CCDirector::setNextScene from 0x1800bf710 to 0x1800bf814 (260 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCDirector::drawScene @ 0x1800be421\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b9330\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, 0x1800bf710\npush    rdi                                                            ; +0x5, 0x1800bf715\nsub     rsp, 30h                                                       ; +0x6, 0x1800bf716\nmov     rbx, rcx                                                       ; +0xa, 0x1800bf71a\nmov     [rsp+38h+var_18], 0                                            ; +0xd, 0x1800bf71d\nmov     rcx, [rcx+108h]                                                ; +0x15, 0x1800bf725\nlea     r9, ??_R0?AVCCTransitionScene@cocos2d@@@8; cocos2d::CCTransitionScene `RTTI Type Descriptor' ; +0x1c, 0x1800bf72c\nlea     r8, ??_R0?AVCCScene@cocos2d@@@8; cocos2d::CCScene `RTTI Type Descriptor' ; +0x23, 0x1800bf733\nxor     edx, edx                                                       ; +0x2a, 0x1800bf73a\ncall    __RTDynamicCast                                                ; +0x2c, 0x1800bf73c\nmov     rcx, [rbx+110h]                                                ; +0x31, 0x1800bf741\nlea     r9, ??_R0?AVCCTransitionScene@cocos2d@@@8; cocos2d::CCTransitionScene `RTTI Type Descriptor' ; +0x38, 0x1800bf748\nlea     r8, ??_R0?AVCCScene@cocos2d@@@8; cocos2d::CCScene `RTTI Type Descriptor' ; +0x3f, 0x1800bf74f\nmov     [rsp+38h+var_18], 0                                            ; +0x46, 0x1800bf756\nxor     edx, edx                                                       ; +0x4e, 0x1800bf75e\nmov     rdi, rax                                                       ; +0x50, 0x1800bf760\ncall    __RTDynamicCast                                                ; +0x53, 0x1800bf763\ntest    rax, rax                                                       ; +0x58, 0x1800bf768\njnz     short loc_1800BF7B0                                            ; +0x5b, 0x1800bf76b\nmov     rcx, [rbx+108h]                                                ; +0x5d, 0x1800bf76d\ntest    rcx, rcx                                                       ; +0x64, 0x1800bf774\njz      short loc_1800BF792                                            ; +0x67, 0x1800bf777\nmov     rax, [rcx]                                                     ; +0x69, 0x1800bf779\ncall    qword ptr [rax+2C0h]                                           ; +0x6c, 0x1800bf77c\nmov     rcx, [rbx+108h]                                                ; +0x72, 0x1800bf782\nmov     rax, [rcx]                                                     ; +0x79, 0x1800bf789\ncall    qword ptr [rax+2B8h]                                           ; +0x7c, 0x1800bf78c\ncmp     byte ptr [rbx+118h], 0                                         ; +0x82, 0x1800bf792\njz      short loc_1800BF7B0                                            ; +0x89, 0x1800bf799\nmov     rcx, [rbx+108h]                                                ; +0x8b, 0x1800bf79b\ntest    rcx, rcx                                                       ; +0x92, 0x1800bf7a2\njz      short loc_1800BF7B0                                            ; +0x95, 0x1800bf7a5\nmov     rax, [rcx]                                                     ; +0x97, 0x1800bf7a7\ncall    qword ptr [rax+2C8h]                                           ; +0x9a, 0x1800bf7aa\nmov     rcx, [rbx+108h]; this                                          ; +0xa0, 0x1800bf7b0\ntest    rcx, rcx                                                       ; +0xa7, 0x1800bf7b7\njz      short loc_1800BF7C1                                            ; +0xaa, 0x1800bf7ba\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xac, 0x1800bf7bc\nmov     rcx, [rbx+110h]; this                                          ; +0xb1, 0x1800bf7c1\nmov     [rbx+108h], rcx                                                ; +0xb8, 0x1800bf7c8\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0xbf, 0x1800bf7cf\nmov     qword ptr [rbx+110h], 0                                        ; +0xc4, 0x1800bf7d4\ntest    rdi, rdi                                                       ; +0xcf, 0x1800bf7df\njnz     short loc_1800BF809                                            ; +0xd2, 0x1800bf7e2\nmov     rcx, [rbx+108h]                                                ; +0xd4, 0x1800bf7e4\ntest    rcx, rcx                                                       ; +0xdb, 0x1800bf7eb\njz      short loc_1800BF809                                            ; +0xde, 0x1800bf7ee\nmov     rax, [rcx]                                                     ; +0xe0, 0x1800bf7f0\ncall    qword ptr [rax+2A8h]                                           ; +0xe3, 0x1800bf7f3\nmov     rcx, [rbx+108h]                                                ; +0xe9, 0x1800bf7f9\nmov     rax, [rcx]                                                     ; +0xf0, 0x1800bf800\ncall    qword ptr [rax+2B0h]                                           ; +0xf3, 0x1800bf803\nmov     rbx, [rsp+38h+arg_0]                                           ; +0xf9, 0x1800bf809\nadd     rsp, 30h                                                       ; +0xfe, 0x1800bf80e\npop     rdi                                                            ; +0x102, 0x1800bf812\nretn                                                                   ; +0x103, 0x1800bf813", "xrefs": ["cocos2d::CCDirector::drawScene @ 0x1800be421", "<???> @ 0x1801438a8", "<???> @ 0x1801b9330"], "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"}