{"type": "func", "start": 4298650208, "end": 4298650365, "name": "GameManager::unloadBackground", "pseudocode": "// \n// GameManager::unloadBackground from 0x100383260 to 0x1003832fd (157 bytes)\n// \n// 1 xrefs:\n// > SupportLayer::onLowDetail @ 0x10039a511\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  char v1; // al\n  cocos2d::CCString *v2; // rax\n  const char *CString; // r15\n  cocos2d::CCTextureCache *v4; // rax\n  int i; // r14d\n  cocos2d::CCString *v6; // rax\n  const char *v7; // r15\n  cocos2d::CCFileUtils *v8; // rax\n  char v9; // [rsp-28h] [rbp-28h]\n\n  if ( a1->m_loadedBgID )\n  {\n    v2 = (cocos2d::CCString *)sub_1007AB580(\"game_bg_%02d_001.png\", v1);\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_1007AB580(\"game_bg_%02d_001.png\", v9);\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 0x100383260 to 0x1003832fd (157 bytes)\n; \n; 1 xrefs:\n; > SupportLayer::onLowDetail @ 0x10039a511\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     esi, [rdi+3A0h]                                                ; +0x0, 0x100383260\ntest    esi, esi                                                       ; +0x6, 0x100383266\njz      locret_1003832FC                                               ; +0x8, 0x100383268\npush    rbp                                                            ; +0xe, 0x10038326e\nmov     rbp, rsp                                                       ; +0xf, 0x10038326f\npush    r15                                                            ; +0x12, 0x100383272\npush    r14                                                            ; +0x14, 0x100383274\npush    rbx                                                            ; +0x16, 0x100383276\npush    rax; char                                                      ; +0x17, 0x100383277\nmov     r14, rdi                                                       ; +0x18, 0x100383278\nlea     rbx, aGameBg02d001Pn; \"game_bg_%02d_001.png\"                   ; +0x1b, 0x10038327b\nmov     rdi, rbx; __format                                             ; +0x22, 0x100383282\nxor     eax, eax                                                       ; +0x25, 0x100383285\ncall    sub_1007AB580                                                  ; +0x27, 0x100383287\nmov     rdi, rax                                                       ; +0x2c, 0x10038328c\ncall    cocos2d__CCString__getCString                                  ; +0x2f, 0x10038328f\nmov     r15, rax                                                       ; +0x34, 0x100383294\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x37, 0x100383297\nmov     rdi, rax                                                       ; +0x3c, 0x10038329c\nmov     rsi, r15                                                       ; +0x3f, 0x10038329f\ncall    cocos2d__CCTextureCache__removeTextureForKey                   ; +0x42, 0x1003832a2\nmov     dword ptr [r14+3A0h], 0                                        ; +0x47, 0x1003832a7\nmov     r14d, 1                                                        ; +0x52, 0x1003832b2\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x58, 0x1003832b8\nmov     rdi, rbx; __format                                             ; +0x60, 0x1003832c0\nmov     esi, r14d                                                      ; +0x63, 0x1003832c3\nxor     eax, eax                                                       ; +0x66, 0x1003832c6\ncall    sub_1007AB580                                                  ; +0x68, 0x1003832c8\nmov     rdi, rax                                                       ; +0x6d, 0x1003832cd\ncall    cocos2d__CCString__getCString                                  ; +0x70, 0x1003832d0\nmov     r15, rax                                                       ; +0x75, 0x1003832d5\ncall    cocos2d__CCFileUtils__sharedFileUtils                          ; +0x78, 0x1003832d8\nmov     rcx, [rax]                                                     ; +0x7d, 0x1003832dd\nmov     rdi, rax                                                       ; +0x80, 0x1003832e0\nmov     rsi, r15                                                       ; +0x83, 0x1003832e3\ncall    qword ptr [rcx+38h]                                            ; +0x86, 0x1003832e6\ninc     r14d                                                           ; +0x89, 0x1003832e9\ncmp     r14d, 3Ch ; '<'                                                ; +0x8c, 0x1003832ec\njnz     short loc_1003832C0                                            ; +0x90, 0x1003832f0\nadd     rsp, 8                                                         ; +0x92, 0x1003832f2\npop     rbx                                                            ; +0x96, 0x1003832f6\npop     r14                                                            ; +0x97, 0x1003832f7\npop     r15                                                            ; +0x99, 0x1003832f9\npop     rbp                                                            ; +0x9b, 0x1003832fb\nretn                                                                   ; +0x9c, 0x1003832fc", "xrefs": ["SupportLayer::onLowDetail @ 0x10039a511"], "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"}