{"type": "func", "start": 4298557872, "end": 4298558091, "name": "GameManager::loadMiddlegroundAsync", "pseudocode": "// \n// GameManager::loadMiddlegroundAsync from 0x10036c9b0 to 0x10036ca8b (219 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::swapMiddleground @ 0x1000f0d91\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::loadMiddlegroundAsync(__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  __int64 v8; // r15\n  __int64 v9; // rax\n  __int64 v10; // rax\n  char v11; // [rsp+0h] [rbp-20h]\n  char v12; // [rsp+0h] [rbp-20h]\n\n  v11 = v2;\n  result = 3;\n  if ( a2 < 3 )\n    result = (unsigned int)a2;\n  v4 = 1;\n  if ( (int)result >= 2 )\n    v4 = result;\n  if ( !*(_BYTE *)(a1 + 1002) && v4 != *(_DWORD *)(a1 + 988) )\n  {\n    *(_BYTE *)(a1 + 1002) = 1;\n    *(_WORD *)(a1 + 1005) = 0;\n    v5 = cocos2d::CCTextureCache::sharedTextureCache(a1);\n    v6 = sub_10088E820(\"fg_%02d_001.png\", v11);\n    CString = cocos2d::CCString::getCString(v6);\n    cocos2d::CCTextureCache::addImageAsync(v5, CString, a1, sub_10036CA90, 0, v4, 0);\n    v8 = cocos2d::CCTextureCache::sharedTextureCache(v5);\n    v9 = sub_10088E820(\"fg_%02d_2_001.png\", v12);\n    v10 = cocos2d::CCString::getCString(v9);\n    return cocos2d::CCTextureCache::addImageAsync(v8, v10, a1, GameManager::finishedLoadingMGAsync2, 0, v4, 0);\n  }\n  return result;\n}", "assembly": "; \n; GameManager::loadMiddlegroundAsync from 0x10036c9b0 to 0x10036ca8b (219 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::swapMiddleground @ 0x1000f0d91\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, 0x10036c9b0\nmov     rbp, rsp                                                       ; +0x1, 0x10036c9b1\npush    r15                                                            ; +0x4, 0x10036c9b4\npush    r14                                                            ; +0x6, 0x10036c9b6\npush    rbx                                                            ; +0x8, 0x10036c9b8\npush    rax; char                                                      ; +0x9, 0x10036c9b9\ncmp     esi, 3                                                         ; +0xa, 0x10036c9ba\nmov     eax, 3                                                         ; +0xd, 0x10036c9bd\ncmovl   eax, esi                                                       ; +0x12, 0x10036c9c2\ncmp     eax, 2                                                         ; +0x15, 0x10036c9c5\nmov     ebx, 1                                                         ; +0x18, 0x10036c9c8\ncmovge  ebx, eax                                                       ; +0x1d, 0x10036c9cd\ncmp     byte ptr [rdi+3EAh], 0                                         ; +0x20, 0x10036c9d0\njnz     loc_10036CA80                                                  ; +0x27, 0x10036c9d7\ncmp     ebx, [rdi+3DCh]                                                ; +0x2d, 0x10036c9dd\njz      loc_10036CA80                                                  ; +0x33, 0x10036c9e3\nmov     byte ptr [rdi+3EAh], 1                                         ; +0x39, 0x10036c9e9\nmov     word ptr [rdi+3EDh], 0                                         ; +0x40, 0x10036c9f0\nmov     r14, rdi                                                       ; +0x49, 0x10036c9f9\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x4c, 0x10036c9fc\nmov     r15, rax                                                       ; +0x51, 0x10036ca01\nlea     rdi, aFg02d001Png; \"fg_%02d_001.png\"                           ; +0x54, 0x10036ca04\nmov     esi, ebx                                                       ; +0x5b, 0x10036ca0b\nxor     eax, eax                                                       ; +0x5d, 0x10036ca0d\ncall    sub_10088E820                                                  ; +0x5f, 0x10036ca0f\nmov     rdi, rax                                                       ; +0x64, 0x10036ca14\ncall    cocos2d__CCString__getCString                                  ; +0x67, 0x10036ca17\nmov     dword ptr [rsp+20h+var_20], 0; char                            ; +0x6c, 0x10036ca1c\nlea     rcx, sub_10036CA90                                             ; +0x73, 0x10036ca23\nmov     rdi, r15                                                       ; +0x7a, 0x10036ca2a\nmov     rsi, rax                                                       ; +0x7d, 0x10036ca2d\nmov     rdx, r14                                                       ; +0x80, 0x10036ca30\nxor     r8d, r8d                                                       ; +0x83, 0x10036ca33\nmov     r9d, ebx                                                       ; +0x86, 0x10036ca36\ncall    cocos2d__CCTextureCache__addImageAsync                         ; +0x89, 0x10036ca39\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x8e, 0x10036ca3e\nmov     r15, rax                                                       ; +0x93, 0x10036ca43\nlea     rdi, aFg02d2001Png; \"fg_%02d_2_001.png\"                        ; +0x96, 0x10036ca46\nmov     esi, ebx                                                       ; +0x9d, 0x10036ca4d\nxor     eax, eax                                                       ; +0x9f, 0x10036ca4f\ncall    sub_10088E820                                                  ; +0xa1, 0x10036ca51\nmov     rdi, rax                                                       ; +0xa6, 0x10036ca56\ncall    cocos2d__CCString__getCString                                  ; +0xa9, 0x10036ca59\nmov     dword ptr [rsp+20h+var_20], 0                                  ; +0xae, 0x10036ca5e\nlea     rcx, GameManager__finishedLoadingMGAsync2                      ; +0xb5, 0x10036ca65\nmov     rdi, r15                                                       ; +0xbc, 0x10036ca6c\nmov     rsi, rax                                                       ; +0xbf, 0x10036ca6f\nmov     rdx, r14                                                       ; +0xc2, 0x10036ca72\nxor     r8d, r8d                                                       ; +0xc5, 0x10036ca75\nmov     r9d, ebx                                                       ; +0xc8, 0x10036ca78\ncall    cocos2d__CCTextureCache__addImageAsync                         ; +0xcb, 0x10036ca7b\nadd     rsp, 8                                                         ; +0xd0, 0x10036ca80\npop     rbx                                                            ; +0xd4, 0x10036ca84\npop     r14                                                            ; +0xd5, 0x10036ca85\npop     r15                                                            ; +0xd7, 0x10036ca87\npop     rbp                                                            ; +0xd9, 0x10036ca89\nretn                                                                   ; +0xda, 0x10036ca8a", "xrefs": ["GJBaseGameLayer::swapMiddleground @ 0x1000f0d91"], "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"}