//
// LevelInfoLayer::confirmOwnerDelete from 0x1002c1e80 to 0x1002c202b (427 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::init @ 0x1002be7cf
//
// 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)
{
double v2; // xmm0_8
GameManager *v3; // rax
bool v4; // r15
GJAccountManager *v5; // rax
GJAccountManager *v6; // rax
GameManager *v7; // rax
int v8; // r12d
ButtonSprite **v9; // rbx
__int128 v10; // [rsp+0h] [rbp-50h] BYREF
void *__p; // [rsp+10h] [rbp-40h]
std::string v12; // [rsp+18h] [rbp-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();
v4 = 1;
if ( v5->m_accountID != v5->m_unkInt1 )
{
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();
v8 = v7->m_hasRP.random - v7->m_hasRP.seed;
v12.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x88u);
v12.__r_.__value_.__r.__words[0] = 137;
v12.__r_.__value_.__l.__size_ = 129;
strcpy(
v12.__r_.__value_.__l.__data_,
"Do you want to delete this level from the server?\n"
"(Your level will no longer be available online)");
if ( !v4
|| v8 < 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)"),
(*(_BYTE *)&v12.__r_.__value_.__s.0 & 1) != 0) )
{
sub_100006B70(&v10, v12.__r_.__value_.__l.__data_, v12.__r_.__value_.__l.__size_, v2);
}
else
{
__p = v12.__r_.__value_.__l.__data_;
v10 = *(_OWORD *)&v12.__r_.__value_.__l.0;
}
v9 = (ButtonSprite **)FLAlertLayer::create_1(
&a1->FLAlertLayerProtocol,
"Remove Server Level",
&v10,
"Cancel",
"DELETE",
380.0);
if ( (v10 & 1) != 0 )
operator delete(__p);
ButtonSprite::updateBGImage(v9[75], "GJ_button_06.png");
(*(void (__fastcall **)(ButtonSprite **, __int64))&(*v9)->m_fVertexZ)(v9, 5);
(*(void (__fastcall **)(ButtonSprite **))&(*v9)[1].m_fTextureTop)(v9);
if ( (*(_BYTE *)&v12.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v12.__r_.__value_.__l.__data_);
}
}