//
// GJBaseGameLayer::restoreRecording from 0x5b0ffc to 0x5b10a4 (168 bytes)
//
// 1 xrefs:
// > PlayLayer::loadPersistentCheckpoint @ 0x402ca8
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:32 +0000
//
void __fastcall GJBaseGameLayer::restoreRecording(int a1, int a2)
{
int *v3; // r3
unsigned int v4; // r1
int v5; // r7
int v6; // lr
int v7; // r2
bool v8; // cc
int v9; // r2
int v10[3]; // [sp+0h] [bp-14h] BYREF
if ( *(_BYTE *)(a1 + 10936) )
{
std::string::basic_string(v10, a2);
GJBaseGameLayer::parseRecording(a1, (int)v10, 1);
std::string::~string((int)v10);
v3 = *(int **)(a1 + 11012);
v4 = 0;
v5 = 0;
v6 = (*(_DWORD *)(a1 + 11016) - (int)v3) >> 4;
while ( v4 != v6 )
{
v7 = *v3;
v3 += 4;
v8 = (unsigned int)(v7 - 98) > 1;
v9 = *(v3 - 2);
if ( v8 )
v9 += v5;
if ( v9 > *(_DWORD *)(a1 + 820) )
{
std::vector::resize((int *)(a1 + 11012), v4);
break;
}
++v4;
v5 = v9;
}
*(_DWORD *)(a1 + 11104) = (*(_DWORD *)(a1 + 11016) - *(_DWORD *)(a1 + 11012)) >> 4;
*(_DWORD *)(a1 + 10996) = v5;
}
}