{"type": "func", "start": 5370939136, "end": 5370939359, "name": "GameLevelManager::getSavedLevel", "pseudocode": "// \n// GameLevelManager::getSavedLevel from 0x140220700 to 0x1402207df (223 bytes)\n// \n// 23 xrefs:\n// > CreatorLayer::sceneWillResume @ 0x1401398e3\n// > LevelCell::loadCustomLevelCell @ 0x14014970e\n// > CommentCell::loadFromComment @ 0x140153231\n// > CommentCell::loadFromComment @ 0x1401535a9\n// > CommentCell::loadFromComment @ 0x1401540e8\n// > EditLevelLayer::onDeathTracker @ 0x140179d86\n// > GameLevelManager::saveFetchedLevels @ 0x14021e49d\n// > GameLevelManager::saveLevel @ 0x140220a4d\n// > GameLevelManager::gotoLevelPage @ 0x140221492\n// > GameLevelManager::replayPlatformerSaveJournal @ 0x140223a70\n// > GameLevelManager::onUploadDeathDataCompleted @ 0x140227635\n// > GameLevelManager::onGetDeathDataCompleted @ 0x140228b09\n// > GameLevelManager::clearDeathDataInstances @ 0x140228d5e\n// > GameLevelManager::onGetLevelSaveDataCompleted @ 0x14022c48e\n// > GameLevelManager::processOnDownloadLevelCompleted @ 0x14023337d\n// > GameLevelManager::levelControlInstances @ 0x14025a853\n// > GameLevelManager::onLikeItemCompleted @ 0x14025b5e8\n// > GJLevelList::getListLevelsArray @ 0x14027317b\n// > GameStatsManager::getTotalCollectedCurrency @ 0x1402e7775\n// > GauntletLayer::unlockActiveItem @ 0x1402fd1dd\n// > InfoLayer::onLevelInfo @ 0x1403d0de1\n// > LevelInfoLayer::onDeathTracker @ 0x14041ee53\n// > <???> @ 0x14091bb78\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:24 +0000\n// \n\n// Hidden C++ exception states: #wind=1\n__int64 __fastcall GameLevelManager::getSavedLevel(__int64 a1)\n{\n  cocos2d::CCString *v2; // rax\n  const char *CString; // rax\n  size_t v4; // r8\n  __int64 v5; // rbx\n  void *v6; // r8\n  void *Block[2]; // [rsp+30h] [rbp-38h] BYREF\n  __int128 v9; // [rsp+40h] [rbp-28h]\n\n  v2 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8);\n  CString = cocos2d::CCString::getCString(v2);\n  *(_OWORD *)Block = 0;\n  v9 = 0;\n  v4 = -1;\n  do\n    ++v4;\n  while ( CString[v4] );\n  sub_14003D230(Block, CString, v4);\n  v5 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 856), Block);\n  if ( *((_QWORD *)&v9 + 1) > 0xFu )\n  {\n    v6 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v9 + 1) + 1LL) >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v6);\n  }\n  return v5;\n}", "assembly": "; \n; GameLevelManager::getSavedLevel from 0x140220700 to 0x1402207df (223 bytes)\n; \n; 23 xrefs:\n; > CreatorLayer::sceneWillResume @ 0x1401398e3\n; > LevelCell::loadCustomLevelCell @ 0x14014970e\n; > CommentCell::loadFromComment @ 0x140153231\n; > CommentCell::loadFromComment @ 0x1401535a9\n; > CommentCell::loadFromComment @ 0x1401540e8\n; > EditLevelLayer::onDeathTracker @ 0x140179d86\n; > GameLevelManager::saveFetchedLevels @ 0x14021e49d\n; > GameLevelManager::saveLevel @ 0x140220a4d\n; > GameLevelManager::gotoLevelPage @ 0x140221492\n; > GameLevelManager::replayPlatformerSaveJournal @ 0x140223a70\n; > GameLevelManager::onUploadDeathDataCompleted @ 0x140227635\n; > GameLevelManager::onGetDeathDataCompleted @ 0x140228b09\n; > GameLevelManager::clearDeathDataInstances @ 0x140228d5e\n; > GameLevelManager::onGetLevelSaveDataCompleted @ 0x14022c48e\n; > GameLevelManager::processOnDownloadLevelCompleted @ 0x14023337d\n; > GameLevelManager::levelControlInstances @ 0x14025a853\n; > GameLevelManager::onLikeItemCompleted @ 0x14025b5e8\n; > GJLevelList::getListLevelsArray @ 0x14027317b\n; > GameStatsManager::getTotalCollectedCurrency @ 0x1402e7775\n; > GauntletLayer::unlockActiveItem @ 0x1402fd1dd\n; > InfoLayer::onLevelInfo @ 0x1403d0de1\n; > LevelInfoLayer::onDeathTracker @ 0x14041ee53\n; > <???> @ 0x14091bb78\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:24 +0000\n; \npush    rbx                                                            ; +0x0, 0x140220700\nsub     rsp, 60h                                                       ; +0x2, 0x140220702\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x140220706\nxor     rax, rsp                                                       ; +0xd, 0x14022070d\nmov     [rsp+68h+var_18], rax                                          ; +0x10, 0x140220710\nmov     rbx, rcx                                                       ; +0x15, 0x140220715\nlea     rcx, word_1406ED6F8                                            ; +0x18, 0x140220718\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x1f, 0x14022071f\nmov     rcx, rax                                                       ; +0x25, 0x140220725\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x28, 0x140220728\nxorps   xmm0, xmm0                                                     ; +0x2e, 0x14022072e\nmovups  xmmword ptr [rsp+68h+Block], xmm0                              ; +0x31, 0x140220731\nxorps   xmm1, xmm1                                                     ; +0x36, 0x140220736\nmovdqu  [rsp+68h+var_28], xmm1                                         ; +0x39, 0x140220739\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x3f, 0x14022073f\ninc     r8                                                             ; +0x46, 0x140220746\ncmp     byte ptr [rax+r8], 0                                           ; +0x49, 0x140220749\njnz     short loc_140220746                                            ; +0x4e, 0x14022074e\nmov     rdx, rax                                                       ; +0x50, 0x140220750\nlea     rcx, [rsp+68h+Block]                                           ; +0x53, 0x140220753\ncall    sub_14003D230                                                  ; +0x58, 0x140220758\nnop                                                                    ; +0x5d, 0x14022075d\nlea     rdx, [rsp+68h+Block]                                           ; +0x5e, 0x14022075e\nmov     rcx, [rbx+358h]                                                ; +0x63, 0x140220763\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x6a, 0x14022076a\nmov     rbx, rax                                                       ; +0x70, 0x140220770\nmov     rdx, qword ptr [rsp+68h+var_28+8]                              ; +0x73, 0x140220773\ncmp     rdx, 0Fh                                                       ; +0x78, 0x140220778\njbe     short loc_1402207C9                                            ; +0x7c, 0x14022077c\ninc     rdx                                                            ; +0x7e, 0x14022077e\nmov     r8, [rsp+68h+Block]                                            ; +0x81, 0x140220781\nmov     rcx, r8                                                        ; +0x86, 0x140220786\ncmp     rdx, 1000h                                                     ; +0x89, 0x140220789\njb      short loc_1402207C1                                            ; +0x90, 0x140220790\nadd     rdx, 27h ; '''                                                 ; +0x92, 0x140220792\nmov     r8, [r8-8]                                                     ; +0x96, 0x140220796\nsub     rcx, r8                                                        ; +0x9a, 0x14022079a\nsub     rcx, 8                                                         ; +0x9d, 0x14022079d\ncmp     rcx, 1Fh                                                       ; +0xa1, 0x1402207a1\njbe     short loc_1402207C1                                            ; +0xa5, 0x1402207a5\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0xa7, 0x1402207a7\nxor     r9d, r9d; LineNo                                               ; +0xb0, 0x1402207b0\nxor     r8d, r8d; FileName                                             ; +0xb3, 0x1402207b3\nxor     edx, edx; FunctionName                                         ; +0xb6, 0x1402207b6\nxor     ecx, ecx; Expression                                           ; +0xb8, 0x1402207b8\ncall    cs:_invoke_watson                                              ; +0xba, 0x1402207ba\ndb 0CCh                                                                ; +0xc0, 0x1402207c0\nmov     rcx, r8; Block                                                 ; +0xc1, 0x1402207c1\ncall    j_j_free                                                       ; +0xc4, 0x1402207c4\nmov     rax, rbx                                                       ; +0xc9, 0x1402207c9\nmov     rcx, [rsp+68h+var_18]                                          ; +0xcc, 0x1402207cc\nxor     rcx, rsp; StackCookie                                          ; +0xd1, 0x1402207d1\ncall    __security_check_cookie                                        ; +0xd4, 0x1402207d4\nadd     rsp, 60h                                                       ; +0xd9, 0x1402207d9\npop     rbx                                                            ; +0xdd, 0x1402207dd\nretn                                                                   ; +0xde, 0x1402207de", "xrefs": ["CreatorLayer::sceneWillResume @ 0x1401398e3", "LevelCell::loadCustomLevelCell @ 0x14014970e", "CommentCell::loadFromComment @ 0x140153231", "CommentCell::loadFromComment @ 0x1401535a9", "CommentCell::loadFromComment @ 0x1401540e8", "EditLevelLayer::onDeathTracker @ 0x140179d86", "GameLevelManager::saveFetchedLevels @ 0x14021e49d", "GameLevelManager::saveLevel @ 0x140220a4d", "GameLevelManager::gotoLevelPage @ 0x140221492", "GameLevelManager::replayPlatformerSaveJournal @ 0x140223a70", "GameLevelManager::onUploadDeathDataCompleted @ 0x140227635", "GameLevelManager::onGetDeathDataCompleted @ 0x140228b09", "GameLevelManager::clearDeathDataInstances @ 0x140228d5e", "GameLevelManager::onGetLevelSaveDataCompleted @ 0x14022c48e", "GameLevelManager::processOnDownloadLevelCompleted @ 0x14023337d", "GameLevelManager::levelControlInstances @ 0x14025a853", "GameLevelManager::onLikeItemCompleted @ 0x14025b5e8", "GJLevelList::getListLevelsArray @ 0x14027317b", "GameStatsManager::getTotalCollectedCurrency @ 0x1402e7775", "GauntletLayer::unlockActiveItem @ 0x1402fd1dd", "InfoLayer::onLevelInfo @ 0x1403d0de1", "LevelInfoLayer::onDeathTracker @ 0x14041ee53", "<???> @ 0x14091bb78"], "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"}