//
// EditorUI::toggleTraceSelected from 0x10000e770 to 0x10000e838 (200 bytes)
//
// 2 xrefs:
// > EditorUI::handleEditorAction @ 0x10060c962
// > EditorUI::handleEditorAction @ 0x10060cad9
//
// 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:51 +0000
//
bool __fastcall EditorUI::toggleTraceSelected(_QWORD *a1, char a2)
{
int v2; // eax
__int64 v4; // rcx
__int64 v5; // rdx
__int64 v6; // rsi
__int64 v7; // rdx
__int64 v8; // rsi
v2 = sub_1007FEF90(a1[112]);
if ( !v2 )
{
v4 = a1[187];
if ( a2 )
{
v5 = a1[180];
if ( v4 )
{
v6 = *(_QWORD *)(v5 + 14824);
if ( v6 && *(_DWORD *)(v6 + 916) == *(_DWORD *)(v4 + 916) )
v4 = 0;
*(_QWORD *)(v5 + 14824) = v4;
}
else
{
*(_QWORD *)(v5 + 14824) = 0;
}
}
else if ( v4 && *(_DWORD *)(v4 + 1248) == 1 )
{
v7 = a1[180];
v8 = *(_QWORD *)(v7 + 14832);
if ( v8 && *(_DWORD *)(v8 + 916) == *(_DWORD *)(v4 + 916) )
v4 = 0;
*(_QWORD *)(v7 + 14832) = v4;
}
else
{
*(_QWORD *)(a1[180] + 14832LL) = 0;
}
}
return v2 == 0;
}