//
// DailyLevelPage::createDailyNode from 0x100215be0 to 0x100215dcd (493 bytes)
//
// 5 xrefs:
// > DailyLevelPage::init @ 0x1002152de
// > DailyLevelPage::levelDownloadFinished @ 0x100216516
// > DailyLevelPage::createNodeIfLoaded @ 0x1002165f6
// > DailyLevelPage::claimLevelReward @ 0x100216b4b
// > DailyLevelPage::refreshDailyPage @ 0x100216cc7
//
// 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:26:59 +0000
//
_QWORD *__fastcall DailyLevelPage::createDailyNode(__int64 a1, __int64 a2, char a3, unsigned __int8 a4, float a5)
{
_QWORD *v5; // r14
__int64 v9; // rax
double v10; // xmm0_8
__int64 v11; // rax
__int64 v12; // rdi
__int64 v13; // rax
__int64 v14; // rsi
__int64 v15; // rax
float v16; // xmm0_4
int v17; // r12d
int v18; // r13d
__int64 v19; // rax
int v20; // eax
int v21; // r8d
int v22; // r9d
__int64 v23; // rax
_BYTE v25[8]; // [rsp+Ch] [rbp-44h] BYREF
float v26[2]; // [rsp+14h] [rbp-3Ch] BYREF
_BYTE v27[4]; // [rsp+1Ch] [rbp-34h] BYREF
float v28; // [rsp+20h] [rbp-30h]
float v29; // [rsp+24h] [rbp-2Ch]
if ( *(_QWORD *)(a1 + 720) )
return nullptr;
v29 = a5;
v9 = cocos2d::CCDirector::sharedDirector(a1, a2);
cocos2d::CCDirector::getWinSize(v26, v9);
v5 = (_QWORD *)DailyLevelNode::create(a2, a1, a4);
(*(void (__fastcall **)(_QWORD, _QWORD *))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v5);
*(_QWORD *)&v10 = LODWORD(v26[0]);
*(float *)&v10 = v26[0] * 0.5;
sub_100278250(v27, v26[0] * 0.5, (float)(0.5 * v26[1]) + -8.0);
(*(void (__fastcall **)(_QWORD *, _BYTE *))(*v5 + 184LL))(v5, v27);
if ( a2 )
{
v11 = GameLevelManager::sharedState(v10);
if ( (int)GameLevelManager::getDailyID(v11, *(unsigned int *)(a1 + 732)) > *(_DWORD *)(a2 + 920)
- *(_DWORD *)(a2 + 924) )
{
v12 = v5[45];
if ( v12 )
{
v13 = v5[41];
if ( !v13 || *(_DWORD *)(v13 + 864) - *(_DWORD *)(v13 + 868) <= 99 )
{
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v12 + 344LL))(v12, 1);
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v5[45] + 1272LL))(v5[45], 1);
}
}
}
}
if ( !a3 )
{
(*(void (__fastcall **)(_QWORD *, _QWORD))(*v5 + 344LL))(v5, 0);
v14 = (*(__int64 (__fastcall **)(_QWORD *))(*v5 + 192LL))(v5);
sub_1002782D0(v27, v14);
v15 = cocos2d::CCDirector::sharedDirector(v27, v14);
v16 = sub_100479770(v15);
sub_100278250(v25, v16 + 180.0, v28);
(*(void (__fastcall **)(_QWORD *, _BYTE *))(*v5 + 184LL))(v5, v25);
v17 = cocos2d::CCDelayTime::create(v29);
v18 = cocos2d::CCShow::create();
v19 = cocos2d::CCMoveTo::create(v27, 0.5);
v20 = cocos2d::CCEaseElasticOut::create(v19, 0.60000002);
v23 = sub_10039EB60(v17, v18, v20, 0, v21, v22);
cocos2d::CCNode::runAction(v5, v23);
}
*(_QWORD *)(a1 + 720) = v5;
return v5;
}