{"type": "func", "start": 4298650544, "end": 4298650680, "name": "GameManager::loadBackgroundAsync", "pseudocode": "// \n// GameManager::loadBackgroundAsync from 0x1003833b0 to 0x100383438 (136 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::swapBackground @ 0x1001145d1\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::loadBackgroundAsync(GameManager *a1, int a2)\n{\n  char v2; // al\n  int v3; // eax\n  int v4; // ebx\n  cocos2d::CCTextureCache *v5; // r15\n  cocos2d::CCString *v6; // rax\n  const char *CString; // rax\n  char v8; // [rsp+0h] [rbp-20h]\n\n  v8 = v2;\n  v3 = 59;\n  if ( a2 < 59 )\n    v3 = a2;\n  v4 = 1;\n  if ( v3 >= 2 )\n    v4 = v3;\n  if ( !a1->m_loadingBG && v4 != a1->m_loadedBgID )\n  {\n    a1->m_loadingBG = 1;\n    v5 = cocos2d::CCTextureCache::sharedTextureCache();\n    v6 = (cocos2d::CCString *)sub_1007AB580(\"game_bg_%02d_001.png\", v8);\n    CString = cocos2d::CCString::getCString(v6);\n    cocos2d::CCTextureCache::addImageAsync(\n      v5,\n      CString,\n      a1,\n      (cocos2d::SEL_MenuHandler)(unsigned __int64)GameManager::finishedLoadingBGAsync,\n      v4,\n      kCCTexture2DPixelFormat_RGBA8888);\n  }\n}", "assembly": "; \n; GameManager::loadBackgroundAsync from 0x1003833b0 to 0x100383438 (136 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::swapBackground @ 0x1001145d1\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\npush    rbp                                                            ; +0x0, 0x1003833b0\nmov     rbp, rsp                                                       ; +0x1, 0x1003833b1\npush    r15                                                            ; +0x4, 0x1003833b4\npush    r14                                                            ; +0x6, 0x1003833b6\npush    rbx                                                            ; +0x8, 0x1003833b8\npush    rax; char                                                      ; +0x9, 0x1003833b9\ncmp     esi, 3Bh ; ';'                                                 ; +0xa, 0x1003833ba\nmov     eax, 3Bh ; ';'                                                 ; +0xd, 0x1003833bd\ncmovl   eax, esi                                                       ; +0x12, 0x1003833c2\ncmp     eax, 2                                                         ; +0x15, 0x1003833c5\nmov     ebx, 1                                                         ; +0x18, 0x1003833c8\ncmovge  ebx, eax                                                       ; +0x1d, 0x1003833cd\ncmp     byte ptr [rdi+3B4h], 0                                         ; +0x20, 0x1003833d0\njnz     short loc_10038342D                                            ; +0x27, 0x1003833d7\ncmp     ebx, [rdi+3A0h]                                                ; +0x29, 0x1003833d9\njz      short loc_10038342D                                            ; +0x2f, 0x1003833df\nmov     byte ptr [rdi+3B4h], 1                                         ; +0x31, 0x1003833e1\nmov     r14, rdi                                                       ; +0x38, 0x1003833e8\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x3b, 0x1003833eb\nmov     r15, rax                                                       ; +0x40, 0x1003833f0\nlea     rdi, aGameBg02d001Pn; \"game_bg_%02d_001.png\"                   ; +0x43, 0x1003833f3\nmov     esi, ebx                                                       ; +0x4a, 0x1003833fa\nxor     eax, eax                                                       ; +0x4c, 0x1003833fc\ncall    sub_1007AB580                                                  ; +0x4e, 0x1003833fe\nmov     rdi, rax                                                       ; +0x53, 0x100383403\ncall    cocos2d__CCString__getCString                                  ; +0x56, 0x100383406\nmov     dword ptr [rsp+20h+var_20], 0                                  ; +0x5b, 0x10038340b\nlea     rcx, GameManager__finishedLoadingBGAsync                       ; +0x62, 0x100383412\nmov     rdi, r15                                                       ; +0x69, 0x100383419\nmov     rsi, rax                                                       ; +0x6c, 0x10038341c\nmov     rdx, r14                                                       ; +0x6f, 0x10038341f\nxor     r8d, r8d                                                       ; +0x72, 0x100383422\nmov     r9d, ebx                                                       ; +0x75, 0x100383425\ncall    cocos2d__CCTextureCache__addImageAsync                         ; +0x78, 0x100383428\nadd     rsp, 8                                                         ; +0x7d, 0x10038342d\npop     rbx                                                            ; +0x81, 0x100383431\npop     r14                                                            ; +0x82, 0x100383432\npop     r15                                                            ; +0x84, 0x100383434\npop     rbp                                                            ; +0x86, 0x100383436\nretn                                                                   ; +0x87, 0x100383437", "xrefs": ["GJBaseGameLayer::swapBackground @ 0x1001145d1"], "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"}