{"type": "func", "start": 4298558400, "end": 4298558681, "name": "GameManager::loadGround", "pseudocode": "// \n// GameManager::loadGround from 0x10036cbc0 to 0x10036ccd9 (281 bytes)\n// \n// 2 xrefs:\n// > LevelSettingsLayer::selectArtClosed @ 0x10025949b\n// > GameManager::getGTexture @ 0x10036cfc0\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::loadGround(__int64 a1, int a2)\n{\n  char v2; // al\n  __int64 result; // rax\n  int v4; // r14d\n  int v5; // esi\n  __int64 v7; // rdi\n  __int64 CString; // r15\n  __int64 v9; // rdi\n  __int64 v10; // r15\n  __int64 v11; // rax\n  __int64 v12; // rax\n  __int64 v13; // rdi\n  __int64 v14; // r15\n  __int64 v15; // rdi\n  __int64 v16; // r15\n  __int64 v17; // rax\n  __int64 v18; // rax\n  char v19; // [rsp-8h] [rbp-20h]\n  char v20; // [rsp-8h] [rbp-20h]\n\n  v19 = v2;\n  result = 22;\n  if ( a2 < 22 )\n    result = (unsigned int)a2;\n  v4 = 1;\n  if ( (int)result >= 2 )\n    v4 = result;\n  v5 = *(_DWORD *)(a1 + 984);\n  if ( v4 != v5 )\n  {\n    if ( v5 )\n    {\n      v7 = sub_10088E820(\"groundSquare_%02d_001.png\", v19);\n      CString = cocos2d::CCString::getCString(v7);\n      v9 = cocos2d::CCTextureCache::sharedTextureCache(v7);\n      cocos2d::CCTextureCache::removeTextureForKey(v9, CString);\n      if ( (*(_DWORD *)(a1 + 984) & 0xFFFFFFFC) == 8 )\n      {\n        v10 = cocos2d::CCTextureCache::sharedTextureCache(v9);\n        v11 = sub_10088E820(\"groundSquare_%02d_2_001.png\", v19);\n        v12 = cocos2d::CCString::getCString(v11);\n        cocos2d::CCTextureCache::removeTextureForKey(v10, v12);\n      }\n    }\n    v13 = sub_10088E820(\"groundSquare_%02d_001.png\", v19);\n    v14 = cocos2d::CCString::getCString(v13);\n    v15 = cocos2d::CCTextureCache::sharedTextureCache(v13);\n    cocos2d::CCTextureCache::addImage(v15, v14, 0);\n    result = v4 & 0x7FFFFFFC;\n    if ( (_DWORD)result == 8 )\n    {\n      v16 = cocos2d::CCTextureCache::sharedTextureCache(v15);\n      v17 = sub_10088E820(\"groundSquare_%02d_2_001.png\", v20);\n      v18 = cocos2d::CCString::getCString(v17);\n      result = cocos2d::CCTextureCache::addImage(v16, v18, 0);\n    }\n    *(_DWORD *)(a1 + 984) = v4;\n  }\n  return result;\n}", "assembly": "; \n; GameManager::loadGround from 0x10036cbc0 to 0x10036ccd9 (281 bytes)\n; \n; 2 xrefs:\n; > LevelSettingsLayer::selectArtClosed @ 0x10025949b\n; > GameManager::getGTexture @ 0x10036cfc0\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, 0x10036cbc0\nmov     rbp, rsp                                                       ; +0x1, 0x10036cbc1\npush    r15                                                            ; +0x4, 0x10036cbc4\npush    r14                                                            ; +0x6, 0x10036cbc6\npush    rbx                                                            ; +0x8, 0x10036cbc8\npush    rax; char                                                      ; +0x9, 0x10036cbc9\ncmp     esi, 16h                                                       ; +0xa, 0x10036cbca\nmov     eax, 16h                                                       ; +0xd, 0x10036cbcd\ncmovl   eax, esi                                                       ; +0x12, 0x10036cbd2\ncmp     eax, 2                                                         ; +0x15, 0x10036cbd5\nmov     r14d, 1                                                        ; +0x18, 0x10036cbd8\ncmovge  r14d, eax                                                      ; +0x1e, 0x10036cbde\nmov     esi, [rdi+3D8h]                                                ; +0x22, 0x10036cbe2\ncmp     r14d, esi                                                      ; +0x28, 0x10036cbe8\njz      loc_10036CCCE                                                  ; +0x2b, 0x10036cbeb\nmov     rbx, rdi                                                       ; +0x31, 0x10036cbf1\ntest    esi, esi                                                       ; +0x34, 0x10036cbf4\njz      short loc_10036CC5E                                            ; +0x36, 0x10036cbf6\nlea     rdi, aGroundsquare02; \"groundSquare_%02d_001.png\"              ; +0x38, 0x10036cbf8\nxor     eax, eax                                                       ; +0x3f, 0x10036cbff\ncall    sub_10088E820                                                  ; +0x41, 0x10036cc01\nmov     rdi, rax                                                       ; +0x46, 0x10036cc06\ncall    cocos2d__CCString__getCString                                  ; +0x49, 0x10036cc09\nmov     r15, rax                                                       ; +0x4e, 0x10036cc0e\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x51, 0x10036cc11\nmov     rdi, rax                                                       ; +0x56, 0x10036cc16\nmov     rsi, r15                                                       ; +0x59, 0x10036cc19\ncall    cocos2d__CCTextureCache__removeTextureForKey                   ; +0x5c, 0x10036cc1c\nmov     eax, [rbx+3D8h]                                                ; +0x61, 0x10036cc21\nand     eax, 0FFFFFFFCh                                                ; +0x67, 0x10036cc27\ncmp     eax, 8                                                         ; +0x6a, 0x10036cc2a\njnz     short loc_10036CC5E                                            ; +0x6d, 0x10036cc2d\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x6f, 0x10036cc2f\nmov     r15, rax                                                       ; +0x74, 0x10036cc34\nmov     esi, [rbx+3D8h]                                                ; +0x77, 0x10036cc37\nlea     rdi, aGroundsquare02_0; \"groundSquare_%02d_2_001.png\"          ; +0x7d, 0x10036cc3d\nxor     eax, eax                                                       ; +0x84, 0x10036cc44\ncall    sub_10088E820                                                  ; +0x86, 0x10036cc46\nmov     rdi, rax                                                       ; +0x8b, 0x10036cc4b\ncall    cocos2d__CCString__getCString                                  ; +0x8e, 0x10036cc4e\nmov     rdi, r15                                                       ; +0x93, 0x10036cc53\nmov     rsi, rax                                                       ; +0x96, 0x10036cc56\ncall    cocos2d__CCTextureCache__removeTextureForKey                   ; +0x99, 0x10036cc59\nlea     rdi, aGroundsquare02; \"groundSquare_%02d_001.png\"              ; +0x9e, 0x10036cc5e\nmov     esi, r14d                                                      ; +0xa5, 0x10036cc65\nxor     eax, eax                                                       ; +0xa8, 0x10036cc68\ncall    sub_10088E820                                                  ; +0xaa, 0x10036cc6a\nmov     rdi, rax                                                       ; +0xaf, 0x10036cc6f\ncall    cocos2d__CCString__getCString                                  ; +0xb2, 0x10036cc72\nmov     r15, rax                                                       ; +0xb7, 0x10036cc77\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0xba, 0x10036cc7a\nmov     rdi, rax                                                       ; +0xbf, 0x10036cc7f\nmov     rsi, r15                                                       ; +0xc2, 0x10036cc82\nxor     edx, edx                                                       ; +0xc5, 0x10036cc85\ncall    cocos2d__CCTextureCache__addImage                              ; +0xc7, 0x10036cc87\nmov     eax, r14d                                                      ; +0xcc, 0x10036cc8c\nand     eax, 7FFFFFFCh                                                 ; +0xcf, 0x10036cc8f\ncmp     eax, 8                                                         ; +0xd4, 0x10036cc94\njnz     short loc_10036CCC7                                            ; +0xd7, 0x10036cc97\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0xd9, 0x10036cc99\nmov     r15, rax                                                       ; +0xde, 0x10036cc9e\nlea     rdi, aGroundsquare02_0; \"groundSquare_%02d_2_001.png\"          ; +0xe1, 0x10036cca1\nmov     esi, r14d                                                      ; +0xe8, 0x10036cca8\nxor     eax, eax                                                       ; +0xeb, 0x10036ccab\ncall    sub_10088E820                                                  ; +0xed, 0x10036ccad\nmov     rdi, rax                                                       ; +0xf2, 0x10036ccb2\ncall    cocos2d__CCString__getCString                                  ; +0xf5, 0x10036ccb5\nmov     rdi, r15                                                       ; +0xfa, 0x10036ccba\nmov     rsi, rax                                                       ; +0xfd, 0x10036ccbd\nxor     edx, edx                                                       ; +0x100, 0x10036ccc0\ncall    cocos2d__CCTextureCache__addImage                              ; +0x102, 0x10036ccc2\nmov     [rbx+3D8h], r14d                                               ; +0x107, 0x10036ccc7\nadd     rsp, 8                                                         ; +0x10e, 0x10036ccce\npop     rbx                                                            ; +0x112, 0x10036ccd2\npop     r14                                                            ; +0x113, 0x10036ccd3\npop     r15                                                            ; +0x115, 0x10036ccd5\npop     rbp                                                            ; +0x117, 0x10036ccd7\nretn                                                                   ; +0x118, 0x10036ccd8", "xrefs": ["LevelSettingsLayer::selectArtClosed @ 0x10025949b", "GameManager::getGTexture @ 0x10036cfc0"], "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"}