//
// DailyLevelPage::levelDownloadFinished from 0x100216470 to 0x10021651b (171 bytes)
//
// 2 xrefs:
// > sub_100216520 @ 0x10021652c
// > ??> @ 0x100ae6608
//
// 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:27:00 +0000
//
_QWORD *__fastcall DailyLevelPage::levelDownloadFinished(__int64 a1, __int64 a2, double a3)
{
int v3; // r15d
bool v4; // cc
int v5; // r15d
__int64 v6; // rax
int v7; // r15d
__int64 v8; // rax
_QWORD *result; // rax
if ( a2 )
{
v3 = *(_DWORD *)(a2 + 920);
v4 = v3 <= *(_DWORD *)(a2 + 924);
v5 = v3 - *(_DWORD *)(a2 + 924);
if ( !v4 )
{
v6 = GameLevelManager::sharedState(a3);
if ( v5 == (unsigned int)GameLevelManager::getDailyID(v6, *(unsigned int *)(a1 + 732))
|| (v7 = *(_DWORD *)(a2 + 920) - *(_DWORD *)(a2 + 924),
v8 = GameLevelManager::sharedState(a3),
result = (_QWORD *)GameLevelManager::getActiveDailyID(v8, *(unsigned int *)(a1 + 732)),
v7 == (_DWORD)result) )
{
result = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 704) + 344LL))(
*(_QWORD *)(a1 + 704),
0);
if ( !*(_BYTE *)(a1 + 728) )
return DailyLevelPage::createDailyNode(a1, a2, 0, 1u, 0.0);
}
}
}
return result;
}