//
// GameStatsManager::hasCompletedStarLevel from 0x100033220 to 0x100033342 (290 bytes)
//
// 5 xrefs:
// > GameStatsManager::completedStarLevel @ 0x100033657
// > PlayLayer::levelComplete @ 0x100081418
// > LevelCell::loadCustomLevelCell @ 0x100238cab
// > LevelInfoLayer::updateLabelValues @ 0x1002afdca
// > LevelPage::updateDynamicPage @ 0x1004211ef
//
// This function is hookable on this platform (idp: pc, 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:19:31 +0000
//
bool __fastcall GameStatsManager::hasCompletedStarLevel(__int64 a1, __int64 a2)
{
__int64 v2; // rbx
__int64 v3; // rax
char *v4; // rdi
const char *CString; // r15
size_t v6; // rax
size_t v7; // r14
char *v8; // r12
size_t v9; // r13
__int64 v10; // rbx
_QWORD __dst[2]; // [rsp+0h] [rbp-40h] BYREF
void *__p; // [rsp+10h] [rbp-30h]
v2 = *(_QWORD *)(a1 + 608);
if ( *(_DWORD *)(a2 + 920) <= *(_DWORD *)(a2 + 924) )
{
if ( *(_BYTE *)(a2 + 649) == 1 )
v4 = "gstar_%i";
else
v4 = "star_%i";
v3 = sub_10088E820(v4, __dst[0]);
}
else
{
v3 = sub_10088E820("%s%i", __dst[0]);
}
CString = (const char *)cocos2d::CCString::getCString(v3);
v6 = strlen(CString);
if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v7 = v6;
if ( v6 >= 0x17 )
{
v9 = 26;
if ( (v6 | 7) != 0x17 )
v9 = (v6 | 7) + 1;
v8 = (char *)operator new(v9);
__p = v8;
__dst[0] = v9 + 1;
__dst[1] = v7;
goto LABEL_14;
}
LOBYTE(__dst[0]) = 2 * v6;
v8 = (char *)__dst + 1;
if ( v6 )
LABEL_14:
memmove(v8, CString, v7);
v8[v7] = 0;
v10 = cocos2d::CCDictionary::objectForKey(v2, __dst);
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
return v10 != 0;
}