//
// EditorUI::uncheckPortals from 0x1000178d0 to 0x1000179be (238 bytes)
//
// 2 xrefs:
// > EditorUI::handleEditorAction @ 0x10060c75f
// > EditorCommandsPopup::onCommand @ 0x1008dee41
//
// 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:18:55 +0000
//
__int64 __fastcall EditorUI::uncheckPortals(__int64 a1)
{
__int64 result; // rax
__int64 v2; // r14
int v3; // r15d
unsigned int i; // r12d
int v5; // ecx
__int64 v6; // r13
result = LevelEditorLayer::getAllObjects(*(_QWORD *)(a1 + 1440));
if ( result )
{
v2 = result;
result = sub_1007FEF90(result);
if ( (int)result > 0 )
{
v3 = result;
for ( i = 0; v3 != i; ++i )
{
result = sub_1007FEFE0(v2, i);
v5 = *(_DWORD *)(result + 1028);
if ( v5 > 659 )
{
if ( v5 != 660 && v5 != 1933 && v5 != 1331 )
continue;
}
else if ( v5 != 13 && v5 != 47 && v5 != 111 )
{
continue;
}
if ( *(_BYTE *)(result + 1768) == 1 )
{
v6 = result;
result = DrawGridLayer::removeFromGuides(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 14288LL), result);
*(_BYTE *)(v6 + 1768) = 0;
}
}
}
}
return result;
}