{"type": "func", "start": 4298557328, "end": 4298557464, "name": "GameManager::loadBackgroundAsync", "pseudocode": "// \n// GameManager::loadBackgroundAsync from 0x10036c790 to 0x10036c818 (136 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::swapBackground @ 0x1000f0871\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:29:00 +0000\n// \n\n__int64 __fastcall GameManager::loadBackgroundAsync(__int64 a1, int a2)\n{\n  char v2; // al\n  __int64 result; // rax\n  unsigned int v4; // ebx\n  __int64 v5; // r15\n  __int64 v6; // rax\n  __int64 CString; // rax\n  char v8; // [rsp+0h] [rbp-20h]\n\n  v8 = v2;\n  result = 59;\n  if ( a2 < 59 )\n    result = (unsigned int)a2;\n  v4 = 1;\n  if ( (int)result >= 2 )\n    v4 = result;\n  if ( !*(_BYTE *)(a1 + 1000) && v4 != *(_DWORD *)(a1 + 980) )\n  {\n    *(_BYTE *)(a1 + 1000) = 1;\n    v5 = cocos2d::CCTextureCache::sharedTextureCache(a1);\n    v6 = sub_10088E820(\"game_bg_%02d_001.png\", v8);\n    CString = cocos2d::CCString::getCString(v6);\n    return cocos2d::CCTextureCache::addImageAsync(v5, CString, a1, &GameManager::finishedLoadingBGAsync, 0, v4, 0);\n  }\n  return result;\n}", "assembly": "; \n; GameManager::loadBackgroundAsync from 0x10036c790 to 0x10036c818 (136 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::swapBackground @ 0x1000f0871\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:29:00 +0000\n; \npush    rbp                                                            ; +0x0, 0x10036c790\nmov     rbp, rsp                                                       ; +0x1, 0x10036c791\npush    r15                                                            ; +0x4, 0x10036c794\npush    r14                                                            ; +0x6, 0x10036c796\npush    rbx                                                            ; +0x8, 0x10036c798\npush    rax; char                                                      ; +0x9, 0x10036c799\ncmp     esi, 3Bh ; ';'                                                 ; +0xa, 0x10036c79a\nmov     eax, 3Bh ; ';'                                                 ; +0xd, 0x10036c79d\ncmovl   eax, esi                                                       ; +0x12, 0x10036c7a2\ncmp     eax, 2                                                         ; +0x15, 0x10036c7a5\nmov     ebx, 1                                                         ; +0x18, 0x10036c7a8\ncmovge  ebx, eax                                                       ; +0x1d, 0x10036c7ad\ncmp     byte ptr [rdi+3E8h], 0                                         ; +0x20, 0x10036c7b0\njnz     short loc_10036C80D                                            ; +0x27, 0x10036c7b7\ncmp     ebx, [rdi+3D4h]                                                ; +0x29, 0x10036c7b9\njz      short loc_10036C80D                                            ; +0x2f, 0x10036c7bf\nmov     byte ptr [rdi+3E8h], 1                                         ; +0x31, 0x10036c7c1\nmov     r14, rdi                                                       ; +0x38, 0x10036c7c8\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x3b, 0x10036c7cb\nmov     r15, rax                                                       ; +0x40, 0x10036c7d0\nlea     rdi, aGameBg02d001Pn; \"game_bg_%02d_001.png\"                   ; +0x43, 0x10036c7d3\nmov     esi, ebx                                                       ; +0x4a, 0x10036c7da\nxor     eax, eax                                                       ; +0x4c, 0x10036c7dc\ncall    sub_10088E820                                                  ; +0x4e, 0x10036c7de\nmov     rdi, rax                                                       ; +0x53, 0x10036c7e3\ncall    cocos2d__CCString__getCString                                  ; +0x56, 0x10036c7e6\nmov     dword ptr [rsp+20h+var_20], 0                                  ; +0x5b, 0x10036c7eb\nlea     rcx, GameManager__finishedLoadingBGAsync                       ; +0x62, 0x10036c7f2\nmov     rdi, r15                                                       ; +0x69, 0x10036c7f9\nmov     rsi, rax                                                       ; +0x6c, 0x10036c7fc\nmov     rdx, r14                                                       ; +0x6f, 0x10036c7ff\nxor     r8d, r8d                                                       ; +0x72, 0x10036c802\nmov     r9d, ebx                                                       ; +0x75, 0x10036c805\ncall    cocos2d__CCTextureCache__addImageAsync                         ; +0x78, 0x10036c808\nadd     rsp, 8                                                         ; +0x7d, 0x10036c80d\npop     rbx                                                            ; +0x81, 0x10036c811\npop     r14                                                            ; +0x82, 0x10036c812\npop     r15                                                            ; +0x84, 0x10036c814\npop     rbp                                                            ; +0x86, 0x10036c816\nretn                                                                   ; +0x87, 0x10036c817", "xrefs": ["GJBaseGameLayer::swapBackground @ 0x1000f0871"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}