//
// GJGameLevel::levelWasAltered from 0x83c764 to 0x83c95c (504 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::saveLevel @ 0x7a7c00
// > ??> @ 0x88f78
//
// 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:55:14 +0000
//
__int64 __fastcall GJGameLevel::levelWasAltered(GJGameLevel *this)
{
int v2; // w1
int v3; // w0
int v5; // w0
int v6; // w0
int v7; // w0
int v8; // w0
int v9; // w0
int v10; // w0
int v11; // w0
int v12; // w3
char *v13; // x1
size_t v14; // x2
__int64 v15; // [xsp+40h] [xbp+40h] BYREF
size_t v16; // [xsp+48h] [xbp+48h]
void *v17; // [xsp+50h] [xbp+50h]
*((_BYTE *)this + 786) = 1;
*((_BYTE *)this + 784) = 0;
v2 = (int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);
*((_DWORD *)this + 195) = v2;
*((_DWORD *)this + 194) = v2;
GJGameLevel::unverifyCoins(this);
std::string::assign((__int64 *)this + 147, &byte_11B8890, 0);
*((_DWORD *)this + 324) = 0;
*((_DWORD *)this + 334) = 0;
*((_BYTE *)this + 1432) = 0;
*((_BYTE *)this + 1433) = 0;
GJGameLevel::clearPlatformerSave(this);
if ( *((_DWORD *)this + 285) == 2 )
{
GJGameLevel::setNormalPercent(this, 0);
*((_DWORD *)this + 222) = 0;
*((_DWORD *)this + 218) = 0;
v5 = rand();
*((_DWORD *)this + 221) = 0;
v6 = (int)(float)((float)((float)v5 * 4.6566e-10) * 1000.0);
*((_DWORD *)this + 217) = v6;
*((_DWORD *)this + 216) = v6;
v7 = rand();
*((_DWORD *)this + 207) = 0;
v8 = (int)(float)((float)((float)v7 * 4.6566e-10) * 1000.0);
*((_DWORD *)this + 220) = v8;
*((_DWORD *)this + 219) = v8;
v9 = rand();
*((_DWORD *)this + 210) = 0;
v10 = (int)(float)((float)((float)v9 * 4.6566e-10) * 1000.0);
*((_DWORD *)this + 206) = v10;
*((_DWORD *)this + 205) = v10;
v11 = rand();
v15 = 0;
v16 = 0;
v17 = nullptr;
v12 = (int)(float)((float)((float)v11 * 4.6566e-10) * 1000.0);
*((_DWORD *)this + 209) = v12;
*((_DWORD *)this + 208) = v12;
std::string::__init(&v15, &byte_11B8890, 0);
if ( (__int64 *)((char *)this + 1208) != &v15 )
{
if ( (v15 & 1) != 0 )
{
v13 = (char *)v17;
v14 = v16;
}
else
{
v14 = (unsigned __int8)v15 >> 1;
v13 = (char *)&v15 + 1;
}
std::string::assign((__int64 *)this + 151, v13, v14);
}
if ( (v15 & 1) != 0 )
operator delete(v17);
*((_DWORD *)this + 211) = 0;
}
if ( *((_BYTE *)this + 785) )
{
v3 = *((_DWORD *)this + 197);
*((_BYTE *)this + 785) = 0;
*((_DWORD *)this + 197) = v3 + 1;
}
return _stack_chk_guard;
}