//
// PlayLayer::processCheckpoints from 0x100088740 to 0x1000889e0 (672 bytes)
//
// 1 xrefs:
// > ??> @ 0x100abb138
//
// 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 12:20:05 +0000
//
unsigned int *__fastcall PlayLayer::processCheckpoints(unsigned int **a1, __int64 a2, __int64 a3)
{
unsigned int **v3; // rbx
unsigned int *result; // rax
__int64 v5; // rsi
unsigned __int64 v6; // xmm0_8
__int64 v7; // rax
__int64 v8; // rax
__int64 v9; // r14
unsigned int *v10; // rax
char *v11; // rsi
__int64 MainObject; // rax
__int64 v13; // r15
__int64 v14; // rdi
__int64 v15; // rdx
unsigned int *v16; // rax
__int64 v17; // rax
unsigned int *v18; // rdi
unsigned int *v19; // rax
__int64 v20; // rsi
char v21[8]; // [rsp+8h] [rbp-48h] BYREF
void *__p[2]; // [rsp+10h] [rbp-40h] BYREF
__int64 v23; // [rsp+20h] [rbp-30h]
v3 = a1;
if ( *((_BYTE *)a1 + 14868) == 1 )
{
*((_BYTE *)a1 + 14868) = 0;
PlayLayer::markCheckpoint(a1);
}
result = a1[1859];
if ( result )
{
v5 = result[462];
if ( (int)v5 > 0 )
{
*(_OWORD *)__p = 0;
v23 = 0;
(*((void (__fastcall **)(unsigned int **, __int64, _QWORD, void **, _QWORD, _QWORD, double))*a1 + 157))(
a1,
v5,
0,
__p,
result[229],
result[418],
0.0);
a1 = (unsigned int **)__p[0];
if ( __p[0] )
{
__p[1] = __p[0];
operator delete(__p[0]);
}
}
v6 = GameManager::sharedState(a1, v5, a3).u64[0];
if ( (unsigned __int8)GameManager::getGameVariable(v7, "0146") )
goto LABEL_24;
v8 = PlayLayer::markCheckpoint(v3);
if ( !v8 )
goto LABEL_24;
v9 = v8;
(*(void (__fastcall **)(void **, double))(*(_QWORD *)v3[1859] + 1360LL))(__p, *(double *)&v6);
v10 = v3[1859];
if ( *((_BYTE *)v10 + 1684) == 1 )
{
v11 = (char *)(*(__int64 (__fastcall **)(unsigned int *))(*(_QWORD *)v3[407] + 192LL))(v3[407]);
}
else
{
if ( (int)v10[367] <= 0 )
goto LABEL_15;
MainObject = GJBaseGameLayer::tryGetMainObject(v3);
if ( !MainObject )
goto LABEL_15;
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)MainObject + 1360LL))(v21, MainObject);
v11 = v21;
}
sub_100278300(__p, v11);
LABEL_15:
v13 = sub_1005DDE90(v9);
sub_1002782D0(v21, __p);
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v13 + 1368LL))(v13, v21);
sub_100278300(*(_QWORD *)(v9 + 3120) + 316LL, __p);
*(_BYTE *)(*(_QWORD *)(v9 + 3120) + 432LL) = 1;
v14 = sub_1005DDE90(v9);
GameObject::makeInvisible(v14);
v16 = v3[1859];
*(_DWORD *)(v9 + 3140) = v16[229];
*(_DWORD *)(v9 + 3144) = v16[461];
if ( v3[242][285] != 1 && !*((_BYTE *)v3 + 12544) && !*((_BYTE *)v3 + 12616) )
{
v6 = GameManager::sharedState(v14, __p, v15).u64[0];
if ( (!(unsigned __int8)GameManager::getGameVariable(v17, "0192") || *((_BYTE *)v3[242] + 1528) == 1)
&& v3[1772] != (unsigned int *)v9 )
{
cocos2d::CCObject::retain(v9);
v18 = v3[1772];
if ( v18 )
cocos2d::CCObject::release(v18);
v3[1772] = (unsigned int *)v9;
}
}
LABEL_24:
v19 = v3[1859];
v20 = v19[366];
if ( (int)v20 > 0 )
{
*(_OWORD *)__p = 0;
v23 = 0;
v6 = 0;
(*((void (__fastcall **)(unsigned int **, __int64, _QWORD, void **, _QWORD, _QWORD, double))*v3 + 157))(
v3,
v20,
0,
__p,
v19[229],
v19[418],
0.0);
if ( __p[0] )
{
__p[1] = __p[0];
operator delete(__p[0]);
}
}
result = (unsigned int *)GJBaseGameLayer::gameEventTriggered(v3, 60, 0, 0, *(double *)&v6);
v3[1859] = nullptr;
}
return result;
}