//
// sub_1008F0880 from 0x1008f0880 to 0x1008f097b (251 bytes)
//
// 4 xrefs:
// > sub_1008EF050 @ 0x1008f00d4
// > sub_1008F0380 @ 0x1008f03ee
// > EditorSoundBrowserLayer::setTextPopupClosed @ 0x1008f17a3
// > sub_1008F1890 @ 0x1008f189a
//
// 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:37:55 +0000
//
__int64 __fastcall sub_1008F0880(__int64 a1, int a2)
{
__int64 v3; // rdi
unsigned int v4; // r15d
__int64 v5; // r12
__int64 v6; // r13
int v7; // eax
__int64 v8; // rdi
_BOOL4 v9; // r14d
*(_DWORD *)(a1 + 1048) = a2;
*(_DWORD *)(a1 + 1052) = 0;
*(_DWORD *)(a1 + 1112) = 0;
if ( *(_QWORD *)(a1 + 1168) )
{
v3 = *(_QWORD *)(a1 + 1176);
if ( v3 )
{
if ( (unsigned int)sub_1007FEF90(v3) )
{
v4 = 0;
do
{
v5 = sub_1007FEFE0(*(_QWORD *)(a1 + 1168), v4);
v6 = sub_1007FEFE0(*(_QWORD *)(a1 + 1176), v4);
v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 64LL))(v5);
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v6 + 344LL))(v6, v7 == a2);
++v4;
}
while ( v4 < (unsigned int)sub_1007FEF90(*(_QWORD *)(a1 + 1176)) );
}
}
}
v8 = *(_QWORD *)(a1 + 1088);
if ( v8 )
{
v9 = *(_DWORD *)(a1 + 1048) == 1;
(*(void (__fastcall **)(__int64, bool))(*(_QWORD *)v8 + 344LL))(v8, *(_DWORD *)(a1 + 1048) == 1);
(*(void (__fastcall **)(_QWORD, _BOOL4))(**(_QWORD **)(a1 + 1088) + 1056LL))(*(_QWORD *)(a1 + 1088), v9);
}
return sub_1008F0AC0(a1, 0, 0);
}