//
// DailyLevelPage::skipDailyLevel from 0x1400d1db0 to 0x1400d1fdb (555 bytes)
//
// 2 xrefs:
// > DailyLevelNode::FLAlert_Clicked @ 0x1400d3178
// > ??> @ 0x1406c85c8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=4
void DailyLevelPage::skipDailyLevel(DailyLevelPage *a1, DailyLevelNode *a2, GJGameLevel *a3)
{
float v3; // xmm3_4
int v6; // esi
_DWORD *v7; // r8
GJTimedLevelType m_type; // ecx
int v9; // ebx
__int32 v10; // ecx
int v11; // eax
GJTimedLevelType v12; // ecx
__int32 v13; // ecx
int v14; // esi
GJTimedLevelType v15; // ecx
__int32 v16; // ecx
GameLevelManager *v17; // rcx
__int64 v18; // rbx
struct cocos2d::CCDelayTime *v19; // rax
struct cocos2d::CCSequence *v20; // rax
cocos2d::ccColor3B *v21; // r8
float v22; // [rsp+20h] [rbp-8h]
void *v23; // [rsp+30h] [rbp+8h]
void *v24; // [rsp+30h] [rbp+8h]
void *v25; // [rsp+30h] [rbp+8h]
void *v26; // [rsp+30h] [rbp+8h]
if ( a2 == a1->m_dailyNode )
{
v6 = a3->m_dailyID.random - a3->m_dailyID.seed;
v7 = (_DWORD *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v23 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v23);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v7 = (_DWORD *)qword_1406C2EC0;
}
m_type = a1->m_type;
v9 = 0;
if ( m_type )
{
v10 = m_type - 1;
if ( v10 )
{
if ( v10 == 1 )
v11 = v7[120];
else
v11 = 0;
}
else
{
v11 = v7[117];
}
}
else
{
v11 = v7[114];
}
if ( v6 == v11 )
{
if ( !v7 )
{
v24 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v24);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v7 = (_DWORD *)qword_1406C2EC0;
}
v12 = a1->m_type;
if ( v12 )
{
v13 = v12 - 1;
if ( v13 )
{
if ( v13 == 1 )
v14 = v7[120];
else
v14 = 0;
}
else
{
v14 = v7[117];
}
}
else
{
v14 = v7[114];
}
if ( !v7 )
{
v25 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v25);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v7 = (_DWORD *)qword_1406C2EC0;
}
v15 = a1->m_type;
if ( v15 )
{
v16 = v15 - 1;
if ( v16 )
{
if ( v16 == 1 )
v9 = v7[119];
}
else
{
v9 = v7[116];
}
}
else
{
v9 = v7[113];
}
if ( v14 < v9 )
{
DailyLevelPage::exitDailyNode(a1, a2, 0.0);
a1->m_downloadStarted = 1;
v17 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v26 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280(v26);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v17 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::downloadLevel(v17, a1->m_downloadLevelID, 0, 0);
v18 = cocos2d::CCCallFunc::create(a1, DailyLevelPage::createNodeIfLoaded);
v19 = cocos2d::CCDelayTime::create(0.5);
v20 = cocos2d::CCSequence::create(v19, v18, 0);
cocos2d::CCNode::runAction((CCLightFlash *)a1, (cocos2d::CCPoint)v20, v21, v3, v22);
}
}
}
}