{"type": "func", "start": 5370953392, "end": 5370953803, "name": "GameLevelManager::prunePlatformerJournalKeys", "pseudocode": "// \n// GameLevelManager::prunePlatformerJournalKeys from 0x140223eb0 to 0x14022404b (411 bytes)\n// \n// 3 xrefs:\n// > GameManager::saveFinished @ 0x140286995\n// > LocalLevelManager::saveFinished @ 0x14046dff6\n// > <???> @ 0x14091bcbc\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:25 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nint __fastcall GameLevelManager::prunePlatformerJournalKeys(__int64 a1, __int64 *a2)\n{\n  __int64 v3; // rax\n  _Mtx_t v4; // rbp\n  DS_Dictionary *v5; // rbx\n  unsigned __int64 v6; // r15\n  __int64 v7; // r8\n  __int64 v8; // r14\n  int IntegerForKey; // edi\n  const char *v10; // rdx\n  const char *v11; // rdx\n  DS_Dictionary *v13; // [rsp+58h] [rbp+10h]\n\n  v3 = a2[1];\n  if ( *a2 != v3 )\n  {\n    v4 = qword_14090A8C8;\n    if ( Mtx_lock(qword_14090A8C8) )\n    {\n      std::_Throw_Cpp_error(5);\n      __debugbreak();\n    }\n    if ( *((_DWORD *)v4 + 19) == 0x7FFFFFFF )\n    {\n      *((_DWORD *)v4 + 19) = 2147483646;\n      std::_Throw_Cpp_error(6);\n    }\n    v13 = (DS_Dictionary *)operator new(0xF0u);\n    v5 = DS_Dictionary::DS_Dictionary(v13);\n    if ( sub_140222A60((__int64)v5) )\n    {\n      v6 = 0;\n      v7 = *a2;\n      if ( (a2[1] - *a2) / 40 )\n      {\n        v8 = 0;\n        do\n        {\n          IntegerForKey = -1;\n          v10 = (const char *)(v8 + v7);\n          if ( *(_QWORD *)(v8 + v7 + 24) > 0xFu )\n            v10 = *(const char **)v10;\n          if ( DS_Dictionary::stepIntoSubDictWithKey(v5, v10) )\n          {\n            IntegerForKey = DS_Dictionary::getIntegerForKey(v5, \"sq\");\n            DS_Dictionary::stepOutOfSubDict(v5);\n          }\n          v11 = (const char *)(v8 + *a2);\n          if ( IntegerForKey == *((_DWORD *)v11 + 8) )\n          {\n            if ( *((_QWORD *)v11 + 3) > 0xFu )\n              v11 = *(const char **)v11;\n            DS_Dictionary::removeKey(v5, v11);\n          }\n          ++v6;\n          v8 += 40;\n          v7 = *a2;\n        }\n        while ( v6 < (a2[1] - *a2) / 40 );\n      }\n      sub_140222B40((__int64)v5);\n    }\n    if ( v5 )\n    {\n      DS_Dictionary::~DS_Dictionary(v5);\n      j_j_free(v5);\n    }\n    LODWORD(v3) = Mtx_unlock(v4);\n  }\n  return v3;\n}", "assembly": "; \n; GameLevelManager::prunePlatformerJournalKeys from 0x140223eb0 to 0x14022404b (411 bytes)\n; \n; 3 xrefs:\n; > GameManager::saveFinished @ 0x140286995\n; > LocalLevelManager::saveFinished @ 0x14046dff6\n; > <???> @ 0x14091bcbc\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:25 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x140223eb0\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x140223eb5\nmov     [rsp+arg_0], rcx                                               ; +0xa, 0x140223eba\npush    rsi                                                            ; +0xf, 0x140223ebf\npush    rdi                                                            ; +0x10, 0x140223ec0\npush    r12                                                            ; +0x11, 0x140223ec1\npush    r14                                                            ; +0x13, 0x140223ec3\npush    r15                                                            ; +0x15, 0x140223ec5\nsub     rsp, 20h                                                       ; +0x17, 0x140223ec7\nmov     rsi, rdx                                                       ; +0x1b, 0x140223ecb\nmov     rax, [rdx+8]                                                   ; +0x1e, 0x140223ece\ncmp     [rdx], rax                                                     ; +0x22, 0x140223ed2\njz      loc_140224034                                                  ; +0x25, 0x140223ed5\nmov     rbp, cs:qword_14090A8C8                                        ; +0x2b, 0x140223edb\nmov     [rsp+48h+arg_0], rbp                                           ; +0x32, 0x140223ee2\nmov     rcx, rbp; _Mtx_t                                               ; +0x37, 0x140223ee7\ncall    cs:_Mtx_lock                                                   ; +0x3a, 0x140223eea\ntest    eax, eax                                                       ; +0x40, 0x140223ef0\njz      short loc_140223F00                                            ; +0x42, 0x140223ef2\nmov     ecx, 5                                                         ; +0x44, 0x140223ef4\ncall    cs:?_Throw_Cpp_error@std@@YAXH@Z; std::_Throw_Cpp_error(int)   ; +0x49, 0x140223ef9\nint     3; Trap to Debugger                                            ; +0x4f, 0x140223eff\nmov     eax, [rbp+4Ch]                                                 ; +0x50, 0x140223f00\ncmp     eax, 7FFFFFFFh                                                 ; +0x53, 0x140223f03\njnz     short loc_140223F1B                                            ; +0x58, 0x140223f08\ndec     eax                                                            ; +0x5a, 0x140223f0a\nmov     [rbp+4Ch], eax                                                 ; +0x5c, 0x140223f0c\nmov     ecx, 6                                                         ; +0x5f, 0x140223f0f\ncall    cs:?_Throw_Cpp_error@std@@YAXH@Z; std::_Throw_Cpp_error(int)   ; +0x64, 0x140223f14\nnop                                                                    ; +0x6a, 0x140223f1a\nmov     ecx, 0F0h; Size                                                ; +0x6b, 0x140223f1b\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x70, 0x140223f20\nmov     [rsp+48h+arg_8], rax                                           ; +0x75, 0x140223f25\nmov     rcx, rax                                                       ; +0x7a, 0x140223f2a\ncall    cs:??0DS_Dictionary@@QEAA@XZ; DS_Dictionary::DS_Dictionary(void) ; +0x7d, 0x140223f2d\nmov     rbx, rax                                                       ; +0x83, 0x140223f33\nmov     rcx, rax                                                       ; +0x86, 0x140223f36\ncall    sub_140222A60                                                  ; +0x89, 0x140223f39\ntest    al, al                                                         ; +0x8e, 0x140223f3e\njz      loc_14022400F                                                  ; +0x90, 0x140223f40\nxor     r15d, r15d                                                     ; +0x96, 0x140223f46\nmov     r8, [rsi]                                                      ; +0x99, 0x140223f49\nmov     rcx, [rsi+8]                                                   ; +0x9c, 0x140223f4c\nsub     rcx, r8                                                        ; +0xa0, 0x140223f50\nmov     r12, 6666666666666667h                                         ; +0xa3, 0x140223f53\nmov     rax, r12                                                       ; +0xad, 0x140223f5d\nimul    rcx                                                            ; +0xb0, 0x140223f60\nsar     rdx, 4                                                         ; +0xb3, 0x140223f63\nmov     rax, rdx                                                       ; +0xb7, 0x140223f67\nshr     rax, 3Fh                                                       ; +0xba, 0x140223f6a\nadd     rdx, rax                                                       ; +0xbe, 0x140223f6e\njz      loc_140224007                                                  ; +0xc1, 0x140223f71\nmov     r14d, r15d                                                     ; +0xc7, 0x140223f77\nnop     word ptr [rax+rax+00h]                                         ; +0xca, 0x140223f7a\nmov     edi, 0FFFFFFFFh                                                ; +0xd0, 0x140223f80\nlea     rdx, [r14+r8]                                                  ; +0xd5, 0x140223f85\ncmp     qword ptr [rdx+18h], 0Fh                                       ; +0xd9, 0x140223f89\njbe     short loc_140223F93                                            ; +0xde, 0x140223f8e\nmov     rdx, [rdx]                                                     ; +0xe0, 0x140223f90\nmov     rcx, rbx                                                       ; +0xe3, 0x140223f93\ncall    cs:?stepIntoSubDictWithKey@DS_Dictionary@@QEAA_NPEBD@Z; DS_Dictionary::stepIntoSubDictWithKey(char const *) ; +0xe6, 0x140223f96\ntest    al, al                                                         ; +0xec, 0x140223f9c\njz      short loc_140223FBB                                            ; +0xee, 0x140223f9e\nlea     rdx, aSq; \"sq\"                                                 ; +0xf0, 0x140223fa0\nmov     rcx, rbx                                                       ; +0xf7, 0x140223fa7\ncall    cs:?getIntegerForKey@DS_Dictionary@@QEAAHPEBD@Z; DS_Dictionary::getIntegerForKey(char const *) ; +0xfa, 0x140223faa\nmov     edi, eax                                                       ; +0x100, 0x140223fb0\nmov     rcx, rbx                                                       ; +0x102, 0x140223fb2\ncall    cs:?stepOutOfSubDict@DS_Dictionary@@QEAAXXZ; DS_Dictionary::stepOutOfSubDict(void) ; +0x105, 0x140223fb5\nmov     rdx, [rsi]                                                     ; +0x10b, 0x140223fbb\nadd     rdx, r14                                                       ; +0x10e, 0x140223fbe\ncmp     edi, [rdx+20h]                                                 ; +0x111, 0x140223fc1\njnz     short loc_140223FD9                                            ; +0x114, 0x140223fc4\ncmp     qword ptr [rdx+18h], 0Fh                                       ; +0x116, 0x140223fc6\njbe     short loc_140223FD0                                            ; +0x11b, 0x140223fcb\nmov     rdx, [rdx]                                                     ; +0x11d, 0x140223fcd\nmov     rcx, rbx                                                       ; +0x120, 0x140223fd0\ncall    cs:?removeKey@DS_Dictionary@@QEAAXPEBD@Z; DS_Dictionary::removeKey(char const *) ; +0x123, 0x140223fd3\ninc     r15                                                            ; +0x129, 0x140223fd9\nadd     r14, 28h ; '('                                                 ; +0x12c, 0x140223fdc\nmov     r8, [rsi]                                                      ; +0x130, 0x140223fe0\nmov     rcx, [rsi+8]                                                   ; +0x133, 0x140223fe3\nsub     rcx, r8                                                        ; +0x137, 0x140223fe7\nmov     rax, r12                                                       ; +0x13a, 0x140223fea\nimul    rcx                                                            ; +0x13d, 0x140223fed\nsar     rdx, 4                                                         ; +0x140, 0x140223ff0\nmov     rax, rdx                                                       ; +0x144, 0x140223ff4\nshr     rax, 3Fh                                                       ; +0x147, 0x140223ff7\nadd     rdx, rax                                                       ; +0x14b, 0x140223ffb\ncmp     r15, rdx                                                       ; +0x14e, 0x140223ffe\njb      loc_140223F80                                                  ; +0x151, 0x140224001\nmov     rcx, rbx                                                       ; +0x157, 0x140224007\ncall    sub_140222B40                                                  ; +0x15a, 0x14022400a\ntest    rbx, rbx                                                       ; +0x15f, 0x14022400f\njz      short loc_14022402B                                            ; +0x162, 0x140224012\nmov     rcx, rbx                                                       ; +0x164, 0x140224014\ncall    cs:??1DS_Dictionary@@QEAA@XZ; DS_Dictionary::~DS_Dictionary(void) ; +0x167, 0x140224017\nmov     edx, 0F0h                                                      ; +0x16d, 0x14022401d\nmov     rcx, rbx; Block                                                ; +0x172, 0x140224022\ncall    j_j_free                                                       ; +0x175, 0x140224025\nnop                                                                    ; +0x17a, 0x14022402a\nmov     rcx, rbp; _Mtx_t                                               ; +0x17b, 0x14022402b\ncall    cs:_Mtx_unlock                                                 ; +0x17e, 0x14022402e\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x184, 0x140224034\nmov     rbp, [rsp+48h+arg_18]                                          ; +0x189, 0x140224039\nadd     rsp, 20h                                                       ; +0x18e, 0x14022403e\npop     r15                                                            ; +0x192, 0x140224042\npop     r14                                                            ; +0x194, 0x140224044\npop     r12                                                            ; +0x196, 0x140224046\npop     rdi                                                            ; +0x198, 0x140224048\npop     rsi                                                            ; +0x199, 0x140224049\nretn                                                                   ; +0x19a, 0x14022404a", "xrefs": ["GameManager::saveFinished @ 0x140286995", "LocalLevelManager::saveFinished @ 0x14046dff6", "<???> @ 0x14091bcbc"], "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"}