//
// GameStatsManager::isSecretCoinValid from 0x51df74 to 0x51e0ae (314 bytes)
//
// 1 xrefs:
// > GameStatsManager::dataLoaded @ 0x529d46
//
// 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:51:50 +0000
//
bool __fastcall GameStatsManager::isSecretCoinValid(int a1, unsigned __int8 *a2)
{
int v2; // r4
int v3; // r3
unsigned __int8 *v4; // r4
_BOOL4 v5; // r4
unsigned __int8 *v6; // r4
unsigned __int8 *v7; // r4
const char *v8; // r0
int v9; // r7
const char *v10; // r0
int v11; // r0
int v13; // [sp+4h] [bp-38h] BYREF
int v14; // [sp+8h] [bp-34h]
int v15; // [sp+Ch] [bp-30h]
int v16[3]; // [sp+10h] [bp-2Ch] BYREF
int v17[3]; // [sp+1Ch] [bp-20h] BYREF
int v18[3]; // [sp+28h] [bp-14h] BYREF
v13 = 0;
v14 = 0;
v15 = 0;
sub_51DD24(a2, "_", &v13);
v2 = v13;
v3 = -1431655765 * ((v14 - v13) >> 2);
if ( v3 != 2 )
{
if ( v3 == 3 )
{
if ( (byte_9[v13 + 3] & 1) != 0 )
v8 = *(const char **)((char *)&dword_14 + v13);
else
v8 = (const char *)(v13 + 13);
v9 = atoi(v8);
if ( (*((_BYTE *)&dword_18 + v2) & 1) != 0 )
v10 = *(const char **)((char *)&dword_20 + v2);
else
v10 = (const char *)(v2 + 25);
v11 = atoi(v10);
if ( v9 <= 22 )
{
if ( v9 > 0 )
goto LABEL_16;
}
else if ( (unsigned int)(v9 - 5001) <= 3 )
{
LABEL_16:
v5 = (unsigned int)(v11 - 1) <= 2;
goto LABEL_19;
}
}
v5 = 0;
goto LABEL_19;
}
v4 = (unsigned __int8 *)(v13 + 12);
memset(v16, 0, sizeof(v16));
std::string::__init(v16, "secret04", 8u);
v5 = sub_515F68(v4, (unsigned __int8 *)v16);
if ( !v5 )
{
memset(v17, 0, sizeof(v17));
v6 = (unsigned __int8 *)(v13 + 12);
std::string::__init(v17, "secret06", 8u);
v5 = sub_515F68(v6, (unsigned __int8 *)v17);
if ( !v5 )
{
memset(v18, 0, sizeof(v18));
v7 = (unsigned __int8 *)(v13 + 12);
std::string::__init(v18, "secretB03", 9u);
v5 = sub_515F68(v7, (unsigned __int8 *)v18);
std::string::~string((int)v18);
}
std::string::~string((int)v17);
}
std::string::~string((int)v16);
LABEL_19:
std::__vector_base::~__vector_base((int)&v13);
return v5;
}