//
// MenuGameLayer::tryJump from 0x140470570 to 0x140470854 (740 bytes)
//
// 5 xrefs:
// > MenuGameLayer::init @ 0x14047006f
// > ??> @ 0x1408ce620
// > ??> @ 0x1408ce634
// > ??> @ 0x14092816c
// > ??> @ 0x140928178
//
// 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:32:38 +0000
//
int __fastcall MenuGameLayer::tryJump(__int64 a1)
{
__int64 v2; // rax
float v3; // xmm6_4
_BYTE *v4; // rcx
__int64 v5; // rbx
__int64 v6; // rcx
cocos2d::CCDirector *v7; // rax
__int64 v8; // rbx
__int64 v9; // rcx
cocos2d::CCDirector *v10; // rax
__int64 v11; // rbx
__int64 v12; // rcx
cocos2d::CCDirector *v13; // rax
__int64 v14; // rax
_BYTE *v15; // rcx
_BYTE *v16; // rax
_BYTE *v17; // rcx
__int64 v18; // rbx
const struct cocos2d::CCPoint *v19; // rax
__int64 v20; // rax
bool v21; // zf
int v23; // [rsp+40h] [rbp+8h] BYREF
char v24; // [rsp+50h] [rbp+18h] BYREF
float v25; // [rsp+54h] [rbp+1Ch]
v2 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v2, &v24);
v3 = 0.2;
if ( *(_BYTE *)(a1 + 416) )
v3 = 0.40000001;
v4 = *(_BYTE **)(a1 + 432);
if ( !v4[2497] )
{
if ( v4[2499] || v4[2502] )
{
v3 = -1.0;
goto LABEL_25;
}
if ( v4[2498] )
{
v8 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 200LL))(v4);
v10 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v9);
if ( (float)((float)((float)(cocos2d::CCDirector::getScreenBottom(v10) + 90.0) + 15.0) + 200.0) > *(float *)(v8 + 4) )
{
v3 = 0.40000001;
goto LABEL_25;
}
}
else if ( v4[2500] )
{
v11 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 200LL))(v4);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
if ( (float)((float)(cocos2d::CCDirector::getScreenBottom(v13) + 90.0) + 75.0) > *(float *)(v11 + 4) )
{
v3 = 1.0;
goto LABEL_25;
}
v14 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 432) + 200LL))(*(_QWORD *)(a1 + 432));
if ( *(float *)(v14 + 4) <= (float)(v25 - 75.0) )
{
v3 = 0.5;
goto LABEL_25;
}
}
else
{
if ( !v4[2508] )
goto LABEL_25;
if ( !v4[2503] && *(float *)((*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 200LL))(v4) + 4) < 150.0 )
{
v3 = 0.89999998;
goto LABEL_25;
}
v15 = *(_BYTE **)(a1 + 432);
if ( v15[2503] && *(float *)((*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v15 + 200LL))(v15) + 4) > 210.0 )
{
v3 = 0.89999998;
goto LABEL_25;
}
}
LABEL_15:
v3 = 0.0;
goto LABEL_25;
}
v5 = (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 200LL))(v4);
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6);
if ( (float)((float)((float)(cocos2d::CCDirector::getScreenBottom(v7) + 90.0) + 15.0) + 100.0) <= *(float *)(v5 + 4) )
goto LABEL_15;
v3 = 0.30000001;
LABEL_25:
LODWORD(v16) = rand();
if ( v3 >= (float)((float)(int)v16 / 32767.0)
&& ((v17 = *(_BYTE **)(a1 + 432), v17[2580]) || v17[2497] || v17[2498] || v17[2500] || v17[2508]) )
{
LODWORD(v16) = PlayerObject::pushButton(v17, 1);
}
else
{
v18 = *(_QWORD *)(a1 + 432);
if ( !*(_BYTE *)(v18 + 3024) )
{
v23 = 1;
v16 = (_BYTE *)sub_14016EE40((__int64 *)(v18 + 3008), &v23);
*v16 = 0;
}
if ( !*(_BYTE *)(v18 + 2611) )
{
if ( *(_BYTE *)(v18 + 2445) )
{
v19 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v18 + 200LL))(v18);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v23, v19);
LODWORD(v16) = PlayerObject::placeStreakPoint(v18, v20);
}
v21 = *(_BYTE *)(v18 + 2540) == 0;
*(_WORD *)(v18 + 2445) = 0;
*(_BYTE *)(v18 + 2468) = 1;
if ( !v21 )
LODWORD(v16) = PlayerObject::stopDashing(v18);
}
}
return (int)v16;
}