//
// SecretGame01Layer::scaleOutGame from 0x6e2fd0 to 0x6e3162 (402 bytes)
//
// 2 xrefs:
// > SecretGame01Layer::showGameOver @ 0x6e3182
// > SecretGame01Layer::showGameWon @ 0x6e3258
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:57:22 +0000
//
int __fastcall SecretGame01Layer::scaleOutGame(SecretGame01Layer *this, int a2)
{
int v3; // r0
char *v4; // r3
unsigned int v5; // r5
int v6; // r11
unsigned __int8 v7; // r9
float v8; // r1
int v9; // r0
int v10; // r10
int v11; // r3
cocos2d::CCSequence *v12; // r6
cocos2d::CCFiniteTimeAction *v13; // r0
cocos2d::CCAction *v14; // r0
_DWORD *v16; // r2
int *v17; // r5
int v18; // r6
int v19; // t1
int v20; // r7
cocos2d::CCNode *v21; // r8
cocos2d::CCArray *v22; // r0
int v23; // r0
unsigned __int8 v24; // r2
unsigned __int8 v25; // r3
int v26; // r1
float v27; // r1
float v28; // r1
int v29; // r0
cocos2d::CCAction *v30; // r0
float v31; // r1
cocos2d::CCSequence *v32; // r6
float v33; // r2
cocos2d::CCEaseInOut *v34; // r0
float v35; // r2
cocos2d::CCFiniteTimeAction *v36; // r0
cocos2d::CCAction *v37; // r0
unsigned __int8 v38; // [sp+0h] [bp-2Ch]
unsigned __int8 v39; // [sp+4h] [bp-28h]
int *v41; // [sp+Ch] [bp-20h]
cocos2d::CCNode *v42; // [sp+10h] [bp-1Ch]
cocos2d::CCNode *v43; // [sp+14h] [bp-18h]
cocos2d::CCFiniteTimeAction *v44; // [sp+18h] [bp-14h]
cocos2d::CCSequence *v45; // [sp+1Ch] [bp-10h]
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 87) + 172))(*((_DWORD *)this + 87), 0);
v3 = *((_DWORD *)this + 81);
*((_BYTE *)this + 336) = 0;
(*(void (__fastcall **)(int))(*(_DWORD *)v3 + 500))(v3);
if ( a2 )
v4 = &byte_BF007D;
else
v4 = &byte_BF0080;
v5 = *((_DWORD *)this + 82);
v6 = (unsigned __int8)*v4;
v39 = v4[1];
v7 = v4[2];
if ( v5 > cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 80)) - 1 )
{
v10 = -1;
}
else
{
v9 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 80), *((_DWORD *)this + 82));
v10 = (*(int (__fastcall **)(int))(*(_DWORD *)v9 + 32))(v9);
}
v11 = *((_DWORD *)this + 79);
if ( v11 )
{
v16 = *(_DWORD **)(v11 + 52);
if ( *v16 )
{
v17 = (int *)v16[3];
v41 = &v17[*v16 - 1];
while ( v17 <= v41 )
{
v19 = *v17++;
v18 = v19;
if ( !v19 )
break;
v20 = 0;
v21 = (cocos2d::CCNode *)(*(int (__fastcall **)(int))(*(_DWORD *)v18 + 536))(v18);
v42 = v21;
v22 = (cocos2d::CCArray *)(*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v21 + 244))(v21);
v43 = (cocos2d::CCNode *)cocos2d::CCArray::objectAtIndex(v22, 0);
while ( 1 )
{
if ( a2 )
{
v24 = v39;
if ( v20 == 1 )
{
v25 = 0;
v24 = -1;
}
else
{
v25 = v7;
}
v26 = v20 == 1 ? 150 : v6;
}
else
{
v23 = (*(int (__fastcall **)(int))(*(_DWORD *)v18 + 32))(v18);
v24 = v39;
if ( v23 == v10 )
{
v25 = 0;
v24 = -81;
}
else
{
v25 = v7;
}
v26 = v23 == v10 ? 255 : v6;
}
v45 = (cocos2d::CCSequence *)cocos2d::CCTintTo::create(
(cocos2d::CCTintTo *)0x3DCCCCCD,
*(float *)&v26,
v24,
v25,
v38);
v44 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3E4CCCCD, v27);
v29 = cocos2d::CCFadeOut::create((cocos2d::CCFadeOut *)0x3F000000, v28);
v30 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v45, v44, v29, 0);
cocos2d::CCNode::runAction(v21, v30);
if ( v20 )
break;
v21 = v43;
v20 = 1;
}
v32 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3E99999A, v31);
v34 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3F000000, 0.1, v33);
v36 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(
v34,
(cocos2d::CCActionInterval *)0x40000000,
v35);
v37 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v32, v36, 0);
cocos2d::CCNode::runAction(v42, v37);
}
}
}
v12 = (cocos2d::CCSequence *)cocos2d::CCDelayTime::create((cocos2d::CCDelayTime *)0x3F800000, v8);
v13 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(this, SecretGame01Layer::resetGame, 0);
v14 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v12, v13, 0);
return cocos2d::CCNode::runAction(this, v14);
}