//
// DashRingObject::getSaveString from 0x77e798 to 0x77eba4 (1036 bytes)
//
// 2 xrefs:
// > ??> @ 0x33378
// > ??> @ 0x1167b60
//
// 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 DashRingObject::getSaveString@(
DashRingObject *this@,
GJBaseGameLayer *a2@,
__int64 a3@)
{
char *v5; // x0
size_t v6; // x20
double m_dashSpeed; // d0
double m_endBoost; // d0
double m_maxDuration; // d0
unsigned int *v11; // x2
int v12; // w1
const char *v13; // [xsp+78h] [xbp+78h] BYREF
_DWORD v14[5]; // [xsp+80h] [xbp+80h] BYREF
char v15; // [xsp+94h] [xbp+94h]
_DWORD v16[5]; // [xsp+98h] [xbp+98h] BYREF
char v17; // [xsp+ACh] [xbp+ACh]
_DWORD v18[5]; // [xsp+B0h] [xbp+B0h] BYREF
char v19; // [xsp+C4h] [xbp+C4h]
size_t v20; // [xsp+C8h] [xbp+C8h] BYREF
unsigned __int64 v21; // [xsp+D0h] [xbp+D0h]
char *v22; // [xsp+D8h] [xbp+D8h]
_BYTE v23[504]; // [xsp+E0h] [xbp+E0h] BYREF
v20 = 0;
v21 = 500;
v22 = v23;
RingObject::getSaveString(this, a2, (__int64)&v13);
fmt::BasicWriter::operator<<(&v20, v13, *((_QWORD *)v13 - 3));
v5 = (char *)(v13 - 24);
if ( v13 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v11 = (unsigned int *)(v13 - 8);
do
v12 = __ldaxr(v11);
while ( __stlxr(v12 - 1, v11) );
}
else
{
v12 = *((_DWORD *)v13 - 2);
*((_DWORD *)v13 - 2) = v12 - 1;
}
if ( v12 <= 0 )
operator delete(v5);
}
if ( this->m_dashSpeed == 0.0 )
{
if ( this->m_endBoost == 0.0 )
goto LABEL_4;
}
else
{
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v20, 0x24Au);
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
m_dashSpeed = this->m_dashSpeed;
v14[1] = 32;
v14[0] = 0;
v14[2] = 0;
v14[3] = 0;
v14[4] = -1;
v15 = 0;
fmt::BasicWriter::FormatDouble(&v20, v14, m_dashSpeed);
if ( this->m_endBoost == 0.0 )
{
LABEL_4:
if ( !this->m_allowCollide )
goto LABEL_5;
goto LABEL_15;
}
}
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v20, 0x24Cu);
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
m_endBoost = this->m_endBoost;
v16[1] = 32;
v16[0] = 0;
v16[2] = 0;
v16[3] = 0;
v16[4] = -1;
v17 = 0;
fmt::BasicWriter::FormatDouble(&v20, v16, m_endBoost);
if ( !this->m_allowCollide )
{
LABEL_5:
if ( !this->m_stopSlide )
goto LABEL_6;
LABEL_16:
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v20, 0x24Du);
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v20, this->m_stopSlide);
if ( this->m_maxDuration == 0.0 )
goto LABEL_7;
goto LABEL_17;
}
LABEL_15:
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v20, 0x24Bu);
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v20, this->m_allowCollide);
if ( this->m_stopSlide )
goto LABEL_16;
LABEL_6:
if ( this->m_maxDuration == 0.0 )
goto LABEL_7;
LABEL_17:
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v20, 0x24Eu);
fmt::BasicWriter::operator<<(&v20, &byte_F804F8, 0);
m_maxDuration = this->m_maxDuration;
v18[1] = 32;
v18[0] = 0;
v18[2] = 0;
v18[3] = 0;
v18[4] = -1;
v19 = 0;
fmt::BasicWriter::FormatDouble(&v20, v18, m_maxDuration);
LABEL_7:
v6 = v20;
if ( v21 < v20 + 1 )
fmt::internal::Array::grow(&v20, v20 + 1);
v22[v6] = 0;
sub_D153B8(a3, v22);
if ( v22 != v23 && v22 )
operator delete[](v22);
return a3;
}