//
// GradientTriggerObject::getSaveString from 0x8a4560 to 0x8a4b8c (1580 bytes)
//
// 2 xrefs:
// > ??> @ 0xbed68
// > ??> @ 0x1444970
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:56:18 +0000
//
__int64 *__usercall GradientTriggerObject::getSaveString@(
GradientTriggerObject *this@,
GJBaseGameLayer *a2@,
__int64 *a3@)
{
const char *v5; // x1
size_t v6; // x2
size_t v7; // x20
const char *v8; // x1
size_t v9; // x0
double v11; // d0
char *v12; // [xsp+48h] [xbp+48h]
__int64 v13[2]; // [xsp+F8h] [xbp+F8h] BYREF
char *v14; // [xsp+108h] [xbp+108h]
_DWORD v15[5]; // [xsp+110h] [xbp+110h] BYREF
char v16; // [xsp+124h] [xbp+124h]
size_t v17; // [xsp+128h] [xbp+128h] BYREF
unsigned __int64 v18; // [xsp+130h] [xbp+130h]
char *v19; // [xsp+138h] [xbp+138h]
_BYTE v20[504]; // [xsp+140h] [xbp+140h] BYREF
v17 = 0;
v18 = 500;
v19 = v20;
EffectGameObject::getSaveString(this, a2, v13);
if ( (v13[0] & 1) != 0 )
{
v5 = v14;
v6 = v13[1];
}
else
{
v5 = (char *)v13 + 1;
v6 = LOBYTE(v13[0]) >> 1;
}
fmt::BasicWriter::operator<<(&v17, v5, v6);
if ( (v13[0] & 1) != 0 )
{
operator delete(v14);
if ( !*((_DWORD *)this + 461) )
{
LABEL_5:
if ( !*((_DWORD *)this + 460) )
goto LABEL_6;
goto LABEL_24;
}
}
else if ( !*((_DWORD *)this + 461) )
{
goto LABEL_5;
}
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xAEu);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((_DWORD *)this + 461));
if ( !*((_DWORD *)this + 460) )
{
LABEL_6:
if ( !*((_DWORD *)this + 463) )
goto LABEL_7;
goto LABEL_25;
}
LABEL_24:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xCAu);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((_DWORD *)this + 460));
if ( !*((_DWORD *)this + 463) )
{
LABEL_7:
if ( !*((_DWORD *)this + 464) )
goto LABEL_8;
goto LABEL_26;
}
LABEL_25:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xCBu);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((_DWORD *)this + 463));
if ( !*((_DWORD *)this + 464) )
{
LABEL_8:
if ( !*((_DWORD *)this + 465) )
goto LABEL_9;
goto LABEL_27;
}
LABEL_26:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xCCu);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((_DWORD *)this + 464));
if ( !*((_DWORD *)this + 465) )
{
LABEL_9:
if ( !*((_DWORD *)this + 466) )
goto LABEL_10;
goto LABEL_28;
}
LABEL_27:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xCDu);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((_DWORD *)this + 465));
if ( !*((_DWORD *)this + 466) )
{
LABEL_10:
if ( !*((_BYTE *)this + 1868) )
goto LABEL_11;
goto LABEL_29;
}
LABEL_28:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xCEu);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((_DWORD *)this + 466));
if ( !*((_BYTE *)this + 1868) )
{
LABEL_11:
if ( !*((_BYTE *)this + 1869) )
goto LABEL_12;
goto LABEL_30;
}
LABEL_29:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xCFu);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((unsigned __int8 *)this + 1868));
if ( !*((_BYTE *)this + 1869) )
{
LABEL_12:
if ( !*((_BYTE *)this + 1870) )
goto LABEL_13;
goto LABEL_31;
}
LABEL_30:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xD0u);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((unsigned __int8 *)this + 1869));
if ( !*((_BYTE *)this + 1870) )
{
LABEL_13:
if ( !*((_DWORD *)this + 462) )
goto LABEL_14;
LABEL_32:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0xD1u);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((_DWORD *)this + 462));
if ( *((float *)this + 468) == 0.0 )
goto LABEL_15;
goto LABEL_33;
}
LABEL_31:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0x1FCu);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(
&v17,
*((unsigned __int8 *)this + 1870));
if ( *((_DWORD *)this + 462) )
goto LABEL_32;
LABEL_14:
if ( *((float *)this + 468) == 0.0 )
goto LABEL_15;
LABEL_33:
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
fmt::BasicWriter::FormatInt,char>>(&v17, 0x1C8u);
fmt::BasicWriter::operator<<(&v17, &byte_1169BE0, 0);
v11 = *((float *)this + 468);
v15[1] = 32;
v15[0] = 0;
v15[2] = 0;
v15[3] = 0;
v15[4] = -1;
v16 = 0;
fmt::BasicWriter::FormatDouble(&v17, v15, v11);
LABEL_15:
v7 = v17;
if ( v18 < v17 + 1 )
fmt::internal::Array::grow(&v17, v17 + 1);
v19[v7] = 0;
*a3 = 0;
v8 = v19;
a3[1] = 0;
a3[2] = 0;
v12 = (char *)v8;
v9 = strlen(v8);
std::string::__init(a3, v12, v9);
if ( v19 != v20 && v19 )
operator delete[](v19);
return a3;
}