{"type": "func", "start": 4298651904, "end": 4298652160, "name": "GameManager::loadGroundAsync", "pseudocode": "// \n// GameManager::loadGroundAsync from 0x100383900 to 0x100383a00 (256 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::swapGround @ 0x1001148eb\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::loadGroundAsync(GameManager *a1, int a2)\n{\n  int v2; // eax\n  int v3; // r14d\n  cocos2d::CCTextureCache *v4; // r15\n  cocos2d::CCString *v5; // rax\n  const char *CString; // rax\n  cocos2d::CCTextureCache *v7; // r15\n  cocos2d::CCString *v8; // rax\n  const char *v9; // rax\n  char v10; // [rsp+0h] [rbp-30h]\n  char v11; // [rsp+0h] [rbp-30h]\n\n  v2 = 22;\n  if ( a2 < 22 )\n    v2 = a2;\n  v3 = 1;\n  if ( v2 >= 2 )\n    v3 = v2;\n  if ( !a1->m_loadingG && v3 != a1->m_loadedGroundID )\n  {\n    a1->m_loadingG = 1;\n    a1->m_finishedLoadingG1 = 0;\n    a1->m_finishedLoadingG2 = (v3 & 0x7FFFFFFC) != 8;\n    v4 = cocos2d::CCTextureCache::sharedTextureCache();\n    v5 = (cocos2d::CCString *)sub_1007AB580(\"groundSquare_%02d_001.png\", v10);\n    CString = cocos2d::CCString::getCString(v5);\n    cocos2d::CCTextureCache::addImageAsync(\n      v4,\n      CString,\n      a1,\n      (cocos2d::SEL_MenuHandler)(unsigned __int64)GameManager::finishedLoadingGAsync1,\n      v3,\n      kCCTexture2DPixelFormat_RGBA8888);\n    if ( (v3 & 0x7FFFFFFC) == 8 )\n    {\n      v7 = cocos2d::CCTextureCache::sharedTextureCache();\n      v8 = (cocos2d::CCString *)sub_1007AB580(\"groundSquare_%02d_2_001.png\", v11);\n      v9 = cocos2d::CCString::getCString(v8);\n      cocos2d::CCTextureCache::addImageAsync(\n        v7,\n        v9,\n        a1,\n        (cocos2d::SEL_MenuHandler)(unsigned __int64)GameManager::finishedLoadingGAsync2,\n        v3,\n        kCCTexture2DPixelFormat_RGBA8888);\n    }\n  }\n}", "assembly": "; \n; GameManager::loadGroundAsync from 0x100383900 to 0x100383a00 (256 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::swapGround @ 0x1001148eb\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, 0x100383900\nmov     rbp, rsp                                                       ; +0x1, 0x100383901\npush    r15                                                            ; +0x4, 0x100383904\npush    r14                                                            ; +0x6, 0x100383906\npush    r12                                                            ; +0x8, 0x100383908\npush    rbx                                                            ; +0xa, 0x10038390a\nsub     rsp, 10h                                                       ; +0xb, 0x10038390b\ncmp     esi, 16h                                                       ; +0xf, 0x10038390f\nmov     eax, 16h                                                       ; +0x12, 0x100383912\ncmovl   eax, esi                                                       ; +0x17, 0x100383917\ncmp     eax, 2                                                         ; +0x1a, 0x10038391a\nmov     r14d, 1                                                        ; +0x1d, 0x10038391d\ncmovge  r14d, eax                                                      ; +0x23, 0x100383923\ncmp     byte ptr [rdi+3B5h], 0                                         ; +0x27, 0x100383927\njnz     loc_1003839F3                                                  ; +0x2e, 0x10038392e\nmov     rbx, rdi                                                       ; +0x34, 0x100383934\ncmp     r14d, [rdi+3A4h]                                               ; +0x37, 0x100383937\njz      loc_1003839F3                                                  ; +0x3e, 0x10038393e\nmov     byte ptr [rbx+3B5h], 1                                         ; +0x44, 0x100383944\nmov     r12d, r14d                                                     ; +0x4b, 0x10038394b\nand     r12d, 7FFFFFFCh                                                ; +0x4e, 0x10038394e\ncmp     r12d, 8                                                        ; +0x55, 0x100383955\nmov     byte ptr [rbx+3B7h], 0                                         ; +0x59, 0x100383959\nsetnz   byte ptr [rbx+3B8h]                                            ; +0x60, 0x100383960\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0x67, 0x100383967\nmov     r15, rax                                                       ; +0x6c, 0x10038396c\nlea     rdi, aGroundsquare02; \"groundSquare_%02d_001.png\"              ; +0x6f, 0x10038396f\nmov     esi, r14d                                                      ; +0x76, 0x100383976\nxor     eax, eax                                                       ; +0x79, 0x100383979\ncall    sub_1007AB580                                                  ; +0x7b, 0x10038397b\nmov     rdi, rax                                                       ; +0x80, 0x100383980\ncall    cocos2d__CCString__getCString                                  ; +0x83, 0x100383983\nmov     dword ptr [rsp+30h+var_30], 0; char                            ; +0x88, 0x100383988\nlea     rcx, GameManager__finishedLoadingGAsync1                       ; +0x8f, 0x10038398f\nmov     rdi, r15                                                       ; +0x96, 0x100383996\nmov     rsi, rax                                                       ; +0x99, 0x100383999\nmov     rdx, rbx                                                       ; +0x9c, 0x10038399c\nxor     r8d, r8d                                                       ; +0x9f, 0x10038399f\nmov     r9d, r14d                                                      ; +0xa2, 0x1003839a2\ncall    cocos2d__CCTextureCache__addImageAsync                         ; +0xa5, 0x1003839a5\ncmp     r12d, 8                                                        ; +0xaa, 0x1003839aa\njnz     short loc_1003839F3                                            ; +0xae, 0x1003839ae\ncall    cocos2d__CCTextureCache__sharedTextureCache                    ; +0xb0, 0x1003839b0\nmov     r15, rax                                                       ; +0xb5, 0x1003839b5\nlea     rdi, aGroundsquare02_0; \"groundSquare_%02d_2_001.png\"          ; +0xb8, 0x1003839b8\nmov     esi, r14d                                                      ; +0xbf, 0x1003839bf\nxor     eax, eax                                                       ; +0xc2, 0x1003839c2\ncall    sub_1007AB580                                                  ; +0xc4, 0x1003839c4\nmov     rdi, rax                                                       ; +0xc9, 0x1003839c9\ncall    cocos2d__CCString__getCString                                  ; +0xcc, 0x1003839cc\nmov     dword ptr [rsp+30h+var_30], 0                                  ; +0xd1, 0x1003839d1\nlea     rcx, GameManager__finishedLoadingGAsync2                       ; +0xd8, 0x1003839d8\nmov     rdi, r15                                                       ; +0xdf, 0x1003839df\nmov     rsi, rax                                                       ; +0xe2, 0x1003839e2\nmov     rdx, rbx                                                       ; +0xe5, 0x1003839e5\nxor     r8d, r8d                                                       ; +0xe8, 0x1003839e8\nmov     r9d, r14d                                                      ; +0xeb, 0x1003839eb\ncall    cocos2d__CCTextureCache__addImageAsync                         ; +0xee, 0x1003839ee\nadd     rsp, 10h                                                       ; +0xf3, 0x1003839f3\npop     rbx                                                            ; +0xf7, 0x1003839f7\npop     r12                                                            ; +0xf8, 0x1003839f8\npop     r14                                                            ; +0xfa, 0x1003839fa\npop     r15                                                            ; +0xfc, 0x1003839fc\npop     rbp                                                            ; +0xfe, 0x1003839fe\nretn                                                                   ; +0xff, 0x1003839ff", "xrefs": ["GJBaseGameLayer::swapGround @ 0x1001148eb"], "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"}