//
// GameManager::saveFinished from 0x140286940 to 0x1402869d8 (152 bytes)
//
// 2 xrefs:
// > ??> @ 0x14075e168
// > ??> @ 0x14091d0fc
//
// 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:29:02 +0000
//
void __fastcall GameManager::saveFinished(__int64 a1, char a2)
{
__int64 *v3; // rdi
__int64 v4; // rbx
__int64 v5; // rsi
void *v6; // [rsp+30h] [rbp+8h]
if ( a2 )
{
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v6 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v6);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
}
v3 = (__int64 *)(a1 + 360);
GameLevelManager::prunePlatformerJournalKeys(a1, v3);
}
else
{
v3 = (__int64 *)(a1 + 360);
}
v4 = *v3;
v5 = v3[1];
if ( *v3 != v5 )
{
do
{
sub_14003D310(v4);
v4 += 40;
}
while ( v4 != v5 );
v3[1] = *v3;
}
}