//
// LevelEditorLayer::toggleLockActiveLayer from 0x1000bc390 to 0x1000bc3fe (110 bytes)
//
// 1 xrefs:
// > EditorUI::onLockLayer @ 0x10000ac18
//
// 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:32 +0000
//
unsigned __int64 __fastcall LevelEditorLayer::toggleLockActiveLayer(__int64 a1)
{
unsigned __int64 result; // rax
__int64 v2; // rcx
__int64 v3; // rdx
__int64 v4; // rsi
__int64 v5; // r9
__int64 v6; // r10
result = *(unsigned __int16 *)(a1 + 14210);
if ( (unsigned __int16)(result - 10000) >= 0xD8F1u && *(_BYTE *)(a1 + 14010) == 1 )
{
v2 = *(_QWORD *)(a1 + 14528);
v3 = (unsigned int)result >> 6;
v4 = *(_QWORD *)(v2 + 8 * v3);
v5 = v4 & ~(1LL << result);
v6 = v4 | (1LL << result);
result &= 0x3Fu;
if ( _bittest64(&v4, result) )
v6 = v5;
*(_QWORD *)(v2 + 8 * v3) = v6;
*(_DWORD *)(a1 + 14552) += (_bittest64(&v6, result) - 1) | 1;
}
return result;
}