{"type": "func", "start": 4298212236, "end": 4298212388, "name": "GameManager::unloadBackground", "pseudocode": "// \n// GameManager::unloadBackground from 0x10031838c to 0x100318424 (152 bytes)\n// \n// 1 xrefs:\n// > SupportLayer::onLowDetail @ 0x100192b84\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 GameManager::unloadBackground(GameManager *a1)\n{\n  cocos2d::CCString *v2; // x0\n  const char *CString; // x21\n  cocos2d::CCTextureCache *v4; // x0\n  int i; // w21\n  cocos2d::CCString *v6; // x0\n  const char *v7; // x20\n  cocos2d::CCFileUtils *v8; // x0\n\n  if ( a1->m_loadedBgID )\n  {\n    v2 = (cocos2d::CCString *)sub_100268F4C(\"game_bg_%02d_001.png\", a1->m_loadedBgID);\n    CString = cocos2d::CCString::getCString(v2);\n    v4 = cocos2d::CCTextureCache::sharedTextureCache();\n    cocos2d::CCTextureCache::removeTextureForKey(v4, CString);\n    a1->m_loadedBgID = 0;\n    for ( i = 1; i != 60; ++i )\n    {\n      v6 = (cocos2d::CCString *)sub_100268F4C(\"game_bg_%02d_001.png\", i);\n      v7 = cocos2d::CCString::getCString(v6);\n      v8 = cocos2d::CCFileUtils::sharedFileUtils();\n      ((void (__fastcall *)(cocos2d::CCFileUtils *, const char *))v8->createCCDictionaryWithContentsOfFile)(v8, v7);\n    }\n  }\n}", "assembly": "; \n; GameManager::unloadBackground from 0x10031838c to 0x100318424 (152 bytes)\n; \n; 1 xrefs:\n; > SupportLayer::onLowDetail @ 0x100192b84\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\nLDR             W8, [X0,#0x3A0]                                        ; +0x0, 0x10031838c\nCBZ             W8, locret_100318420                                   ; +0x4, 0x100318390\nSUB             SP, SP, #0x40                                          ; +0x8, 0x100318394\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0xc, 0x100318398\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x10, 0x10031839c\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0x14, 0x1003183a0\nADD             X29, SP, #0x30                                         ; +0x18, 0x1003183a4\nMOV             X20, X0                                                ; +0x1c, 0x1003183a8\nSTR             X8, [SP,#0x30+var_30]                                  ; +0x20, 0x1003183ac\nADRL            X19, aGameBg02d001Pn; \"game_bg_%02d_001.png\"           ; +0x24, 0x1003183b0\nMOV             X0, X19                                                ; +0x2c, 0x1003183b8\nBL              sub_100268F4C                                          ; +0x30, 0x1003183bc\nBL              cocos2d__CCString__getCString                          ; +0x34, 0x1003183c0\nMOV             X21, X0                                                ; +0x38, 0x1003183c4\nBL              cocos2d__CCTextureCache__sharedTextureCache            ; +0x3c, 0x1003183c8\nMOV             X1, X21                                                ; +0x40, 0x1003183cc\nBL              cocos2d__CCTextureCache__removeTextureForKey           ; +0x44, 0x1003183d0\nSTR             WZR, [X20,#0x3A0]                                      ; +0x48, 0x1003183d4\nMOV             W21, #1                                                ; +0x4c, 0x1003183d8\nSTR             X21, [SP,#0x30+var_30]                                 ; +0x50, 0x1003183dc\nMOV             X0, X19                                                ; +0x54, 0x1003183e0\nBL              sub_100268F4C                                          ; +0x58, 0x1003183e4\nBL              cocos2d__CCString__getCString                          ; +0x5c, 0x1003183e8\nMOV             X20, X0                                                ; +0x60, 0x1003183ec\nBL              cocos2d__CCFileUtils__sharedFileUtils                  ; +0x64, 0x1003183f0\nLDR             X8, [X0]                                               ; +0x68, 0x1003183f4\nLDR             X8, [X8,#0x38]                                         ; +0x6c, 0x1003183f8\nMOV             X1, X20                                                ; +0x70, 0x1003183fc\nBLR             X8                                                     ; +0x74, 0x100318400\nADD             W21, W21, #1                                           ; +0x78, 0x100318404\nCMP             W21, #0x3C ; '<'                                       ; +0x7c, 0x100318408\nB.NE            loc_1003183DC                                          ; +0x80, 0x10031840c\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0x84, 0x100318410\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0x88, 0x100318414\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0x8c, 0x100318418\nADD             SP, SP, #0x40 ; '@'                                    ; +0x90, 0x10031841c\nRET                                                                    ; +0x94, 0x100318420", "xrefs": ["SupportLayer::onLowDetail @ 0x100192b84"], "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"}