// // GameLevelManager::writePlatformerSaveJournal from 0x140223320 to 0x140223740 (1056 bytes) // // 2 xrefs: // > PlayLayer::onQuit @ 0x14051b114 // > @ 0x14091bc98 // // This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 11:28:25 +0000 // // Hidden C++ exception states: #wind=6 void __fastcall GameLevelManager::writePlatformerSaveJournal(__int64 a1, __int64 a2) { unsigned __int64 v3; // rbx int v4; // r14d _Mtx_t v5; // r15 DS_Dictionary *v6; // rdi const char *v7; // rdx const char *v8; // rdx void **v9; // rax void **v10; // r8 char v11; // r14 void *v12; // rcx __int64 v13; // rcx __int64 v14; // rax int v15; // r8d _QWORD *v16; // rax DS_Dictionary *v17; // [rsp+30h] [rbp-59h] DS_Dictionary *v18; // [rsp+30h] [rbp-59h] _QWORD v19[2]; // [rsp+40h] [rbp-49h] BYREF unsigned __int64 v20; // [rsp+50h] [rbp-39h] unsigned __int64 v21; // [rsp+58h] [rbp-31h] void *Block[2]; // [rsp+60h] [rbp-29h] BYREF __int64 v23; // [rsp+70h] [rbp-19h] unsigned __int64 v24; // [rsp+78h] [rbp-11h] _BYTE v25[32]; // [rsp+80h] [rbp-9h] BYREF void *Src[4]; // [rsp+A0h] [rbp+17h] BYREF if ( a2 ) { v3 = 0; v4 = *(_DWORD *)(a2 + 1220); if ( v4 == 2 || v4 == 3 && *(_DWORD *)(a2 + 328) - *(_DWORD *)(a2 + 332) > 0 ) { if ( *(_QWORD *)(a2 + 1648) ) { v5 = qword_14090A8C8; if ( Mtx_lock(qword_14090A8C8) ) { std::_Throw_Cpp_error(5); __debugbreak(); } if ( *((_DWORD *)v5 + 19) == 0x7FFFFFFF ) { *((_DWORD *)v5 + 19) = 2147483646; std::_Throw_Cpp_error(6); } v17 = (DS_Dictionary *)operator new(0xF0u); v6 = DS_Dictionary::DS_Dictionary(v17); if ( !sub_140222A60((__int64)v6) ) { if ( v6 ) { DS_Dictionary::~DS_Dictionary(v6); j_j_free(v6); } v18 = (DS_Dictionary *)operator new(0xF0u); v6 = DS_Dictionary::DS_Dictionary(v18); } sub_140222BE0((__int64)v19, a2); v7 = (const char *)v19; if ( v21 > 0xF ) v7 = (const char *)v19[0]; DS_Dictionary::removeKey(v6, v7); v8 = (const char *)v19; if ( v21 > 0xF ) v8 = (const char *)v19[0]; DS_Dictionary::setSubDictForKey(v6, v8, 0, 1); DS_Dictionary::setIntegerForKey(v6, "t", v4); DS_Dictionary::setIntegerForKey(v6, "id", *(_DWORD *)(a2 + 328) - *(_DWORD *)(a2 + 332)); DS_Dictionary::setIntegerForKey(v6, "did", *(_DWORD *)(a2 + 992) - *(_DWORD *)(a2 + 996)); DS_Dictionary::setBoolForKey(v6, "g", *(_BYTE *)(a2 + 721)); if ( v4 == 2 ) { if ( !*(_QWORD *)(a2 + 1608) ) { v9 = GameToolbox::gen_random(Src, 0x10u); sub_140059C40(a2 + 1592, (__int64)v9); sub_14003D310((__int64)Src); } sub_14003F4F0((__int64)v25, a2 + 1592); v10 = (void **)v25; v11 = 5; } else { *(_OWORD *)Block = 0; v23 = 0; v24 = 15; LOBYTE(Block[0]) = 0; v10 = Block; v11 = 2; } DS_Dictionary::setStringForKey(v6, "uid", v10); if ( (v11 & 2) != 0 ) { v11 &= ~2u; if ( v24 > 0xF ) { v12 = Block[0]; if ( v24 + 1 >= 0x1000 ) { v12 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v12 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v12); } v23 = 0; v24 = 15; LOBYTE(Block[0]) = 0; } if ( (v11 & 1) != 0 ) sub_14003D310((__int64)v25); DS_Dictionary::setStringForKey(v6, "cs", a2 + 1632); DS_Dictionary::setIntegerForKey(v6, "cv", *(_DWORD *)(a2 + 1696)); DS_Dictionary::setIntegerForKey(v6, "fv", *(_DWORD *)(a2 + 1700)); DS_Dictionary::setStringForKey(v6, "rs", a2 + 1664); DS_Dictionary::setBoolForKey(v6, "ps", *(_BYTE *)(a2 + 1704)); DS_Dictionary::setIntegerForKey(v6, "sq", ++dword_14090BFC0); v14 = GJAccountManager::sharedState(v13); v15 = 1640531535 * (*(_DWORD *)(v14 + 364) - *(_DWORD *)(v14 + 360)); if ( v20 ) { do { v16 = v19; if ( v21 > 0xF ) v16 = (_QWORD *)v19[0]; v15 = 16777619 * (v15 ^ *((unsigned __int8 *)v16 + v3++)); } while ( v3 < v20 ); } DS_Dictionary::setIntegerForKey(v6, "ow", v15 & 0x7FFFFFFF); DS_Dictionary::stepOutOfSubDict(v6); sub_140222B40((__int64)v6); if ( v6 ) { DS_Dictionary::~DS_Dictionary(v6); j_j_free(v6); } sub_14003D310((__int64)v19); Mtx_unlock(v5); } } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source