//
// LevelInfoLayer::confirmOwnerDelete from 0x100028854 to 0x1000289e4 (400 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::init @ 0x10002555c
//
// 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
//
void __fastcall LevelInfoLayer::confirmOwnerDelete(LevelInfoLayer *a1, cocos2d::CCObject *a2)
{
GameManager *v3; // x0
_BOOL4 v4; // w20
GJAccountManager *v5; // x0
GJAccountManager *v6; // x0
GameManager *v7; // x0
int random; // w21
int seed; // w22
ButtonSprite **v10; // x19
std::string __p; // [xsp+0h] [xbp-50h] BYREF
std::string v12; // [xsp+18h] [xbp-38h] BYREF
if ( !a1->m_isBusy )
{
v3 = GameManager::sharedState();
if ( v3->m_playerUserID.random - v3->m_playerUserID.seed == a1->m_level->m_userID.random
- a1->m_level->m_userID.seed )
{
v4 = 0;
}
else
{
v5 = GJAccountManager::sharedState();
if ( v5->m_accountID == v5->m_unkInt1 )
{
v4 = 1;
}
else
{
v6 = GJAccountManager::sharedState();
v4 = v6->m_accountID - v6->m_unkInt1 != a1->m_level->m_accountID.random - a1->m_level->m_accountID.seed;
}
}
v7 = GameManager::sharedState();
random = v7->m_hasRP.random;
seed = v7->m_hasRP.seed;
sub_100009900(
&v12,
"Do you want to delete this level from the server?\n"
"(Your level will no longer be available online)");
if ( v4 && random - seed >= 2 )
std::string::assign(
&v12,
"Do you want to delete this level from the server?\n"
"(The level will no longer be available online)\n"
"(Elder Enabled)");
if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&__p, v12.__r_.__value_.__l.__data_, v12.__r_.__value_.__l.__size_);
else
__p = v12;
v10 = (ButtonSprite **)FLAlertLayer::create_1(
&a1->FLAlertLayerProtocol,
"Remove Server Level",
&__p,
"Cancel",
"DELETE",
380.0);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
ButtonSprite::updateBGImage(v10[75], "GJ_button_06.png");
(*(void (__fastcall **)(ButtonSprite **, __int64))&(*v10)->m_fVertexZ)(v10, 5);
(*(void (__fastcall **)(ButtonSprite **))&(*v10)[1].m_fTextureTop)(v10);
if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v12.__r_.__value_.__l.__data_);
}
}