//
// LevelEditorLayer::lockedLayerForObject from 0x1003feeb4 to 0x1003fef1c (104 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::lockedLayerForObjectString @ 0x1003ff07c
// > EditorUI::onCreate @ 0x1004744c0
//
// 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:37 +0000
//
unsigned __int64 __fastcall LevelEditorLayer::lockedLayerForObject(__int64 a1, int a2, int a3)
{
int v4; // w10
unsigned __int64 result; // x0
int v6; // w9
__int64 v7; // x8
if ( !*(_DWORD *)(a1 + 14552) )
return 0xFFFFFFFFLL;
v4 = a2 >= 9999 ? 9999 : a2;
result = v4 & (unsigned int)~(v4 >> 31);
v6 = a3 >= 9999 ? 9999 : a3;
v7 = *(_QWORD *)(a1 + 14528);
if ( ((*(_QWORD *)(v7 + (((unsigned __int64)(v4 & (unsigned int)~(v4 >> 31)) >> 3) & 0x7F8)) >> ((unsigned __int8)v4
& (unsigned __int8)~(v4 >> 31)))
& 1) == 0 )
{
if ( a3 < 1 )
return 0xFFFFFFFFLL;
result = v6 & (unsigned int)~(v6 >> 31);
if ( ((*(_QWORD *)(v7 + ((result >> 3) & 0x1FFFFFF8)) >> ((unsigned __int8)v6 & (unsigned __int8)~(v6 >> 31))) & 1) == 0 )
return 0xFFFFFFFFLL;
}
return result;
}