{"type": "func", "start": 4300509616, "end": 4300509833, "name": "GameLevelManager::getSavedLevel", "pseudocode": "// \n// GameLevelManager::getSavedLevel from 0x1005491b0 to 0x100549289 (217 bytes)\n// \n// 18 xrefs:\n// > GameStatsManager::getTotalCollectedCurrency @ 0x10003adf0\n// > CommentCell::loadFromComment @ 0x10022e500\n// > CommentCell::loadFromComment @ 0x10022e5d2\n// > CommentCell::loadFromComment @ 0x10022ef5a\n// > LevelCell::loadCustomLevelCell @ 0x10023785b\n// > sub_100522AC0 @ 0x100522db9\n// > sub_100522F40 @ 0x1005230ef\n// > GameLevelManager::onLikeItemCompleted @ 0x100527314\n// > GameLevelManager::onGetLevelSaveDataCompleted @ 0x10052be82\n// > GameLevelManager::saveFetchedLevels @ 0x100542d00\n// > GameLevelManager::getSavedLevel_1 @ 0x100542ed3\n// > GameLevelManager::saveLevel @ 0x10054938f\n// > GameLevelManager::gotoLevelPage @ 0x100549e37\n// > GameLevelManager::replayPlatformerSaveJournal @ 0x10054d30d\n// > sub_1005548D0 @ 0x10055491e\n// > sub_10055F180 @ 0x100560240\n// > sub_10057E250 @ 0x10057e285\n// > GJLevelList::getListLevelsArray @ 0x10058ef7b\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 12:32:00 +0000\n// \n\n__int64 __fastcall GameLevelManager::getSavedLevel(__int64 a1)\n{\n  __int64 v1; // rbx\n  __int64 v2; // rax\n  const char *CString; // r15\n  size_t v4; // rax\n  size_t v5; // r14\n  char *v6; // r12\n  size_t v7; // r13\n  __int64 result; // rax\n  __int64 v9; // rbx\n  _QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF\n  void *__p; // [rsp+10h] [rbp-30h]\n\n  v1 = *(_QWORD *)(a1 + 760);\n  v2 = sub_10088E820(\"%i\", __dst[0]);\n  CString = (const char *)cocos2d::CCString::getCString(v2);\n  v4 = strlen(CString);\n  if ( v4 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v5 = v4;\n  if ( v4 >= 0x17 )\n  {\n    v7 = 26;\n    if ( (v4 | 7) != 0x17 )\n      v7 = (v4 | 7) + 1;\n    v6 = (char *)operator new(v7);\n    __p = v6;\n    __dst[0] = v7 + 1;\n    __dst[1] = v5;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v4;\n  v6 = (char *)__dst + 1;\n  if ( v4 )\nLABEL_8:\n    memmove(v6, CString, v5);\n  v6[v5] = 0;\n  result = cocos2d::CCDictionary::objectForKey(v1, (char *)__dst);\n  if ( (__dst[0] & 1) != 0 )\n  {\n    v9 = result;\n    operator delete(__p);\n    return v9;\n  }\n  return result;\n}", "assembly": "; \n; GameLevelManager::getSavedLevel from 0x1005491b0 to 0x100549289 (217 bytes)\n; \n; 18 xrefs:\n; > GameStatsManager::getTotalCollectedCurrency @ 0x10003adf0\n; > CommentCell::loadFromComment @ 0x10022e500\n; > CommentCell::loadFromComment @ 0x10022e5d2\n; > CommentCell::loadFromComment @ 0x10022ef5a\n; > LevelCell::loadCustomLevelCell @ 0x10023785b\n; > sub_100522AC0 @ 0x100522db9\n; > sub_100522F40 @ 0x1005230ef\n; > GameLevelManager::onLikeItemCompleted @ 0x100527314\n; > GameLevelManager::onGetLevelSaveDataCompleted @ 0x10052be82\n; > GameLevelManager::saveFetchedLevels @ 0x100542d00\n; > GameLevelManager::getSavedLevel_1 @ 0x100542ed3\n; > GameLevelManager::saveLevel @ 0x10054938f\n; > GameLevelManager::gotoLevelPage @ 0x100549e37\n; > GameLevelManager::replayPlatformerSaveJournal @ 0x10054d30d\n; > sub_1005548D0 @ 0x10055491e\n; > sub_10055F180 @ 0x100560240\n; > sub_10057E250 @ 0x10057e285\n; > GJLevelList::getListLevelsArray @ 0x10058ef7b\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 12:32:00 +0000\n; \npush    rbp                                                            ; +0x0, 0x1005491b0\nmov     rbp, rsp                                                       ; +0x1, 0x1005491b1\npush    r15                                                            ; +0x4, 0x1005491b4\npush    r14                                                            ; +0x6, 0x1005491b6\npush    r13                                                            ; +0x8, 0x1005491b8\npush    r12                                                            ; +0xa, 0x1005491ba\npush    rbx                                                            ; +0xc, 0x1005491bc\nsub     rsp, 18h                                                       ; +0xd, 0x1005491bd\nmov     rbx, [rdi+2F8h]                                                ; +0x11, 0x1005491c1\nlea     rdi, aI_14; \"%i\"                                               ; +0x18, 0x1005491c8\nxor     eax, eax                                                       ; +0x1f, 0x1005491cf\ncall    sub_10088E820                                                  ; +0x21, 0x1005491d1\nmov     rdi, rax                                                       ; +0x26, 0x1005491d6\ncall    cocos2d__CCString__getCString                                  ; +0x29, 0x1005491d9\nmov     r15, rax                                                       ; +0x2e, 0x1005491de\nmov     rdi, rax; __s                                                  ; +0x31, 0x1005491e1\ncall    _strlen                                                        ; +0x34, 0x1005491e4\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x39, 0x1005491e9\njnb     loc_100549284                                                  ; +0x3d, 0x1005491ed\nmov     r14, rax                                                       ; +0x43, 0x1005491f3\ncmp     rax, 17h                                                       ; +0x46, 0x1005491f6\njnb     short loc_10054920E                                            ; +0x4a, 0x1005491fa\nlea     eax, [r14+r14]                                                 ; +0x4c, 0x1005491fc\nmov     byte ptr [rbp+__dst], al                                       ; +0x50, 0x100549200\nlea     r12, [rbp+__dst+1]                                             ; +0x53, 0x100549203\ntest    r14, r14                                                       ; +0x57, 0x100549207\njnz     short loc_100549241                                            ; +0x5a, 0x10054920a\njmp     short loc_10054924F                                            ; +0x5c, 0x10054920c\nmov     rax, r14                                                       ; +0x5e, 0x10054920e\nor      rax, 7                                                         ; +0x61, 0x100549211\nlea     rcx, [rax+1]                                                   ; +0x65, 0x100549215\ncmp     rax, 17h                                                       ; +0x69, 0x100549219\nmov     r13d, 1Ah                                                      ; +0x6d, 0x10054921d\ncmovnz  r13, rcx                                                       ; +0x73, 0x100549223\nmov     rdi, r13; __sz                                                 ; +0x77, 0x100549227\ncall    __Znwm; operator new(ulong)                                    ; +0x7a, 0x10054922a\nmov     r12, rax                                                       ; +0x7f, 0x10054922f\nmov     [rbp+__p], rax                                                 ; +0x82, 0x100549232\ninc     r13                                                            ; +0x86, 0x100549236\nmov     [rbp+__dst], r13                                               ; +0x89, 0x100549239\nmov     [rbp+var_38], r14                                              ; +0x8d, 0x10054923d\nmov     rdi, r12; __dst                                                ; +0x91, 0x100549241\nmov     rsi, r15; __src                                                ; +0x94, 0x100549244\nmov     rdx, r14; __len                                                ; +0x97, 0x100549247\ncall    _memmove                                                       ; +0x9a, 0x10054924a\nmov     byte ptr [r12+r14], 0                                          ; +0x9f, 0x10054924f\nlea     rsi, [rbp+__dst]                                               ; +0xa4, 0x100549254\nmov     rdi, rbx                                                       ; +0xa8, 0x100549258\ncall    cocos2d__CCDictionary__objectForKey                            ; +0xab, 0x10054925b\ntest    byte ptr [rbp+__dst], 1                                        ; +0xb0, 0x100549260\njz      short loc_100549275                                            ; +0xb4, 0x100549264\nmov     rdi, [rbp+__p]; __p                                            ; +0xb6, 0x100549266\nmov     rbx, rax                                                       ; +0xba, 0x10054926a\ncall    __ZdlPv; operator delete(void *)                               ; +0xbd, 0x10054926d\nmov     rax, rbx                                                       ; +0xc2, 0x100549272\nadd     rsp, 18h                                                       ; +0xc5, 0x100549275\npop     rbx                                                            ; +0xc9, 0x100549279\npop     r12                                                            ; +0xca, 0x10054927a\npop     r13                                                            ; +0xcc, 0x10054927c\npop     r14                                                            ; +0xce, 0x10054927e\npop     r15                                                            ; +0xd0, 0x100549280\npop     rbp                                                            ; +0xd2, 0x100549282\nretn                                                                   ; +0xd3, 0x100549283\ncall    sub_100003630                                                  ; +0xd4, 0x100549284", "xrefs": ["GameStatsManager::getTotalCollectedCurrency @ 0x10003adf0", "CommentCell::loadFromComment @ 0x10022e500", "CommentCell::loadFromComment @ 0x10022e5d2", "CommentCell::loadFromComment @ 0x10022ef5a", "LevelCell::loadCustomLevelCell @ 0x10023785b", "sub_100522AC0 @ 0x100522db9", "sub_100522F40 @ 0x1005230ef", "GameLevelManager::onLikeItemCompleted @ 0x100527314", "GameLevelManager::onGetLevelSaveDataCompleted @ 0x10052be82", "GameLevelManager::saveFetchedLevels @ 0x100542d00", "GameLevelManager::getSavedLevel_1 @ 0x100542ed3", "GameLevelManager::saveLevel @ 0x10054938f", "GameLevelManager::gotoLevelPage @ 0x100549e37", "GameLevelManager::replayPlatformerSaveJournal @ 0x10054d30d", "sub_1005548D0 @ 0x10055491e", "sub_10055F180 @ 0x100560240", "sub_10057E250 @ 0x10057e285", "GJLevelList::getListLevelsArray @ 0x10058ef7b"], "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"}