//
// SecretGame01Layer::gameStep01 from 0x10047ff40 to 0x100480208 (712 bytes)
//
// 1 xrefs:
// > SecretGame01Layer::resetGame @ 0x10047f6a7
//
// 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
//
void __fastcall SecretGame01Layer::gameStep01(SecretGame01Layer *a1)
{
__int64 v1; // rsi
SecretGame01Layer *v2; // r13
unsigned int v3; // eax
int v4; // ebx
__int64 v5; // r14
__m128 v6; // xmm0
__m128 v7; // xmm1
__int64 v8; // r15
__int64 v9; // r12
unsigned int v10; // r14d
__int64 v11; // rax
cocos2d::CCNode *v12; // r12
__int64 v13; // rax
cocos2d::CCDelayTime *v14; // r13
cocos2d::CCTintTo *v15; // rbx
cocos2d::CCDelayTime *v16; // r15
cocos2d::CCTintTo *v17; // rax
cocos2d::CCFiniteTimeAction *v18; // rdi
cocos2d::CCSequence *v19; // rax
cocos2d::CCDelayTime *v20; // rbx
cocos2d::CCTintTo *v21; // r15
cocos2d::CCDelayTime *v22; // r12
cocos2d::CCTintTo *v23; // rax
cocos2d::CCSequence *v24; // rax
float v25; // xmm0_4
cocos2d::CCDelayTime *v26; // r14
cocos2d::CCCallFunc *v27; // rax
cocos2d::CCSequence *v28; // rax
cocos2d::CCNode *v29; // [rsp+0h] [rbp-40h]
float v31; // [rsp+14h] [rbp-2Ch]
float v32; // [rsp+14h] [rbp-2Ch]
v2 = a1;
v3 = a1->m_gameDifficulty - 1;
v4 = 2;
if ( v3 <= 0xB )
v4 = dword_10081CA00[v3];
v5 = sub_10071F9E0(a1, v1);
sub_100720050(v5, a1->m_gameObjects);
sub_100720270(a1->m_requiredObjects);
do
{
v31 = (float)rand() * 4.6566129e-10;
v6 = 0;
v6.f32[0] = (float)(int)(sub_100720070(v5) - 1) * v31;
v7 = _mm_or_ps(_mm_and_ps(v6, (__m128)xmmword_1008150B0), (__m128)xmmword_1008150C0);
v7.f32[0] = v7.f32[0] + v6.f32[0];
v8 = (unsigned int)(int)_mm_round_ss((__m128)0LL, v7, 11).f32[0];
v9 = sub_1007200C0(v5, v8);
sub_100720230(v5, (unsigned int)v8, 1);
sub_10071FCD0(a1->m_requiredObjects, v9);
--v4;
}
while ( v4 );
if ( (unsigned int)sub_100720070(a1->m_requiredObjects) )
{
v10 = 0;
do
{
v11 = sub_1007200C0(v2->m_requiredObjects, v10);
v12 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 1056LL))(v11);
v13 = ((__int64 (__fastcall *)(cocos2d::CCNode *))v12->getChildren)(v12);
v29 = (cocos2d::CCNode *)sub_1007200C0(v13, 0);
v32 = (float)(int)v10 * 0.2;
v14 = cocos2d::CCDelayTime::create(v32);
v15 = cocos2d::CCTintTo::create(0.1, 0, 0xFFu, 0);
v16 = cocos2d::CCDelayTime::create(0.1);
v17 = cocos2d::CCTintTo::create(0.2, 0x4Bu, 0x4Bu, 0x4Bu);
v18 = v14;
v2 = a1;
v19 = sub_1003B5760(v18, v15, v16, v17, 0);
cocos2d::CCNode::runAction(v12, v19);
v20 = cocos2d::CCDelayTime::create(v32);
v21 = cocos2d::CCTintTo::create(0.1, 0, 0xFFu, 0);
v22 = cocos2d::CCDelayTime::create(0.1);
v23 = cocos2d::CCTintTo::create(0.2, 0x3Cu, 0x3Cu, 0x3Cu);
v24 = sub_1003B5760(v20, v21, v22, v23, 0);
cocos2d::CCNode::runAction(v29, v24);
++v10;
}
while ( v10 < (unsigned int)sub_100720070(a1->m_requiredObjects) );
v25 = (float)((float)(v32 + 0.1) + 0.2) + 0.2;
}
else
{
v25 = 0.0;
}
v26 = cocos2d::CCDelayTime::create(v25);
v27 = cocos2d::CCCallFunc::create(v2, (cocos2d::SEL_CallFunc)(unsigned __int64)SecretGame01Layer::gameStep02);
v28 = sub_1003B5760(v26, v27, 0);
cocos2d::CCNode::runAction(v2, v28);
}