//
// SetupSmartBlockLayer::onReferenceOnly from 0x1004e1c90 to 0x1004e1d12 (130 bytes)
//
// 1 xrefs:
// > SetupSmartBlockLayer::init @ 0x1004e0d09
//
// 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:31:18 +0000
//
char __fastcall SetupSmartBlockLayer::onReferenceOnly(__int64 a1)
{
unsigned int v1; // eax
__int64 v2; // rcx
__int64 v4; // rdi
unsigned int i; // r14d
LOBYTE(v1) = *(_BYTE *)(a1 + 672) ^ 1;
*(_BYTE *)(a1 + 672) = v1;
v2 = *(_QWORD *)(a1 + 688);
if ( v2 )
{
*(_BYTE *)(v2 + 1347) = v1;
}
else
{
v4 = *(_QWORD *)(a1 + 696);
if ( v4 )
{
v1 = sub_1007FEF90(v4);
if ( v1 )
{
for ( i = 0; i < v1; ++i )
{
*(_BYTE *)(sub_1007FEFE0(*(_QWORD *)(a1 + 696), i) + 1347) = *(_BYTE *)(a1 + 672);
v1 = sub_1007FEF90(*(_QWORD *)(a1 + 696));
}
}
}
}
return v1;
}