//
// sub_1009A5740 from 0x1009a5740 to 0x1009a5832 (242 bytes)
//
// 3 xrefs:
// > LevelInfoLayer::confirmOwnerDelete @ 0x1002aebf6
// > LevelListLayer::confirmOwnerDelete @ 0x100349349
// > sub_1008F7160 @ 0x1008f72df
//
// 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:39:18 +0000
//
char *__fastcall sub_1009A5740(int a1, int a2, int a3, __int64 a4, int a5)
{
std::string *v7; // rax
char *v8; // rbx
std::string v10; // [rsp+18h] [rbp-78h] BYREF
__int128 v11; // [rsp+30h] [rbp-60h] BYREF
void *data; // [rsp+40h] [rbp-50h]
std::string v13; // [rsp+50h] [rbp-40h] BYREF
std::operator+(&v13, "Delete ", a4);
v7 = std::string::append(&v13, " from the server?\n(It will no longer be available online)");
data = v7->__r_.__value_.__l.__data_;
v11 = *(_OWORD *)&v7->__r_.__value_.__l.0;
*(_OWORD *)&v7->__r_.__value_.__l.0 = 0;
v7->__r_.__value_.__r.__words[2] = 0;
if ( (*(_BYTE *)&v13.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v13.__r_.__value_.__l.__data_);
sub_100964380((__int64)&v13, a5);
*(_WORD *)&v10.__r_.__value_.__l.0 = 0;
v8 = sub_1009A4AD0(a1, a2, a3, (int)&v11, (int)"Delete", (__int64)&v13, &v10, 1);
if ( (*(_BYTE *)&v10.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v10.__r_.__value_.__l.__data_);
if ( v13.__r_.__value_.__r.__words[0] )
{
v13.__r_.__value_.__l.__size_ = v13.__r_.__value_.__r.__words[0];
operator delete((void *)v13.__r_.__value_.__r.__words[0]);
}
if ( (v11 & 1) != 0 )
operator delete(data);
return v8;
}