//
// GJWriteMessagePopup::updateText from 0x1002dd170 to 0x1002dd318 (424 bytes)
//
// 2 xrefs:
// > GJWriteMessagePopup::updateSubject @ 0x1002dcc98
// > GJWriteMessagePopup::updateBody @ 0x1002dcd24
//
// 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 GJWriteMessagePopup::updateText(__int64 a1, std::string *a2, int a3)
{
TextArea *v6; // x21
__int64 v7; // x8
void *__p[2]; // [xsp+8h] [xbp-68h] BYREF
char v9; // [xsp+1Fh] [xbp-51h]
std::string __dst; // [xsp+20h] [xbp-50h] BYREF
std::string v11; // [xsp+38h] [xbp-38h] BYREF
sub_100009900(&v11, "");
if ( a3 )
{
std::string::operator=((std::string *)(a1 + 696), a2);
v6 = *(TextArea **)(*(_QWORD *)(a1 + 680) + 576LL);
std::string::assign(&v11, "Message");
}
else
{
std::string::operator=((std::string *)(a1 + 720), a2);
v6 = *(TextArea **)(*(_QWORD *)(a1 + 688) + 576LL);
std::string::assign(&v11, "Subject");
}
v7 = SHIBYTE(a2->__r_.__value_.__r.__words[2]);
if ( v7 < 0 )
{
if ( a2->__r_.__value_.__l.__size_ )
goto LABEL_6;
}
else if ( *((_BYTE *)&a2->__r_.__value_.__s + 23) )
{
LABEL_6:
if ( a3 == 1 )
{
((void (__fastcall *)(TextArea *, float))v6->setScale)(v6, 1.0);
v6->m_width = 290.0;
LOBYTE(v7) = *((_BYTE *)&a2->__r_.__value_.__s + 23);
}
if ( (v7 & 0x80) != 0 )
a2 = (std::string *)a2->__r_.__value_.__r.__words[0];
sub_100009900(__p, (char *)a2);
TextArea::setString((__int64)v6, (const void **)__p);
if ( v9 < 0 )
operator delete(__p[0]);
TextArea::colorAllCharactersTo(v6, (cocos2d::ccColor3B)-1);
goto LABEL_21;
}
if ( SHIBYTE(v11.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&__dst, v11.__r_.__value_.__l.__data_, v11.__r_.__value_.__l.__size_);
else
__dst = v11;
TextArea::setString((__int64)v6, (const void **)&__dst.__r_.__value_.__l.__data_);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
TextArea::colorAllCharactersTo(v6, (cocos2d::ccColor3B)-3618616);
if ( a3 == 1 )
{
((void (__fastcall *)(TextArea *, float))v6->setScale)(v6, 1.0);
v6->m_width = 290.0;
}
LABEL_21:
GJWriteMessagePopup::updateCharCountLabel((GJWriteMessagePopup *)a1, a3);
if ( SHIBYTE(v11.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v11.__r_.__value_.__l.__data_);
}