//
// EventLinkTrigger::getSaveString from 0x782d78 to 0x783164 (1004 bytes)
//
// 2 xrefs:
// > ??> @ 0xafdd0
// > ??> @ 0x116e3b0
//
// 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
//
__int64 __usercall EventLinkTrigger::getSaveString@(
EventLinkTrigger *this@,
GJBaseGameLayer *a2@,
__int64 a3@)
{
size_t v5; // x20
std::_Rb_tree_node_base::_Base_ptr M_left; // x20
std::_Rb_tree_node_base *p_M_header; // x23
size_t v9; // x28
size_t v10; // x21
const char *v11; // [xsp+B0h] [xbp+B0h] BYREF
size_t v12; // [xsp+B8h] [xbp+B8h] BYREF
unsigned __int64 v13; // [xsp+C0h] [xbp+C0h]
char *v14; // [xsp+C8h] [xbp+C8h]
_BYTE v15[504]; // [xsp+D0h] [xbp+D0h] BYREF
v12 = 0;
v13 = 500;
v14 = v15;
EffectGameObject::getSaveString(this, a2, (__int64)&v11);
fmt::BasicWriter::operator<<(&v12, v11, *((_QWORD *)v11 - 3));
if ( v11 - 24 != (const char *)&qword_124B6B0 )
sub_74B3A8((void *)(v11 - 24));
if ( this->m_targetGroupID )
{
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v12, 0x33u);
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(
&v12,
this->m_targetGroupID);
if ( !this->m_extraID )
{
LABEL_5:
if ( !this->m_extraID2 )
goto LABEL_6;
goto LABEL_16;
}
}
else if ( !this->m_extraID )
{
goto LABEL_5;
}
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v12, 0x1BFu);
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v12, this->m_extraID);
if ( !this->m_extraID2 )
{
LABEL_6:
if ( !this->m_resetRemap )
goto LABEL_7;
LABEL_17:
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v12, 0x1AFu);
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v12, this->m_resetRemap);
if ( !this->m_eventIDs._M_t._M_impl._M_node_count )
goto LABEL_8;
goto LABEL_18;
}
LABEL_16:
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v12, 0x20Du);
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v12, this->m_extraID2);
if ( this->m_resetRemap )
goto LABEL_17;
LABEL_7:
if ( !this->m_eventIDs._M_t._M_impl._M_node_count )
goto LABEL_8;
LABEL_18:
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v12, 0x1AEu);
fmt::BasicWriter::operator<<(&v12, &byte_F804F8, 0);
M_left = this->m_eventIDs._M_t._M_impl._M_header._M_left;
p_M_header = &this->m_eventIDs._M_t._M_impl._M_header;
if ( M_left != p_M_header )
{
fmt::BasicWriter::FormatInt,char>>(&v12, M_left[1]._M_color);
while ( 1 )
{
M_left = (std::_Rb_tree_node_base::_Base_ptr)sub_CFAB74(M_left);
if ( p_M_header == M_left )
break;
v9 = v12;
v10 = v12 + 1;
if ( v12 + 1 > v13 )
fmt::internal::Array::grow(&v12, v12 + 1);
v12 = v10;
v14[v9] = 46;
fmt::BasicWriter::FormatInt,char>>(
&v12,
M_left[1]._M_color);
}
}
LABEL_8:
v5 = v12;
if ( v13 < v12 + 1 )
fmt::internal::Array::grow(&v12, v12 + 1);
v14[v5] = 0;
sub_D153B8(a3, v14);
if ( v14 != v15 && v14 )
operator delete[](v14);
return a3;
}