//
// GJGameLevel::storeNewLocalScore from 0x4dc674 to 0x4dc742 (206 bytes)
//
// 1 xrefs:
// > GJGameLevel::saveNewScore @ 0x4dc814
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:50:57 +0000
//
char **__fastcall GJGameLevel::storeNewLocalScore(GJGameLevel *this, int a2, int a3)
{
unsigned __int8 *v4; // r4
char *i; // r3
int v7; // r0
int v8; // r0
int v9; // r1
int v10; // r2
int v12; // [sp+4h] [bp-28h] BYREF
char *v13; // [sp+Ch] [bp-20h] BYREF
char *v14; // [sp+10h] [bp-1Ch]
char *v15; // [sp+14h] [bp-18h]
int v16; // [sp+18h] [bp-14h] BYREF
int v17; // [sp+1Ch] [bp-10h]
int v18; // [sp+20h] [bp-Ch]
if ( a3 == 1 )
v4 = (unsigned __int8 *)this + 1112;
else
v4 = (unsigned __int8 *)this + 1100;
v12 = a2;
v13 = nullptr;
v14 = nullptr;
v15 = nullptr;
GJGameLevel::scoreStringToVector((int)this, v4, &v13);
for ( i = v13; i != v14; i += 4 )
{
v7 = *(_DWORD *)i;
if ( v7 == v12 )
return std::__vector_base::~__vector_base(&v13);
}
if ( i == v15 )
{
std::vector::__push_back_slow_path((int)&v13, &v12);
}
else
{
if ( i )
*(_DWORD *)i = v12;
v14 += 4;
}
GJGameLevel::scoreVectorToString(&v16, (int)this, (int *)&v13, a3);
if ( (*v4 & 1) != 0 )
{
**((_BYTE **)v4 + 2) = 0;
*((_DWORD *)v4 + 1) = 0;
}
else
{
v4[1] = 0;
*v4 = 0;
}
std::string::reserve((int *)v4, 0);
v8 = v16;
v9 = v17;
v10 = v18;
v16 = 0;
v17 = 0;
v18 = 0;
*(_DWORD *)v4 = v8;
*((_DWORD *)v4 + 1) = v9;
*((_DWORD *)v4 + 2) = v10;
std::string::~string((int)&v16);
return std::__vector_base::~__vector_base(&v13);
}