//
// RotateGameplayGameObject::getSaveString from 0x7894a4 to 0x789b18 (1652 bytes)
//
// 2 xrefs:
// > ??> @ 0xb4f00
// > ??> @ 0x1176bb0
//
// 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 RotateGameplayGameObject::getSaveString@(
RotateGameplayGameObject *this@,
GJBaseGameLayer *a2@,
__int64 a3@)
{
char *v5; // x0
size_t v6; // x20
double m_velocityModX; // d0
double m_velocityModY; // d0
unsigned int *v10; // x2
int v11; // w1
const char *v12; // [xsp+E0h] [xbp+E0h] BYREF
_DWORD v13[5]; // [xsp+E8h] [xbp+E8h] BYREF
char v14; // [xsp+FCh] [xbp+FCh]
_DWORD v15[5]; // [xsp+100h] [xbp+100h] BYREF
char v16; // [xsp+114h] [xbp+114h]
size_t v17; // [xsp+118h] [xbp+118h] BYREF
unsigned __int64 v18; // [xsp+120h] [xbp+120h]
char *v19; // [xsp+128h] [xbp+128h]
_BYTE v20[504]; // [xsp+130h] [xbp+130h] BYREF
v17 = 0;
v18 = 500;
v19 = v20;
EffectGameObject::getSaveString(this, a2, (__int64)&v12);
fmt::BasicWriter::operator<<(&v17, v12, *((_QWORD *)v12 - 3));
v5 = (char *)(v12 - 24);
if ( v12 - 24 != (const char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v10 = (unsigned int *)(v12 - 8);
do
v11 = __ldaxr(v10);
while ( __stlxr(v11 - 1, v10) );
}
else
{
v11 = *((_DWORD *)v12 - 2);
*((_DWORD *)v12 - 2) = v11 - 1;
}
if ( v11 <= 0 )
operator delete(v5);
}
if ( this->m_editVelocity )
{
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xA9u);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
this->m_editVelocity);
if ( !this->m_overrideVelocity )
{
LABEL_4:
if ( this->m_velocityModX == 0.0 )
goto LABEL_5;
goto LABEL_21;
}
}
else if ( !this->m_overrideVelocity )
{
goto LABEL_4;
}
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0x248u);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
this->m_overrideVelocity);
if ( this->m_velocityModX == 0.0 )
{
LABEL_5:
if ( this->m_velocityModY == 0.0 )
goto LABEL_6;
goto LABEL_22;
}
LABEL_21:
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0x246u);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
m_velocityModX = this->m_velocityModX;
v13[1] = 32;
v13[0] = 0;
v13[2] = 0;
v13[3] = 0;
v13[4] = -1;
v14 = 0;
fmt::BasicWriter::FormatDouble(&v17, v13, m_velocityModX);
if ( this->m_velocityModY == 0.0 )
{
LABEL_6:
if ( !this->m_moveDirection )
goto LABEL_7;
goto LABEL_23;
}
LABEL_22:
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0x247u);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
m_velocityModY = this->m_velocityModY;
v15[1] = 32;
v15[0] = 0;
v15[2] = 0;
v15[3] = 0;
v15[4] = -1;
v16 = 0;
fmt::BasicWriter::FormatDouble(&v17, v15, m_velocityModY);
if ( !this->m_moveDirection )
{
LABEL_7:
if ( !this->m_groundDirection )
goto LABEL_8;
goto LABEL_24;
}
LABEL_23:
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xA6u);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
this->m_moveDirection);
if ( !this->m_groundDirection )
{
LABEL_8:
if ( !this->m_changeChannel )
goto LABEL_9;
goto LABEL_25;
}
LABEL_24:
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xA7u);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
this->m_groundDirection);
if ( !this->m_changeChannel )
{
LABEL_9:
if ( !this->m_channelOnly )
goto LABEL_10;
goto LABEL_26;
}
LABEL_25:
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xABu);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
this->m_changeChannel);
if ( !this->m_channelOnly )
{
LABEL_10:
if ( !this->m_targetChannelID )
goto LABEL_11;
goto LABEL_27;
}
LABEL_26:
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xACu);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, this->m_channelOnly);
if ( !this->m_targetChannelID )
{
LABEL_11:
if ( !this->m_instantOffset )
goto LABEL_12;
LABEL_28:
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0x170u);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
this->m_instantOffset);
if ( !this->m_dontSlide )
goto LABEL_13;
goto LABEL_29;
}
LABEL_27:
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xADu);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
this->m_targetChannelID);
if ( this->m_instantOffset )
goto LABEL_28;
LABEL_12:
if ( !this->m_dontSlide )
goto LABEL_13;
LABEL_29:
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0x249u);
fmt::BasicWriter::operator<<(&v17, &byte_F804F8, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, this->m_dontSlide);
LABEL_13:
v6 = v17;
if ( v18 < v17 + 1 )
fmt::internal::Array::grow(&v17, v17 + 1);
v19[v6] = 0;
sub_D153B8(a3, v19);
if ( v19 != v20 && v19 )
operator delete[](v19);
return a3;
}