//
// UISaveLoadLayer::onLoad from 0x1002e4ce0 to 0x1002e4e54 (372 bytes)
//
// 1 xrefs:
// > UISaveLoadLayer::init @ 0x1002e48d4
//
// 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 UISaveLoadLayer::onLoad(UISaveLoadLayer *a1, cocos2d::CCObject *a2)
{
int v3; // w21
GameManager *v4; // x0
UIOptionsLayer *v5; // x19
const char *v6; // x8
cocos2d::CCString *v7; // x0
char *CString; // x0
cocos2d::CCObject *v9; // x0
void *__p[2]; // [xsp+18h] [xbp-68h] BYREF
char v11; // [xsp+2Fh] [xbp-51h]
void *__dst[2]; // [xsp+30h] [xbp-50h] BYREF
__int64 v13; // [xsp+40h] [xbp-40h]
__int128 v14; // [xsp+48h] [xbp-38h] BYREF
__int64 v15; // [xsp+58h] [xbp-28h]
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2);
((void (__fastcall *)(UISaveLoadLayer *, _QWORD))a1->onClose)(a1, 0);
((void (__fastcall *)(UIOptionsLayer *, _QWORD))a1->m_optionsLayer->onClose)(a1->m_optionsLayer, 0);
v4 = GameManager::sharedState();
GameManager::loadDPadLayout(v4, v3, a1->m_optionsLayer->m_dual);
v5 = UIOptionsLayer::create(a1->m_optionsLayer->m_dual);
((void (__fastcall *)(UIOptionsLayer *))v5->show)(v5);
if ( a1->m_optionsLayer->m_dual )
v6 = "Dual ";
else
v6 = "";
v7 = (cocos2d::CCString *)sub_100268F4C("%sUI %i loaded.", v6, v3);
CString = (char *)cocos2d::CCString::getCString(v7);
sub_100009900(&v14, CString);
if ( SHIBYTE(v15) < 0 )
{
sub_1000097D0(__dst, (void *)v14, *((unsigned __int64 *)&v14 + 1));
}
else
{
*(_OWORD *)__dst = v14;
v13 = v15;
}
sub_100009900(__p, "");
v9 = TextAlertPopup::create((__int64)__dst, 150, (__int64)__p, 0.5, 0.6);
((void (__fastcall *)(UIOptionsLayer *, cocos2d::CCObject *, __int64))v5->addChild_0)(v5, v9, 100);
if ( v11 < 0 )
operator delete(__p[0]);
if ( SHIBYTE(v13) < 0 )
operator delete(__dst[0]);
if ( SHIBYTE(v15) < 0 )
operator delete((void *)v14);
}