//
// sub_1003FFD78 from 0x1003ffd78 to 0x1003ffe14 (156 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::updateVisibility @ 0x1003ffe50
// > LevelEditorLayer::updateVisibility @ 0x1003ffe68
//
// This function is hookable on this platform (idp: arm, 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:04:38 +0000
//
_QWORD *__fastcall sub_1003FFD78(_QWORD *result, int a2)
{
__int64 v2; // x8
_QWORD *v4; // x20
int v5; // w0
__int64 v6; // x8
unsigned int *v7; // x8
__int64 v8; // x9
__int64 *v9; // x8
unsigned __int64 v10; // x9
__int64 v11; // x10
v2 = result[1781];
if ( v2 )
{
v4 = result;
v5 = sub_1002E757C(*(_QWORD *)(v2 + 896));
v6 = v4[1781];
if ( v5 )
{
result = *(_QWORD **)(v6 + 896);
if ( !result )
return result;
}
else
{
result = *(_QWORD **)(v6 + 1496);
if ( !result )
return result;
result = sub_1002E73C8((__int64)result);
if ( !result )
return result;
}
v7 = (unsigned int *)result[7];
v8 = *v7;
if ( (_DWORD)v8 )
{
v9 = *((__int64 **)v7 + 2);
v10 = (unsigned __int64)&v9[v8 - 1];
do
{
v11 = *v9;
if ( !*v9 )
break;
if ( a2 )
{
*(_BYTE *)(v11 + 651) = *(_BYTE *)(v11 + 650);
*(_BYTE *)(v11 + 650) = 0;
}
else
{
*(_BYTE *)(v11 + 650) = *(_BYTE *)(v11 + 651);
}
++v9;
}
while ( (unsigned __int64)v9 <= v10 );
}
}
return result;
}