//
// DailyLevelPage::dailyStatusFailed from 0x140170b90 to 0x140170dfe (622 bytes)
//
// 2 xrefs:
// > ??> @ 0x140745ae0
// > ??> @ 0x140918308
//
// 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:27:31 +0000
//
// Hidden C++ exception states: #wind=2
struct cocos2d::CCAction *__fastcall DailyLevelPage::dailyStatusFailed(__int64 a1, __int64 a2, int a3)
{
int v4; // r9d
__int64 v5; // rax
__int64 DialogLayer; // rsi
__int64 v7; // rcx
__int64 v8; // rax
__int64 v9; // rdi
__int64 v10; // rbx
__int64 v11; // rax
struct cocos2d::CCAction *result; // rax
__int64 v13; // rbx
struct cocos2d::CCFiniteTimeAction *v14; // rax
struct cocos2d::CCAction *v15; // rax
_BYTE v16[8]; // [rsp+30h] [rbp-50h] BYREF
__int128 v17; // [rsp+38h] [rbp-48h] BYREF
__int64 v18; // [rsp+48h] [rbp-38h]
__int64 v19; // [rsp+50h] [rbp-30h]
char v20[14]; // [rsp+58h] [rbp-28h] BYREF
__int16 v21; // [rsp+66h] [rbp-1Ah]
__int64 v22; // [rsp+68h] [rbp-18h]
__int64 v23; // [rsp+70h] [rbp-10h]
__int16 v24; // [rsp+B0h] [rbp+30h] BYREF
char v25; // [rsp+B2h] [rbp+32h]
__int128 *v26; // [rsp+B8h] [rbp+38h] BYREF
if ( a3 == 3 )
{
*(_BYTE *)(a1 + 40) = 1;
v26 = &v17;
v24 = -1;
v25 = -1;
v17 = 0;
v18 = 0;
v19 = 0;
*(_QWORD *)&v17 = sub_14003D460(0x50u);
v18 = 78;
v19 = 79;
strcpy((char *)v17, "Please update your application to download this level.");
v22 = 12;
v23 = 15;
strcpy(v20, "The Mechanic");
v20[13] = 0;
v21 = 0;
v5 = DialogObject::create((unsigned int)v20, (unsigned int)&v17, 37, v4, 0, (__int64)&v24);
DialogLayer = DialogLayer::createDialogLayer(v5, 0, 4);
DialogLayer::addToMainScene(DialogLayer);
v8 = cocos2d::CCDirector::sharedDirector(v7);
cocos2d::CCDirector::getWinSize(v8, &v26);
v9 = **(_QWORD **)(DialogLayer + 560);
v10 = *(_QWORD *)(DialogLayer + 560);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v16, *(float *)&v26 * 0.5, *((float *)&v26 + 1) * 0.5);
(*(void (__fastcall **)(__int64, __int64))(v9 + 184))(v10, v11);
result = (struct cocos2d::CCAction *)DialogLayer::animateIn(DialogLayer, 1);
}
else
{
result = (struct cocos2d::CCAction *)qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v26 = (__int128 *)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v26);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
result = (struct cocos2d::CCAction *)qword_14090BFE0;
}
if ( *((double *)result + 71) <= 0.0 )
{
v13 = cocos2d::CCCallFunc::create(a1 - 672, DailyLevelPage::tryGetDailyStatus);
v14 = cocos2d::CCDelayTime::create(5.0);
v15 = cocos2d::CCSequence::create(v14, v13, 0);
result = cocos2d::CCNode::runAction((cocos2d::CCNode *)(a1 - 672), v15);
}
}
if ( *(_BYTE *)(a1 + 40) )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 24) + 336LL))(*(_QWORD *)(a1 + 24), 0);
return (struct cocos2d::CCAction *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 32) + 336LL))(
*(_QWORD *)(a1 + 32),
0);
}
return result;
}