{"type": "func", "start": 5370293136, "end": 5370293325, "name": "GameManager::finishedLoadingMGAsync", "pseudocode": "// \n// GameManager::finishedLoadingMGAsync from 0x140182b90 to 0x140182c4d (189 bytes)\n// \n// 5 xrefs:\n// > GameManager::finishedLoadingMGAsync1 @ 0x140182b3c\n// > GameManager::finishedLoadingMGAsync2 @ 0x140182b7c\n// > <???> @ 0x140677b08\n// > <???> @ 0x140677b18\n// > <???> @ 0x1406cb4f0\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 GameManager::finishedLoadingMGAsync(GameManager *a1, int a2)\n{\n  GJBaseGameLayer *m_gameLayer; // rbx\n  int m_loadedMG; // edx\n  cocos2d::CCString *v6; // rax\n  const char *CString; // rdi\n  cocos2d::CCString *v8; // rax\n  const char *v9; // rbx\n  cocos2d::CCTextureCache *v10; // rax\n  cocos2d::CCTextureCache *v11; // rax\n\n  m_gameLayer = a1->m_gameLayer;\n  a1->m_loadingG1 = 0;\n  if ( m_gameLayer )\n  {\n    GJBaseGameLayer::createMiddleground(m_gameLayer, a2);\n    GJBaseGameLayer::updateLevelColors(m_gameLayer);\n  }\n  m_loadedMG = a1->m_loadedMG;\n  if ( m_loadedMG )\n  {\n    v6 = cocos2d::CCString::createWithFormat(\"fg_%02d_001.png\", m_loadedMG);\n    CString = cocos2d::CCString::getCString(v6);\n    v8 = cocos2d::CCString::createWithFormat(\"fg_%02d_2_001.png\", a1->m_loadedMG);\n    v9 = cocos2d::CCString::getCString(v8);\n    v10 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();\n    cocos2d::CCTextureCache::removeTextureForKey(v10, CString);\n    v11 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache();\n    cocos2d::CCTextureCache::removeTextureForKey(v11, v9);\n  }\n  a1->m_loadedMG = a2;\n}", "assembly": "; \n; GameManager::finishedLoadingMGAsync from 0x140182b90 to 0x140182c4d (189 bytes)\n; \n; 5 xrefs:\n; > GameManager::finishedLoadingMGAsync1 @ 0x140182b3c\n; > GameManager::finishedLoadingMGAsync2 @ 0x140182b7c\n; > <???> @ 0x140677b08\n; > <???> @ 0x140677b18\n; > <???> @ 0x1406cb4f0\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140182b90\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140182b95\npush    rsi                                                            ; +0xa, 0x140182b9a\nsub     rsp, 20h                                                       ; +0xb, 0x140182b9b\nmov     rbx, [rcx+218h]                                                ; +0xf, 0x140182b9f\nmov     ebp, edx                                                       ; +0x16, 0x140182ba6\nmov     byte ptr [rcx+3D6h], 0                                         ; +0x18, 0x140182ba8\nmov     rsi, rcx                                                       ; +0x1f, 0x140182baf\ntest    rbx, rbx                                                       ; +0x22, 0x140182bb2\njz      short loc_140182BC7                                            ; +0x25, 0x140182bb5\nmov     rcx, rbx                                                       ; +0x27, 0x140182bb7\ncall    GJBaseGameLayer__createMiddleground                            ; +0x2a, 0x140182bba\nmov     rcx, rbx                                                       ; +0x2f, 0x140182bbf\ncall    GJBaseGameLayer__updateLevelColors                             ; +0x32, 0x140182bc2\nmov     edx, [rsi+3C8h]                                                ; +0x37, 0x140182bc7\ntest    edx, edx                                                       ; +0x3d, 0x140182bcd\njz      short loc_140182C37                                            ; +0x3f, 0x140182bcf\nlea     rcx, aFg02d001Png; \"fg_%02d_001.png\"                           ; +0x41, 0x140182bd1\nmov     [rsp+28h+arg_0], rdi                                           ; +0x48, 0x140182bd8\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x4d, 0x140182bdd\nmov     rcx, rax                                                       ; +0x53, 0x140182be3\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x56, 0x140182be6\nmov     edx, [rsi+3C8h]                                                ; +0x5c, 0x140182bec\nlea     rcx, aFg02d2001Png; \"fg_%02d_2_001.png\"                        ; +0x62, 0x140182bf2\nmov     rdi, rax                                                       ; +0x69, 0x140182bf9\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x6c, 0x140182bfc\nmov     rcx, rax                                                       ; +0x72, 0x140182c02\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x75, 0x140182c05\nmov     rbx, rax                                                       ; +0x7b, 0x140182c0b\ncall    cs:?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0x7e, 0x140182c0e\nmov     rcx, rax                                                       ; +0x84, 0x140182c14\nmov     rdx, rdi                                                       ; +0x87, 0x140182c17\ncall    cs:?removeTextureForKey@CCTextureCache@cocos2d@@QEAAXPEBD@Z; cocos2d::CCTextureCache::removeTextureForKey(char const *) ; +0x8a, 0x140182c1a\ncall    cs:?sharedTextureCache@CCTextureCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCTextureCache::sharedTextureCache(void) ; +0x90, 0x140182c20\nmov     rcx, rax                                                       ; +0x96, 0x140182c26\nmov     rdx, rbx                                                       ; +0x99, 0x140182c29\ncall    cs:?removeTextureForKey@CCTextureCache@cocos2d@@QEAAXPEBD@Z; cocos2d::CCTextureCache::removeTextureForKey(char const *) ; +0x9c, 0x140182c2c\nmov     rdi, [rsp+28h+arg_0]                                           ; +0xa2, 0x140182c32\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xa7, 0x140182c37\nmov     [rsi+3C8h], ebp                                                ; +0xac, 0x140182c3c\nmov     rbp, [rsp+28h+arg_10]                                          ; +0xb2, 0x140182c42\nadd     rsp, 20h                                                       ; +0xb7, 0x140182c47\npop     rsi                                                            ; +0xbb, 0x140182c4b\nretn                                                                   ; +0xbc, 0x140182c4c", "xrefs": ["GameManager::finishedLoadingMGAsync1 @ 0x140182b3c", "GameManager::finishedLoadingMGAsync2 @ 0x140182b7c", "<???> @ 0x140677b08", "<???> @ 0x140677b18", "<???> @ 0x1406cb4f0"], "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"}