{"type": "func", "start": 5370324160, "end": 5370324503, "name": "GameManager::reloadAllStep2", "pseudocode": "// \n// GameManager::reloadAllStep2 from 0x14018a4c0 to 0x14018a617 (343 bytes)\n// \n// 4 xrefs:\n// > GameManager::reloadAll @ 0x14018a46d\n// > <???> @ 0x14067856c\n// > <???> @ 0x14067857c\n// > <???> @ 0x1406cb6f4\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 GameManager::reloadAllStep2(GameManager *a1)\n{\n  cocos2d::CCDirector *v2; // rax\n  CCContentManager *v3; // rax\n  CCAnimateFrameCache *v4; // rbx\n  __int64 v5; // rax\n  cocos2d *v6; // rcx\n  bool v7; // zf\n  cocos2d *v8; // rcx\n  __int64 v9; // rbx\n  struct cocos2d::CCDelayTime *v10; // rax\n  struct cocos2d::CCSequence *v11; // rax\n  bool v12; // [rsp+50h] [rbp+28h]\n  bool v13; // [rsp+58h] [rbp+30h]\n\n  if ( a1->m_reloadTextures )\n  {\n    v2 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);\n    cocos2d::CCDirector::removeStatsLabel(v2);\n    v3 = (CCContentManager *)CCContentManager::sharedManager();\n    CCContentManager::clearCache(v3);\n    cocos2d::CCTextureCache::purgeSharedTextureCache();\n    cocos2d::CCSpriteFrameCache::purgeSharedSpriteFrameCache();\n    cocos2d::CCLabelBMFont::purgeCachedData();\n    if ( qword_1406C2E78 )\n    {\n      cocos2d::CCObject::release((cocos2d::CCObject *)qword_1406C2E78);\n      qword_1406C2E78 = 0;\n    }\n    v4 = CCAnimateFrameCache::sharedSpriteFrameCache();\n    cocos2d::CCDictionary::removeAllObjects(v4->m_animateFrames);\n    cocos2d::CCDictionary::removeAllObjects(v4->m_unk040);\n    cocos2d::CCDictionary::removeAllObjects(v4->m_animateDescriptions);\n    cocos2d::CCFileUtils::purgeFileUtils();\n    v5 = cocos2d::CCFileUtils::sharedFileUtils();\n    (*(void (__fastcall **)(__int64, const char *))(*(_QWORD *)v5 + 112LL))(v5, \"Resources\");\n    if ( qword_1406C2EA0 )\n    {\n      cocos2d::CCObject::release((cocos2d::CCObject *)qword_1406C2EA0);\n      qword_1406C2EA0 = 0;\n    }\n    *(_QWORD *)&a1->m_loadedBgID = 0;\n    a1->m_loadedMG = 0;\n    sub_1400CDCD0(&a1->m_iconLoadCounts._Mypair._Myval2._Myval2._Myhead);\n    v7 = !a1->m_switchModes;\n    a1->m_loadedDeathEffect = 0;\n    if ( !v7 )\n    {\n      cocos2d::ccDrawFree(v6);\n      cocos2d::CCShaderCache::purgeSharedShaderCache();\n      cocos2d::CCAnimationCache::purgeSharedAnimationCache();\n      cocos2d::ccGLInvalidateStateCache(v8);\n    }\n  }\n  v9 = cocos2d::CCCallFunc::create(a1, GameManager::reloadAllStep3);\n  v10 = cocos2d::CCDelayTime::create(0.0);\n  v11 = cocos2d::CCSequence::create(v10, v9, 0);\n  cocos2d::CCActionManager::addAction((GameManager *)a1->m_pActionManager, v11, a1, 0, v12, v13);\n}", "assembly": "; \n; GameManager::reloadAllStep2 from 0x14018a4c0 to 0x14018a617 (343 bytes)\n; \n; 4 xrefs:\n; > GameManager::reloadAll @ 0x14018a46d\n; > <???> @ 0x14067856c\n; > <???> @ 0x14067857c\n; > <???> @ 0x1406cb6f4\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_8], rbx                                               ; +0x0, 0x14018a4c0\npush    rdi                                                            ; +0x5, 0x14018a4c5\nsub     rsp, 20h                                                       ; +0x6, 0x14018a4c6\ncmp     byte ptr [rcx+194h], 0                                         ; +0xa, 0x14018a4ca\nmov     rdi, rcx                                                       ; +0x11, 0x14018a4d1\njz      loc_14018A5CB                                                  ; +0x14, 0x14018a4d4\nmov     [rsp+28h+arg_0], rsi                                           ; +0x1a, 0x14018a4da\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1f, 0x14018a4df\nmov     rcx, rax                                                       ; +0x25, 0x14018a4e5\ncall    cs:?removeStatsLabel@CCDirector@cocos2d@@QEAAXXZ; cocos2d::CCDirector::removeStatsLabel(void) ; +0x28, 0x14018a4e8\ncall    cs:?sharedManager@CCContentManager@@SAPEAV1@XZ; CCContentManager::sharedManager(void) ; +0x2e, 0x14018a4ee\nmov     rcx, rax                                                       ; +0x34, 0x14018a4f4\ncall    cs:?clearCache@CCContentManager@@QEAAXXZ; CCContentManager::clearCache(void) ; +0x37, 0x14018a4f7\ncall    cs:?purgeSharedTextureCache@CCTextureCache@cocos2d@@SAXXZ; cocos2d::CCTextureCache::purgeSharedTextureCache(void) ; +0x3d, 0x14018a4fd\ncall    cs:?purgeSharedSpriteFrameCache@CCSpriteFrameCache@cocos2d@@SAXXZ; cocos2d::CCSpriteFrameCache::purgeSharedSpriteFrameCache(void) ; +0x43, 0x14018a503\ncall    cs:?purgeCachedData@CCLabelBMFont@cocos2d@@SAXXZ; cocos2d::CCLabelBMFont::purgeCachedData(void) ; +0x49, 0x14018a509\nmov     rcx, cs:qword_1406C2E78                                        ; +0x4f, 0x14018a50f\nxor     esi, esi                                                       ; +0x56, 0x14018a516\ntest    rcx, rcx                                                       ; +0x58, 0x14018a518\njz      short loc_14018A52A                                            ; +0x5b, 0x14018a51b\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x5d, 0x14018a51d\nmov     cs:qword_1406C2E78, rsi                                        ; +0x63, 0x14018a523\ncall    CCAnimateFrameCache__sharedSpriteFrameCache                    ; +0x6a, 0x14018a52a\nmov     rbx, rax                                                       ; +0x6f, 0x14018a52f\nmov     rcx, [rax+38h]                                                 ; +0x72, 0x14018a532\ncall    cs:?removeAllObjects@CCDictionary@cocos2d@@QEAAXXZ; cocos2d::CCDictionary::removeAllObjects(void) ; +0x76, 0x14018a536\nmov     rcx, [rbx+40h]                                                 ; +0x7c, 0x14018a53c\ncall    cs:?removeAllObjects@CCDictionary@cocos2d@@QEAAXXZ; cocos2d::CCDictionary::removeAllObjects(void) ; +0x80, 0x14018a540\nmov     rcx, [rbx+48h]                                                 ; +0x86, 0x14018a546\ncall    cs:?removeAllObjects@CCDictionary@cocos2d@@QEAAXXZ; cocos2d::CCDictionary::removeAllObjects(void) ; +0x8a, 0x14018a54a\ncall    cs:?purgeFileUtils@CCFileUtils@cocos2d@@SAXXZ; cocos2d::CCFileUtils::purgeFileUtils(void) ; +0x90, 0x14018a550\ncall    cs:?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x96, 0x14018a556\nlea     rdx, aResources; \"Resources\"                                   ; +0x9c, 0x14018a55c\nmov     rcx, rax                                                       ; +0xa3, 0x14018a563\nmov     r8, [rax]                                                      ; +0xa6, 0x14018a566\ncall    qword ptr [r8+70h]                                             ; +0xa9, 0x14018a569\nmov     rcx, cs:qword_1406C2EA0                                        ; +0xad, 0x14018a56d\ntest    rcx, rcx                                                       ; +0xb4, 0x14018a574\njz      short loc_14018A586                                            ; +0xb7, 0x14018a577\ncall    cs:?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0xb9, 0x14018a579\nmov     cs:qword_1406C2EA0, rsi                                        ; +0xbf, 0x14018a57f\nlea     rcx, [rdi+440h]                                                ; +0xc6, 0x14018a586\nmov     [rdi+3C0h], rsi                                                ; +0xcd, 0x14018a58d\nmov     [rdi+3C8h], esi                                                ; +0xd4, 0x14018a594\ncall    sub_1400CDCD0                                                  ; +0xda, 0x14018a59a\ncmp     byte ptr [rdi+190h], 0                                         ; +0xdf, 0x14018a59f\nmov     [rdi+3D0h], esi                                                ; +0xe6, 0x14018a5a6\nmov     rsi, [rsp+28h+arg_0]                                           ; +0xec, 0x14018a5ac\njz      short loc_14018A5CB                                            ; +0xf1, 0x14018a5b1\ncall    cs:?ccDrawFree@cocos2d@@YAXXZ; cocos2d::ccDrawFree(void)       ; +0xf3, 0x14018a5b3\ncall    cs:?purgeSharedShaderCache@CCShaderCache@cocos2d@@SAXXZ; cocos2d::CCShaderCache::purgeSharedShaderCache(void) ; +0xf9, 0x14018a5b9\ncall    cs:?purgeSharedAnimationCache@CCAnimationCache@cocos2d@@SAXXZ; cocos2d::CCAnimationCache::purgeSharedAnimationCache(void) ; +0xff, 0x14018a5bf\ncall    cs:?ccGLInvalidateStateCache@cocos2d@@YAXXZ; cocos2d::ccGLInvalidateStateCache(void) ; +0x105, 0x14018a5c5\nlea     rdx, GameManager__reloadAllStep3                               ; +0x10b, 0x14018a5cb\nmov     rcx, rdi                                                       ; +0x112, 0x14018a5d2\ncall    cs:?create@CCCallFunc@cocos2d@@SAPEAV12@PEAVCCObject@2@P832@EAAXXZ@Z; cocos2d::CCCallFunc::create(cocos2d::CCObject *,void (cocos2d::CCObject::*)(void)) ; +0x115, 0x14018a5d5\nxorps   xmm0, xmm0                                                     ; +0x11b, 0x14018a5db\nmov     rbx, rax                                                       ; +0x11e, 0x14018a5de\ncall    cs:?create@CCDelayTime@cocos2d@@SAPEAV12@M@Z; cocos2d::CCDelayTime::create(float) ; +0x121, 0x14018a5e1\nxor     r8d, r8d                                                       ; +0x127, 0x14018a5e7\nmov     rdx, rbx                                                       ; +0x12a, 0x14018a5ea\nmov     rcx, rax                                                       ; +0x12d, 0x14018a5ed\ncall    cs:?create@CCSequence@cocos2d@@SAPEAV12@PEAVCCFiniteTimeAction@2@ZZ; cocos2d::CCSequence::create(cocos2d::CCFiniteTimeAction *,...) ; +0x130, 0x14018a5f0\nmov     rcx, [rdi+108h]                                                ; +0x136, 0x14018a5f6\nxor     r9d, r9d                                                       ; +0x13d, 0x14018a5fd\nmov     rdx, rax                                                       ; +0x140, 0x14018a600\nmov     r8, rdi                                                        ; +0x143, 0x14018a603\nmov     rbx, [rsp+28h+arg_8]                                           ; +0x146, 0x14018a606\nadd     rsp, 20h                                                       ; +0x14b, 0x14018a60b\npop     rdi                                                            ; +0x14f, 0x14018a60f\njmp     cs:?addAction@CCActionManager@cocos2d@@QEAAXPEAVCCAction@2@PEAVCCNode@2@_N@Z; cocos2d::CCActionManager::addAction(cocos2d::CCAction *,cocos2d::CCNode *,bool) ; +0x150, 0x14018a610", "xrefs": ["GameManager::reloadAll @ 0x14018a46d", "<???> @ 0x14067856c", "<???> @ 0x14067857c", "<???> @ 0x1406cb6f4"], "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"}