//
// GameLevelManager::getCompletedDailyLevels from 0x1402202d0 to 0x1402204d7 (519 bytes)
//
// 2 xrefs:
// > GameLevelManager::updateUserScore @ 0x140236ed0
// > ??> @ 0x14091bb60
//
// 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 11:28:24 +0000
//
// Hidden C++ exception states: #wind=2
__int64 __fastcall GameLevelManager::getCompletedDailyLevels(__int64 a1)
{
unsigned int v2; // esi
struct cocos2d::CCArray *v3; // rax
unsigned int *v4; // rdi
__int64 v5; // rax
cocos2d::CCString **v6; // rdi
cocos2d::CCString **i; // rbp
cocos2d::CCString *v8; // rbx
const char *CString; // rax
size_t v10; // r8
__int64 v11; // rax
_DWORD *v12; // rbx
void *v13; // rcx
__int64 v14; // rcx
void *v16; // [rsp+30h] [rbp-48h]
__int128 v17; // [rsp+38h] [rbp-40h] BYREF
__int64 v18; // [rsp+48h] [rbp-30h]
unsigned __int64 v19; // [rsp+50h] [rbp-28h]
v2 = 0;
v3 = cocos2d::CCDictionary::allKeys(*(cocos2d::CCDictionary **)(a1 + 944));
if ( v3 )
{
v4 = *((unsigned int **)v3 + 7);
v5 = *v4;
if ( (_DWORD)v5 )
{
v6 = *((cocos2d::CCString ***)v4 + 2);
for ( i = &v6[v5 - 1]; v6 <= i; ++v6 )
{
v8 = *v6;
if ( !*v6 )
break;
if ( (int)cocos2d::CCString::intValue(*v6) <= 100000 )
{
CString = cocos2d::CCString::getCString(v8);
v17 = 0;
v18 = 0;
v19 = 0;
v10 = -1;
do
++v10;
while ( CString[v10] );
sub_14003D230(&v17, CString, v10);
v11 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 944), &v17);
v12 = (_DWORD *)_RTDynamicCast(
v11,
0,
&cocos2d::CCObject `RTTI Type Descriptor',
&GJGameLevel `RTTI Type Descriptor',
0);
if ( v19 > 0xF )
{
v13 = (void *)v17;
if ( v19 + 1 >= 0x1000 )
{
v13 = *(void **)(v17 - 8);
if ( (unsigned __int64)(v17 - (_QWORD)v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v13);
}
v18 = 0;
v19 = 15;
LOBYTE(v17) = 0;
if ( v12 && v12[255] - v12[256] < 10 && v12[233] - v12[232] == 100 )
{
v14 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v16 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v16);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v14 = qword_14090BFE0;
}
if ( (unsigned __int8)GameStatsManager::hasCompletedLevel(v14, v12) )
++v2;
}
}
}
}
}
return v2;
}