{"type": "func", "start": 5370038272, "end": 5370038372, "name": "GameLevelManager::getLocalLevel", "pseudocode": "// \n// GameLevelManager::getLocalLevel from 0x140144800 to 0x140144864 (100 bytes)\n// \n// 3 xrefs:\n// > GameLevelManager::onUploadLevelCompleted @ 0x14014d3e9\n// > GameLevelManager::onUploadLevelCompleted @ 0x14014d415\n// > <???> @ 0x1406ca530\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\nGJGameLevel *GameLevelManager::getLocalLevel(GameLevelManager *a1, int a2)\n{\n  unsigned int v3; // ebx\n  cocos2d::CCArray *m_localLevels; // rdi\n  GJGameLevel *result; // rax\n\n  v3 = 0;\n  m_localLevels = LocalLevelManager::sharedState()->m_localLevels;\n  if ( !cocos2d::CCArray::count(m_localLevels) )\n    return nullptr;\n  while ( 1 )\n  {\n    result = (GJGameLevel *)cocos2d::CCArray::objectAtIndex(m_localLevels, v3);\n    if ( result->m_M_ID == a2 )\n      break;\n    if ( ++v3 >= cocos2d::CCArray::count(m_localLevels) )\n      return nullptr;\n  }\n  return result;\n}", "assembly": "; \n; GameLevelManager::getLocalLevel from 0x140144800 to 0x140144864 (100 bytes)\n; \n; 3 xrefs:\n; > GameLevelManager::onUploadLevelCompleted @ 0x14014d3e9\n; > GameLevelManager::onUploadLevelCompleted @ 0x14014d415\n; > <???> @ 0x1406ca530\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_0], rbx                                               ; +0x0, 0x140144800\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x140144805\npush    rdi                                                            ; +0xa, 0x14014480a\nsub     rsp, 20h                                                       ; +0xb, 0x14014480b\nmov     esi, edx                                                       ; +0xf, 0x14014480f\ncall    LocalLevelManager__sharedState                                 ; +0x11, 0x140144811\nxor     ebx, ebx                                                       ; +0x16, 0x140144816\nmov     rdi, [rax+168h]                                                ; +0x18, 0x140144818\nmov     rcx, rdi                                                       ; +0x1f, 0x14014481f\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x22, 0x140144822\ntest    eax, eax                                                       ; +0x28, 0x140144828\njz      short loc_140144852                                            ; +0x2a, 0x14014482a\nnop     dword ptr [rax+00h]                                            ; +0x2c, 0x14014482c\nmov     edx, ebx                                                       ; +0x30, 0x140144830\nmov     rcx, rdi                                                       ; +0x32, 0x140144832\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x35, 0x140144835\ncmp     [rax+458h], esi                                                ; +0x3b, 0x14014483b\njz      short loc_140144854                                            ; +0x41, 0x140144841\nmov     rcx, rdi                                                       ; +0x43, 0x140144843\ninc     ebx                                                            ; +0x46, 0x140144846\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x48, 0x140144848\ncmp     ebx, eax                                                       ; +0x4e, 0x14014484e\njb      short loc_140144830                                            ; +0x50, 0x140144850\nxor     eax, eax                                                       ; +0x52, 0x140144852\nmov     rbx, [rsp+28h+arg_0]                                           ; +0x54, 0x140144854\nmov     rsi, [rsp+28h+arg_8]                                           ; +0x59, 0x140144859\nadd     rsp, 20h                                                       ; +0x5e, 0x14014485e\npop     rdi                                                            ; +0x62, 0x140144862\nretn                                                                   ; +0x63, 0x140144863", "xrefs": ["GameLevelManager::onUploadLevelCompleted @ 0x14014d3e9", "GameLevelManager::onUploadLevelCompleted @ 0x14014d415", "<???> @ 0x1406ca530"], "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"}