{"type": "func", "start": 4298650688, "end": 4298650824, "name": "GameManager::finishedLoadingBGAsync", "pseudocode": "// \n// GameManager::finishedLoadingBGAsync from 0x100383440 to 0x1003834c8 (136 bytes)\n// \n// 1 xrefs:\n// > GameManager::loadBackgroundAsync @ 0x100383412\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::finishedLoadingBGAsync(GameManager *a1, cocos2d::CCObject *a2)\n{\n  char v2; // al\n  GJBaseGameLayer *m_gameLayer; // r15\n  int v4; // eax\n  cocos2d::CCString *v5; // rax\n  const char *CString; // r15\n  cocos2d::CCTextureCache *v7; // rax\n  char v8; // [rsp-28h] [rbp-28h]\n\n  a1->m_loadingBG = 0;\n  if ( a2 )\n  {\n    v8 = v2;\n    m_gameLayer = a1->m_gameLayer;\n    if ( m_gameLayer )\n    {\n      v4 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n      GJBaseGameLayer::asyncBGLoaded(m_gameLayer, v4);\n    }\n    if ( a1->m_loadedBgID )\n    {\n      v5 = (cocos2d::CCString *)sub_1007AB580(\"game_bg_%02d_001.png\", v8);\n      CString = cocos2d::CCString::getCString(v5);\n      v7 = cocos2d::CCTextureCache::sharedTextureCache();\n      cocos2d::CCTextureCache::removeTextureForKey(v7, CString);\n    }\n    a1->m_loadedBgID = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);\n  }\n}", "assembly": "; \n; GameManager::finishedLoadingBGAsync from 0x100383440 to 0x1003834c8 (136 bytes)\n; \n; 1 xrefs:\n; > GameManager::loadBackgroundAsync @ 0x100383412\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     byte ptr [rdi+3B4h], 0                                         ; +0x0, 0x100383440\ntest    rsi, rsi                                                       ; +0x7, 0x100383447\njz      short locret_1003834C7                                         ; +0xa, 0x10038344a\npush    rbp                                                            ; +0xc, 0x10038344c\nmov     rbp, rsp                                                       ; +0xd, 0x10038344d\npush    r15                                                            ; +0x10, 0x100383450\npush    r14                                                            ; +0x12, 0x100383452\npush    rbx                                                            ; +0x14, 0x100383454\npush    rax; char                                                      ; +0x15, 0x100383455\nmov     r14, rsi                                                       ; +0x16, 0x100383456\nmov     rbx, rdi                                                       ; +0x19, 0x100383459\nmov     r15, [rdi+208h]                                                ; +0x1c, 0x10038345c\ntest    r15, r15                                                       ; +0x23, 0x100383463\njz      short loc_10038347B                                            ; +0x26, 0x100383466\nmov     rax, [r14]                                                     ; +0x28, 0x100383468\nmov     rdi, r14                                                       ; +0x2b, 0x10038346b\ncall    qword ptr [rax+40h]                                            ; +0x2e, 0x10038346e\nmov     rdi, r15                                                       ; +0x31, 0x100383471\nmov     esi, eax                                                       ; +0x34, 0x100383474\ncall    GJBaseGameLayer__asyncBGLoaded                                 ; +0x36, 0x100383476\nmov     esi, [rbx+3A0h]                                                ; +0x3b, 0x10038347b\ntest    esi, esi                                                       ; +0x41, 0x100383481\njz      short loc_1003834AE                                            ; +0x43, 0x100383483\nlea     rdi, aGameBg02d001Pn; \"game_bg_%02d_001.png\"                   ; +0x45, 0x100383485\nxor     eax, eax                                                       ; +0x4c, 0x10038348c\ncall    sub_1007AB580                                                  ; +0x4e, 0x10038348e\nmov     rdi, rax                                                       ; +0x53, 0x100383493\ncall    cocos2d__CCString__getCString                                  ; +0x56, 0x100383496\nmov     r15, rax                                                       ; +0x5b, 0x10038349b\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x5e, 0x10038349e\nmov     rdi, rax                                                       ; +0x63, 0x1003834a3\nmov     rsi, r15                                                       ; +0x66, 0x1003834a6\ncall    cocos2d__CCTextureCache__removeTextureForKey                   ; +0x69, 0x1003834a9\nmov     rax, [r14]                                                     ; +0x6e, 0x1003834ae\nmov     rdi, r14                                                       ; +0x71, 0x1003834b1\ncall    qword ptr [rax+40h]                                            ; +0x74, 0x1003834b4\nmov     [rbx+3A0h], eax                                                ; +0x77, 0x1003834b7\nadd     rsp, 8                                                         ; +0x7d, 0x1003834bd\npop     rbx                                                            ; +0x81, 0x1003834c1\npop     r14                                                            ; +0x82, 0x1003834c2\npop     r15                                                            ; +0x84, 0x1003834c4\npop     rbp                                                            ; +0x86, 0x1003834c6\nretn                                                                   ; +0x87, 0x1003834c7", "xrefs": ["GameManager::loadBackgroundAsync @ 0x100383412"], "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"}