{"type": "func", "start": 6443232848, "end": 6443233155, "name": "cocos2d::CCDirector::purgeDirector", "pseudocode": "// \n// cocos2d::CCDirector::purgeDirector from 0x1800bee50 to 0x1800bef83 (307 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCDisplayLinkDirector::mainLoop @ 0x1800beaf8\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b9264\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::purgeDirector(cocos2d::CCDirector *this)\n{\n  cocos2d::CCScheduler *v2; // rax\n  cocos2d::CCScene *m_pRunningScene; // rcx\n  cocos2d::CCArray *m_pobScenesStack; // rcx\n  cocos2d::CCLabelAtlas *m_pFPSLabel; // rcx\n  cocos2d::CCLabelAtlas *m_pSPFLabel; // rcx\n  cocos2d::CCLabelAtlas *m_pDrawsLabel; // rcx\n  cocos2d *v8; // rcx\n  cocos2d *v9; // rcx\n\n  v2 = (cocos2d::CCScheduler *)((__int64 (__fastcall *)(cocos2d::CCDirector *))this->getScheduler)(this);\n  cocos2d::CCScheduler::unscheduleAll(v2);\n  cocos2d::CCTouchDispatcher::removeAllDelegates(this->m_pTouchDispatcher);\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    ((void (__fastcall *)(cocos2d::CCScene *))this->m_pRunningScene->cleanup)(this->m_pRunningScene);\n    cocos2d::CCObject::release(this->m_pRunningScene);\n  }\n  m_pobScenesStack = this->m_pobScenesStack;\n  this->m_pRunningScene = nullptr;\n  this->m_pNextScene = nullptr;\n  this->m_pSceneReference = nullptr;\n  cocos2d::CCArray::removeAllObjects(m_pobScenesStack);\n  ((void (__fastcall *)(cocos2d::CCDirector *))this->stopAnimation)(this);\n  m_pFPSLabel = this->m_pFPSLabel;\n  if ( m_pFPSLabel )\n  {\n    cocos2d::CCObject::release(m_pFPSLabel);\n    this->m_pFPSLabel = nullptr;\n  }\n  m_pSPFLabel = this->m_pSPFLabel;\n  if ( m_pSPFLabel )\n  {\n    cocos2d::CCObject::release(m_pSPFLabel);\n    this->m_pSPFLabel = nullptr;\n  }\n  m_pDrawsLabel = this->m_pDrawsLabel;\n  if ( m_pDrawsLabel )\n  {\n    cocos2d::CCObject::release(m_pDrawsLabel);\n    this->m_pDrawsLabel = nullptr;\n  }\n  cocos2d::CCLabelBMFont::purgeCachedData();\n  cocos2d::ccDrawFree(v8);\n  cocos2d::CCAnimationCache::purgeSharedAnimationCache();\n  cocos2d::CCSpriteFrameCache::purgeSharedSpriteFrameCache();\n  cocos2d::CCTextureCache::purgeSharedTextureCache();\n  cocos2d::CCShaderCache::purgeSharedShaderCache();\n  cocos2d::CCFileUtils::purgeFileUtils();\n  cocos2d::CCConfiguration::purgeConfiguration();\n  cocos2d::CCUserDefault::purgeSharedUserDefault();\n  cocos2d::CCNotificationCenter::purgeNotificationCenter();\n  cocos2d::ccGLInvalidateStateCache(v9);\n  ((void (__fastcall *)(cocos2d::CCEGLView *))this->m_pobOpenGLView->end)(this->m_pobOpenGLView);\n  this->m_pobOpenGLView = nullptr;\n  cocos2d::CCObject::release(this);\n}", "assembly": "; \n; cocos2d::CCDirector::purgeDirector from 0x1800bee50 to 0x1800bef83 (307 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCDisplayLinkDirector::mainLoop @ 0x1800beaf8\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b9264\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, 0x1800bee50\npush    rdi                                                            ; +0x5, 0x1800bee55\nsub     rsp, 20h                                                       ; +0x6, 0x1800bee56\nmov     rax, [rcx]                                                     ; +0xa, 0x1800bee5a\nmov     rbx, rcx                                                       ; +0xd, 0x1800bee5d\ncall    qword ptr [rax+70h]                                            ; +0x10, 0x1800bee60\nmov     rcx, rax; this                                                 ; +0x13, 0x1800bee63\ncall    ?unscheduleAll@CCScheduler@cocos2d@@QEAAXXZ; cocos2d::CCScheduler::unscheduleAll(void) ; +0x16, 0x1800bee66\nmov     rcx, [rbx+78h]; this                                           ; +0x1b, 0x1800bee6b\ncall    ?removeAllDelegates@CCTouchDispatcher@cocos2d@@QEAAXXZ; cocos2d::CCTouchDispatcher::removeAllDelegates(void) ; +0x1f, 0x1800bee6f\nmov     rcx, [rbx+108h]                                                ; +0x24, 0x1800bee74\ntest    rcx, rcx                                                       ; +0x2b, 0x1800bee7b\njz      short loc_1800BEEB5                                            ; +0x2e, 0x1800bee7e\nmov     rax, [rcx]                                                     ; +0x30, 0x1800bee80\ncall    qword ptr [rax+2C0h]                                           ; +0x33, 0x1800bee83\nmov     rcx, [rbx+108h]                                                ; +0x39, 0x1800bee89\nmov     rax, [rcx]                                                     ; +0x40, 0x1800bee90\ncall    qword ptr [rax+2B8h]                                           ; +0x43, 0x1800bee93\nmov     rcx, [rbx+108h]                                                ; +0x49, 0x1800bee99\nmov     rax, [rcx]                                                     ; +0x50, 0x1800beea0\ncall    qword ptr [rax+2C8h]                                           ; +0x53, 0x1800beea3\nmov     rcx, [rbx+108h]; this                                          ; +0x59, 0x1800beea9\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x60, 0x1800beeb0\nmov     rcx, [rbx+120h]; this                                          ; +0x65, 0x1800beeb5\nxor     edi, edi                                                       ; +0x6c, 0x1800beebc\nmov     [rbx+108h], rdi                                                ; +0x6e, 0x1800beebe\nmov     [rbx+110h], rdi                                                ; +0x75, 0x1800beec5\nmov     [rbx+60h], rdi                                                 ; +0x7c, 0x1800beecc\ncall    ?removeAllObjects@CCArray@cocos2d@@QEAAXXZ; cocos2d::CCArray::removeAllObjects(void) ; +0x80, 0x1800beed0\nmov     rax, [rbx]                                                     ; +0x85, 0x1800beed5\nmov     rcx, rbx                                                       ; +0x88, 0x1800beed8\ncall    qword ptr [rax+58h]                                            ; +0x8b, 0x1800beedb\nmov     rcx, [rbx+0E0h]; this                                          ; +0x8e, 0x1800beede\ntest    rcx, rcx                                                       ; +0x95, 0x1800beee5\njz      short loc_1800BEEF6                                            ; +0x98, 0x1800beee8\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x9a, 0x1800beeea\nmov     [rbx+0E0h], rdi                                                ; +0x9f, 0x1800beeef\nmov     rcx, [rbx+0E8h]; this                                          ; +0xa6, 0x1800beef6\ntest    rcx, rcx                                                       ; +0xad, 0x1800beefd\njz      short loc_1800BEF0E                                            ; +0xb0, 0x1800bef00\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xb2, 0x1800bef02\nmov     [rbx+0E8h], rdi                                                ; +0xb7, 0x1800bef07\nmov     rcx, [rbx+0F0h]; this                                          ; +0xbe, 0x1800bef0e\ntest    rcx, rcx                                                       ; +0xc5, 0x1800bef15\njz      short loc_1800BEF26                                            ; +0xc8, 0x1800bef18\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xca, 0x1800bef1a\nmov     [rbx+0F0h], rdi                                                ; +0xcf, 0x1800bef1f\ncall    ?purgeCachedData@CCLabelBMFont@cocos2d@@SAXXZ; cocos2d::CCLabelBMFont::purgeCachedData(void) ; +0xd6, 0x1800bef26\ncall    ?ccDrawFree@cocos2d@@YAXXZ; cocos2d::ccDrawFree(void)          ; +0xdb, 0x1800bef2b\ncall    ?purgeSharedAnimationCache@CCAnimationCache@cocos2d@@SAXXZ; cocos2d::CCAnimationCache::purgeSharedAnimationCache(void) ; +0xe0, 0x1800bef30\ncall    ?purgeSharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAXXZ; cocos2d::CCSpriteFrameCache::purgeSharedSpriteFrameCache(void) ; +0xe5, 0x1800bef35\ncall    ?purgeSharedTextureCache@CCTextureCache@cocos2d@@SAXXZ; cocos2d::CCTextureCache::purgeSharedTextureCache(void) ; +0xea, 0x1800bef3a\ncall    ?purgeSharedShaderCache@CCShaderCache@cocos2d@@SAXXZ; cocos2d::CCShaderCache::purgeSharedShaderCache(void) ; +0xef, 0x1800bef3f\ncall    ?purgeFileUtils@CCFileUtils@cocos2d@@SAXXZ; cocos2d::CCFileUtils::purgeFileUtils(void) ; +0xf4, 0x1800bef44\ncall    ?purgeConfiguration@CCConfiguration@cocos2d@@SAXXZ; cocos2d::CCConfiguration::purgeConfiguration(void) ; +0xf9, 0x1800bef49\ncall    ?purgeSharedUserDefault@CCUserDefault@cocos2d@@SAXXZ; cocos2d::CCUserDefault::purgeSharedUserDefault(void) ; +0xfe, 0x1800bef4e\ncall    ?purgeNotificationCenter@CCNotificationCenter@cocos2d@@SAXXZ; cocos2d::CCNotificationCenter::purgeNotificationCenter(void) ; +0x103, 0x1800bef53\ncall    ?ccGLInvalidateStateCache@cocos2d@@YAXXZ; cocos2d::ccGLInvalidateStateCache(void) ; +0x108, 0x1800bef58\nmov     rcx, [rbx+0B8h]                                                ; +0x10d, 0x1800bef5d\nmov     rax, [rcx]                                                     ; +0x114, 0x1800bef64\ncall    qword ptr [rax+8]                                              ; +0x117, 0x1800bef67\nmov     rcx, rbx; this                                                 ; +0x11a, 0x1800bef6a\nmov     [rbx+0B8h], rdi                                                ; +0x11d, 0x1800bef6d\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x124, 0x1800bef74\nadd     rsp, 20h                                                       ; +0x129, 0x1800bef79\npop     rdi                                                            ; +0x12d, 0x1800bef7d\njmp     ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x12e, 0x1800bef7e", "xrefs": ["cocos2d::CCDisplayLinkDirector::mainLoop @ 0x1800beaf8", "<???> @ 0x1801438a8", "<???> @ 0x1801b9264"], "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"}