//
// CreatorLayer::onMultiplayer from 0x100298530 to 0x1002987ed (701 bytes)
//
// 1 xrefs:
// > CreatorLayer::init @ 0x1002979a1
//
// 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 CreatorLayer::onMultiplayer(CreatorLayer *a1, cocos2d::CCObject *a2)
{
double v2; // xmm0_8
unsigned int v3; // r14d
const std::string::value_type *v4; // rsi
const std::string::value_type *v5; // rsi
DialogObject *v6; // rax
DialogLayer *v7; // r14
int m_versusDialogIndex; // eax
int v9; // edx
__int128 v10; // [rsp+0h] [rbp-80h] BYREF
void *data; // [rsp+10h] [rbp-70h]
__int128 v12; // [rsp+20h] [rbp-60h] BYREF
void *__p; // [rsp+30h] [rbp-50h]
std::string v14; // [rsp+40h] [rbp-40h] BYREF
std::string v15; // [rsp+58h] [rbp-28h] BYREF
v15.__r_.__value_.__r.__words[2] = (std::string::size_type)operator new(0x40u);
v15.__r_.__value_.__r.__words[0] = 65;
v15.__r_.__value_.__l.__size_ = 60;
v2 = *(double *)"Versus mode has been delayed,\nbut it's in the works!";
strcpy(v15.__r_.__value_.__l.__data_, "Versus mode has been delayed,\nbut it's in the works!");
v14.__r_.__value_.__s.0 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)26;
strcpy(v14.__r_.__value_.__s.__data_, "The Keymaster");
v3 = 2;
switch ( a1->m_versusDialogIndex )
{
case 1:
v4 = "Yea... It's still delayed.";
goto LABEL_14;
case 2:
v5 = "I blame RobTop.";
goto LABEL_9;
case 3:
v4 = "Who else could we blame?\nWe're not even real.";
goto LABEL_14;
case 4:
std::string::assign(&v15, "Speak for yourself I'm real!");
v3 = 14;
std::string::assign(&v14, "Scratch");
break;
case 5:
v4 = "Yea, a real pain in the...";
goto LABEL_14;
case 6:
std::string::assign(&v15, "You're just mad because you don't have a shop.");
v3 = 26;
std::string::assign(&v14, "Scratch");
break;
case 7:
v3 = 4;
std::string::assign(&v15, "You have a shop?");
break;
case 8:
v5 = "I HAVE SAID TOO MUCH!\nQUICKLY TO THE CHOPPER!";
LABEL_9:
std::string::assign(&v15, v5);
v3 = 10;
std::string::assign(&v14, "Scratch");
break;
case 9:
v4 = "You don't have a chop...";
LABEL_14:
std::string::assign(&v15, v4);
break;
case 0xA:
std::string::assign(&v15, "...");
v3 = 52;
std::string::assign(&v14, "Scratch");
break;
case 0xB:
v3 = 17;
std::string::assign(&v15, ".....");
break;
default:
break;
}
if ( (*(_BYTE *)&v14.__r_.__value_.__s.0 & 1) != 0 )
{
sub_100006B70(&v10, v14.__r_.__value_.__l.__data_, v14.__r_.__value_.__l.__size_, 4.536902777662012e217);
}
else
{
data = v14.__r_.__value_.__l.__data_;
v2 = *(double *)v14.__r_.__value_.__r.__words;
v10 = *(_OWORD *)&v14.__r_.__value_.__l.0;
}
if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) != 0 )
{
sub_100006B70(&v12, v15.__r_.__value_.__l.__data_, v15.__r_.__value_.__l.__size_, v2);
}
else
{
__p = v15.__r_.__value_.__l.__data_;
v12 = *(_OWORD *)&v15.__r_.__value_.__l.0;
}
v6 = (DialogObject *)DialogObject::create(&v10, &v12, v3, 0, 0xFFFFFF, 1.0);
v7 = DialogLayer::create(v6, 2);
if ( (v12 & 1) != 0 )
operator delete(__p);
if ( (v10 & 1) != 0 )
operator delete(data);
((void (__fastcall *)(CreatorLayer *, DialogLayer *, __int64))a1->addChild_0)(a1, v7, 100);
DialogLayer::updateChatPlacement(v7, Center);
DialogLayer::animateInRandomSide(v7);
m_versusDialogIndex = a1->m_versusDialogIndex;
v9 = 0;
if ( m_versusDialogIndex < 11 )
v9 = m_versusDialogIndex + 1;
a1->m_versusDialogIndex = v9;
if ( (*(_BYTE *)&v14.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v14.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v15.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v15.__r_.__value_.__l.__data_);
}