{"type": "func", "start": 5371322560, "end": 5371322847, "name": "GameManager::loadGround", "pseudocode": "// \n// GameManager::loadGround from 0x14027e0c0 to 0x14027e1df (287 bytes)\n// \n// 5 xrefs:\n// > GJGroundLayer::init @ 0x140386e37\n// > LevelSettingsLayer::selectArtClosed @ 0x14045b240\n// > <???> @ 0x1408ade68\n// > <???> @ 0x1408ade78\n// > <???> @ 0x14091cf4c\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 11:28:58 +0000\n// \n\n__int64 __fastcall GameManager::loadGround(__int64 a1, int a2)\n{\n  __int64 result; // rax\n  int v3; // edi\n  int v5; // edx\n  cocos2d::CCString *v6; // rax\n  const char *CString; // rbx\n  cocos2d::CCTextureCache *v8; // rax\n  int v9; // edx\n  cocos2d::CCString *v10; // rax\n  const char *v11; // rbx\n  cocos2d::CCTextureCache *v12; // rax\n  cocos2d::CCString *v13; // rax\n  const char *v14; // rbx\n  cocos2d::CCTextureCache *v15; // rax\n  cocos2d::CCString *v16; // rax\n  const char *v17; // rbx\n  cocos2d::CCTextureCache *v18; // rax\n\n  result = 22;\n  v3 = 1;\n  if ( a2 < 22 )\n    result = (unsigned int)a2;\n  v5 = *(_DWORD *)(a1 + 1016);\n  if ( (int)result > 1 )\n    v3 = result;\n  if ( v3 != v5 )\n  {\n    if ( v5 )\n    {\n      v6 = cocos2d::CCString::createWithFormat(\"groundSquare_%02d_001.png\", v5);\n      CString = cocos2d::CCString::getCString(v6);\n      v8 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();\n      cocos2d::CCTextureCache::removeTextureForKey(v8, CString);\n      v9 = *(_DWORD *)(a1 + 1016);\n      if ( v9 == 8 || (unsigned int)(v9 - 9) <= 2 )\n      {\n        v10 = cocos2d::CCString::createWithFormat(\"groundSquare_%02d_2_001.png\", v9);\n        v11 = cocos2d::CCString::getCString(v10);\n        v12 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();\n        cocos2d::CCTextureCache::removeTextureForKey(v12, v11);\n      }\n    }\n    v13 = cocos2d::CCString::createWithFormat(\"groundSquare_%02d_001.png\", v3);\n    v14 = cocos2d::CCString::getCString(v13);\n    v15 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();\n    cocos2d::CCTextureCache::addImage(v15, v14, 0);\n    result = (unsigned int)(v3 - 8);\n    if ( (unsigned int)result <= 3 )\n    {\n      v16 = cocos2d::CCString::createWithFormat(\"groundSquare_%02d_2_001.png\", v3);\n      v17 = cocos2d::CCString::getCString(v16);\n      v18 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();\n      result = (__int64)cocos2d::CCTextureCache::addImage(v18, v17, 0);\n    }\n    *(_DWORD *)(a1 + 1016) = v3;\n  }\n  return result;\n}", "assembly": "; \n; GameManager::loadGround from 0x14027e0c0 to 0x14027e1df (287 bytes)\n; \n; 5 xrefs:\n; > GJGroundLayer::init @ 0x140386e37\n; > LevelSettingsLayer::selectArtClosed @ 0x14045b240\n; > <???> @ 0x1408ade68\n; > <???> @ 0x1408ade78\n; > <???> @ 0x14091cf4c\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 11:28:58 +0000\n; \nmov     [rsp+arg_8], rsi                                               ; +0x0, 0x14027e0c0\npush    rdi                                                            ; +0x5, 0x14027e0c5\nsub     rsp, 20h                                                       ; +0x6, 0x14027e0c6\nmov     eax, 16h                                                       ; +0xa, 0x14027e0ca\nmov     edi, 1                                                         ; +0xf, 0x14027e0cf\ncmp     edx, eax                                                       ; +0x14, 0x14027e0d4\nmov     rsi, rcx                                                       ; +0x16, 0x14027e0d6\ncmovl   eax, edx                                                       ; +0x19, 0x14027e0d9\nmov     edx, [rcx+3F8h]                                                ; +0x1c, 0x14027e0dc\ncmp     eax, edi                                                       ; +0x22, 0x14027e0e2\ncmovg   edi, eax                                                       ; +0x24, 0x14027e0e4\ncmp     edi, edx                                                       ; +0x27, 0x14027e0e7\njz      loc_14027E1D4                                                  ; +0x29, 0x14027e0e9\nmov     [rsp+28h+arg_0], rbx                                           ; +0x2f, 0x14027e0ef\ntest    edx, edx                                                       ; +0x34, 0x14027e0f4\njz      short loc_14027E161                                            ; +0x36, 0x14027e0f6\nlea     rcx, aGroundsquare02; \"groundSquare_%02d_001.png\"              ; +0x38, 0x14027e0f8\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x3f, 0x14027e0ff\nmov     rcx, rax                                                       ; +0x45, 0x14027e105\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x48, 0x14027e108\nmov     rbx, rax                                                       ; +0x4e, 0x14027e10e\ncall    cs:?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0x51, 0x14027e111\nmov     rcx, rax                                                       ; +0x57, 0x14027e117\nmov     rdx, rbx                                                       ; +0x5a, 0x14027e11a\ncall    cs:?removeTextureForKey@CCTextureCache@cocos2d@@QEAAXPEBD@Z; cocos2d::CCTextureCache::removeTextureForKey(char const *) ; +0x5d, 0x14027e11d\nmov     edx, [rsi+3F8h]                                                ; +0x63, 0x14027e123\ncmp     edx, 8                                                         ; +0x69, 0x14027e129\njz      short loc_14027E136                                            ; +0x6c, 0x14027e12c\nlea     eax, [rdx-9]                                                   ; +0x6e, 0x14027e12e\ncmp     eax, 2                                                         ; +0x71, 0x14027e131\nja      short loc_14027E161                                            ; +0x74, 0x14027e134\nlea     rcx, aGroundsquare02_0; \"groundSquare_%02d_2_001.png\"          ; +0x76, 0x14027e136\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x7d, 0x14027e13d\nmov     rcx, rax                                                       ; +0x83, 0x14027e143\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x86, 0x14027e146\nmov     rbx, rax                                                       ; +0x8c, 0x14027e14c\ncall    cs:?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0x8f, 0x14027e14f\nmov     rcx, rax                                                       ; +0x95, 0x14027e155\nmov     rdx, rbx                                                       ; +0x98, 0x14027e158\ncall    cs:?removeTextureForKey@CCTextureCache@cocos2d@@QEAAXPEBD@Z; cocos2d::CCTextureCache::removeTextureForKey(char const *) ; +0x9b, 0x14027e15b\nmov     edx, edi                                                       ; +0xa1, 0x14027e161\nlea     rcx, aGroundsquare02; \"groundSquare_%02d_001.png\"              ; +0xa3, 0x14027e163\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xaa, 0x14027e16a\nmov     rcx, rax                                                       ; +0xb0, 0x14027e170\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xb3, 0x14027e173\nmov     rbx, rax                                                       ; +0xb9, 0x14027e179\ncall    cs:?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0xbc, 0x14027e17c\nxor     r8d, r8d                                                       ; +0xc2, 0x14027e182\nmov     rdx, rbx                                                       ; +0xc5, 0x14027e185\nmov     rcx, rax                                                       ; +0xc8, 0x14027e188\ncall    cs:?addImage@CCTextureCache@cocos2d@@QEAAPEAVCCTexture2D@2@PEBD_N@Z; cocos2d::CCTextureCache::addImage(char const *,bool) ; +0xcb, 0x14027e18b\nlea     eax, [rdi-8]                                                   ; +0xd1, 0x14027e191\ncmp     eax, 3                                                         ; +0xd4, 0x14027e194\nja      short loc_14027E1C9                                            ; +0xd7, 0x14027e197\nmov     edx, edi                                                       ; +0xd9, 0x14027e199\nlea     rcx, aGroundsquare02_0; \"groundSquare_%02d_2_001.png\"          ; +0xdb, 0x14027e19b\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xe2, 0x14027e1a2\nmov     rcx, rax                                                       ; +0xe8, 0x14027e1a8\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xeb, 0x14027e1ab\nmov     rbx, rax                                                       ; +0xf1, 0x14027e1b1\ncall    cs:?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0xf4, 0x14027e1b4\nxor     r8d, r8d                                                       ; +0xfa, 0x14027e1ba\nmov     rdx, rbx                                                       ; +0xfd, 0x14027e1bd\nmov     rcx, rax                                                       ; +0x100, 0x14027e1c0\ncall    cs:?addImage@CCTextureCache@cocos2d@@QEAAPEAVCCTexture2D@2@PEBD_N@Z; cocos2d::CCTextureCache::addImage(char const *,bool) ; +0x103, 0x14027e1c3\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x109, 0x14027e1c9\nmov     [rsi+3F8h], edi                                                ; +0x10e, 0x14027e1ce\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x114, 0x14027e1d4\nadd     rsp, 20h                                                       ; +0x119, 0x14027e1d9\npop     rdi                                                            ; +0x11d, 0x14027e1dd\nretn                                                                   ; +0x11e, 0x14027e1de", "xrefs": ["GJGroundLayer::init @ 0x140386e37", "LevelSettingsLayer::selectArtClosed @ 0x14045b240", "<???> @ 0x1408ade68", "<???> @ 0x1408ade78", "<???> @ 0x14091cf4c"], "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"}