//
// SetFolderPopup::setTextPopupClosed from 0x1002ae6e0 to 0x1002ae770 (144 bytes)
//
// 2 xrefs:
// > sub_1002AE790 @ 0x1002ae79c
// > ??> @ 0x100901350
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall SetFolderPopup::setTextPopupClosed(__int64 a1, double a2, __int64 a3, __int128 *a4)
{
GameLevelManager *v5; // r14
unsigned int v6; // r15d
__int128 v8; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
v5 = GameLevelManager::sharedState();
v6 = *(_DWORD *)(a1 + 648);
if ( (*(_BYTE *)a4 & 1) != 0 )
{
sub_100006B70(&v8, *((const void **)a4 + 2), *((_QWORD *)a4 + 1), a2);
}
else
{
__p = *((void **)a4 + 2);
v8 = *a4;
}
GameLevelManager::setFolderName(v5, v6, &v8, *(unsigned __int8 *)(a1 + 688));
if ( (v8 & 1) != 0 )
operator delete(__p);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1312LL))(a1);
}