//
// PlayerObject::ringJump from 0x769d20 to 0x76aaa4 (3460 bytes)
//
// 5 xrefs:
// > PlayerObject::pushButton @ 0x76ad40
// > PlayerObject::pushButton @ 0x76ad88
// > PlayerObject::pushButton @ 0x76addc
// > GJBaseGameLayer::playerTouchedRing @ 0x9c91c4
// > ??> @ 0x105a78
//
// This function is hookable on this platform (idp: arm, 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 12:53:10 +0000
//
__int64 __fastcall PlayerObject::ringJump(PlayerObject *this, RingObject *a2, unsigned __int8 a3)
{
int v3; // w21
unsigned __int64 v6; // x28
int v7; // w27
unsigned __int64 v8; // x25
__int64 v9; // x24
unsigned __int64 v10; // x5
__int64 *v11; // x0
unsigned __int64 v12; // x2
unsigned __int64 v13; // x2
char *v14; // x26
__int64 v15; // x0
__int64 v16; // x21
float v17; // s2
float v18; // s0
_BOOL8 v19; // x25
__int64 v20; // x1
float v21; // s1
float v22; // s9
float v23; // s8
int v24; // w0
__int64 v25; // x0
int v26; // w0
double v27; // d0
__int64 v29; // x0
unsigned __int64 v30; // x1
unsigned __int64 v31; // x24
__int64 *v32; // x0
GJBaseGameLayer *v33; // x21
int v34; // w0
unsigned int v35; // w0
unsigned __int8 isFacingDown; // w0
int v37; // w1
GameManager *v38; // x0
char v39; // w23
char v40; // w25
char v41; // w24
float v42; // s0
CCCircleWave *v43; // x21
void (__fastcall *v44)(CCCircleWave *, __int64); // x23
__int64 v45; // x0
GameManager *v46; // x0
__int64 v47; // x0
GameManager *v48; // x0
__int64 v49; // x0
GameManager *v50; // x0
__int64 v51; // x0
GameManager *v52; // x0
__int64 v53; // x0
unsigned __int8 isFacingLeft; // w0
__int64 v55; // x0
char *v56; // x0
__int64 v57; // x0
int active; // w0
unsigned __int64 v59; // x2
unsigned __int64 v60; // x1
double v61; // d0
GameManager *v62; // x0
__int64 v63; // x0
__int64 v64; // x23
GameManager *v65; // x0
__int64 v66; // x0
__int64 v67; // x0
GameManager *v68; // x0
__int64 v69; // x0
__int64 v70; // x0
__int64 v71; // x23
int v72; // w21
float v73; // s0
int v74; // w1
GameManager *v75; // x0
__int64 v76; // x0
GameManager *v77; // x0
__int64 v78; // x0
__int64 v79; // [xsp+70h] [xbp+70h]
unsigned int v80; // [xsp+78h] [xbp+78h]
unsigned int v81; // [xsp+7Ch] [xbp+7Ch]
char *v82; // [xsp+80h] [xbp+80h]
unsigned int v83; // [xsp+88h] [xbp+88h]
unsigned int v84; // [xsp+8Ch] [xbp+8Ch]
int v85; // [xsp+98h] [xbp+98h] BYREF
__int64 v86; // [xsp+A0h] [xbp+A0h] BYREF
__int64 v87; // [xsp+A8h] [xbp+A8h]
void *v88; // [xsp+B0h] [xbp+B0h]
v3 = a3;
if ( !a2 )
return _stack_chk_guard;
if ( *((_BYTE *)this + 2424) )
return _stack_chk_guard;
v82 = (char *)this + 2072;
v85 = *((_DWORD *)a2 + 229);
if ( std::__hash_table,std::equal_to,std::allocator>::find(
(_QWORD *)this + 259,
&v85) )
{
return _stack_chk_guard;
}
v80 = *((unsigned __int8 *)a2 + 1044);
v83 = (*(__int64 (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 36;
v81 = (*(__int64 (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 46;
v84 = (v81 ^ 1) & (v83 ^ 1);
if ( (!*((_BYTE *)this + 2370)
|| *((_BYTE *)this + 2460)
|| !*((_BYTE *)this + 2369)
|| *((unsigned __int8 *)this + 2371) >= v84
&& *((unsigned __int8 *)this + 2372) >= v83
&& *((unsigned __int8 *)this + 2373) >= v81)
&& !v3 )
{
return _stack_chk_guard;
}
if ( *((_BYTE *)a2 + 1780) )
PlayerObject::reversePlayer(this, a2);
*((_BYTE *)this + 2064) = 1;
v6 = *((_QWORD *)this + 260);
v7 = *((_DWORD *)a2 + 229);
if ( !v6 )
{
v19 = 1;
v14 = (char *)this + 2088;
v29 = operator new(0x18u);
*(_DWORD *)(v29 + 16) = v7;
*(_QWORD *)(v29 + 8) = v7;
v16 = v29;
*(_QWORD *)v29 = 0;
v20 = 0;
v17 = *((float *)this + 526);
v18 = (float)(unsigned __int64)(*((_QWORD *)this + 262) + 1LL);
LABEL_49:
v30 = v20 + v19;
v31 = vcvtps_u32_f32(v18 / v17);
if ( v31 >= v30 )
v30 = v31;
std::__hash_table,std::equal_to,std::allocator>::rehash((unsigned __int64)v82, v30);
v6 = *((_QWORD *)this + 260);
v8 = v6 - 1;
if ( ((v6 - 1) & v6) != 0 )
v79 = 8 * (v7 % v6);
else
v79 = 8 * (v8 & v7);
goto LABEL_53;
}
v8 = v6 - 1;
v9 = (v6 - 1) & v6;
v10 = (v6 - 1) & v7;
if ( v9 )
v10 = v7 % v6;
v79 = 8 * v10;
v11 = *(__int64 **)(*((_QWORD *)this + 259) + 8 * v10);
if ( v11 )
{
while ( 1 )
{
v11 = (__int64 *)*v11;
if ( !v11 )
break;
v12 = v11[1];
v13 = v9 ? v12 % v6 : v8 & v12;
if ( v10 != v13 )
break;
if ( v7 == *((_DWORD *)v11 + 4) )
goto LABEL_56;
}
}
v14 = (char *)this + 2088;
v15 = operator new(0x18u);
*(_DWORD *)(v15 + 16) = v7;
*(_QWORD *)(v15 + 8) = v7;
v16 = v15;
*(_QWORD *)v15 = 0;
v17 = *((float *)this + 526);
v18 = (float)(unsigned __int64)(*((_QWORD *)this + 262) + 1LL);
if ( v18 > (float)((float)v6 * v17) )
{
v19 = 1;
v20 = 2 * v6;
if ( v6 > 2 )
v19 = v9 != 0;
goto LABEL_49;
}
LABEL_53:
v32 = *(__int64 **)(*((_QWORD *)this + 259) + v79);
if ( v32 )
{
*(_QWORD *)v16 = *v32;
*v32 = v16;
}
else
{
*(_QWORD *)v16 = *((_QWORD *)this + 261);
*((_QWORD *)this + 261) = v16;
*(_QWORD *)(*((_QWORD *)this + 259) + v79) = v14;
if ( *(_QWORD *)v16 )
{
v59 = *(_QWORD *)(*(_QWORD *)v16 + 8LL);
if ( (v8 & v6) != 0 )
v60 = v59 % v6;
else
v60 = v8 & v59;
*(_QWORD *)(*((_QWORD *)this + 259) + 8 * v60) = v16;
}
}
++*((_QWORD *)this + 262);
LABEL_56:
if ( *((_QWORD *)this + 377) )
{
PlayerObject::gameEventTriggered((__int64)this, 8, 0);
v33 = *((GJBaseGameLayer **)this + 377);
v34 = (*(__int64 (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2);
v35 = GJBaseGameLayer::objectTypeToGameEvent(v33, v34);
PlayerObject::gameEventTriggered((__int64)this, v35, 0);
}
if ( v83 )
{
*((_BYTE *)this + 2372) = 1;
}
else if ( v81 )
{
*((_BYTE *)this + 2373) = 1;
}
else
{
*((_BYTE *)this + 2371) = 1;
}
cocos2d::CCArray::removeObject(*((cocos2d::CCArray **)this + 318), a2, 1);
if ( v84 )
*((_BYTE *)this + 1968) = 1;
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 36 )
{
GJBaseGameLayer::activateCustomRing(*((GJBaseGameLayer **)this + 377), a2);
if ( *((_BYTE *)this + 3053) )
*((_BYTE *)this + 2366) = 0;
goto LABEL_43;
}
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) != 46 )
{
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 43 )
{
if ( *((_BYTE *)this + 2427) )
{
isFacingLeft = GameObject::isFacingLeft(a2);
v37 = *((unsigned __int8 *)this + 2423);
if ( v37 != isFacingLeft )
goto LABEL_67;
if ( *((_BYTE *)this + 2427) )
goto LABEL_68;
}
isFacingDown = GameObject::isFacingDown(a2);
v37 = *((unsigned __int8 *)this + 2423);
if ( v37 == isFacingDown )
{
LABEL_68:
PlayerObject::spiderTestJump(this, 0);
goto LABEL_43;
}
LABEL_67:
PlayerObject::flipGravity((__int64)this, v37 ^ 1, 1u);
goto LABEL_68;
}
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 37 )
{
if ( *((_QWORD *)this + 377) )
PlayerObject::gameEventTriggered((__int64)this, 41, 0);
goto LABEL_93;
}
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 38 )
{
v50 = (GameManager *)*((unsigned __int8 *)this + 1972);
if ( *((_BYTE *)this + 1972) )
{
v51 = GameManager::sharedState(v50);
v52 = (GameManager *)GJBaseGameLayer::flipGravity(
*(GJBaseGameLayer **)(v51 + 544),
this,
*((_BYTE *)this + 2423) != 1,
1);
v53 = GameManager::sharedState(v52);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v53 + 544) + 1480LL))(
*(_QWORD *)(v53 + 544),
*((unsigned __int8 *)this + 2423));
}
else
{
v62 = *(GameManager **)(GameManager::sharedState(v50) + 552);
if ( v62 )
{
v63 = GameManager::sharedState(v62);
GJBaseGameLayer::flipGravity(*(GJBaseGameLayer **)(v63 + 552), this, *((_BYTE *)this + 2423) != 1, 1);
}
else
{
PlayerObject::flipGravity((__int64)this, *((_BYTE *)this + 2423) ^ 1, 1u);
}
}
if ( *((_QWORD *)this + 377) )
PlayerObject::gameEventTriggered((__int64)this, 42, 0);
LABEL_93:
PlayerObject::startDashing(this, a2);
goto LABEL_43;
}
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 32 )
{
*((_BYTE *)this + 2366) = 0;
PlayerObject::flipMod(this);
v72 = PlayerObject::flipMod(this);
if ( (unsigned __int8)PlayerObject::isFlying(this) )
{
PlayerObject::flipMod(this);
v73 = (float)(int)PlayerObject::flipMod(this) * -14.0;
if ( *((_BYTE *)this + 2418) )
v73 = v73 * 0.8;
}
else
{
v73 = (float)v72 * -15.0;
if ( !*((_BYTE *)this + 2421) && *((_BYTE *)this + 2422) )
v73 = v73 * 1.1;
}
PlayerObject::setYVelocity((__int64)this, v73);
if ( *((_BYTE *)this + 2419) )
PlayerObject::runBallRotation2((__int64)this);
else
PlayerObject::runRotateAction(this);
PlayerObject::activateStreak((cocos2d::CCNode **)this);
v74 = *((unsigned __int8 *)this + 2419);
*((_BYTE *)this + 2601) = 1;
*((_BYTE *)this + 2314) = 1;
if ( v74 || *((_BYTE *)this + 2428) )
*((_BYTE *)this + 2365) = 0;
goto LABEL_43;
}
v21 = *((float *)this + 618);
*((_BYTE *)this + 2516) = 1;
*((_BYTE *)this + 2500) = 0;
*((_BYTE *)this + 2425) = 0;
*((_BYTE *)this + 2366) = 0;
v22 = 1.0;
if ( v21 != 1.0 )
v22 = 0.8;
v23 = *((double *)this + 242);
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 13 )
{
v23 = v23 * 0.8;
LABEL_29:
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 29 )
{
v68 = (GameManager *)*((unsigned __int8 *)this + 1972);
if ( *((_BYTE *)this + 1972) )
{
v69 = GameManager::sharedState(v68);
GJBaseGameLayer::flipGravity(*(GJBaseGameLayer **)(v69 + 544), this, *((_BYTE *)this + 2423) != 1, 1);
if ( !v80 )
{
v70 = GameManager::sharedState(nullptr);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v70 + 544) + 1480LL))(
*(_QWORD *)(v70 + 544),
*((unsigned __int8 *)this + 2423));
}
}
else
{
v75 = *(GameManager **)(GameManager::sharedState(v68) + 552);
if ( v75 )
{
v76 = GameManager::sharedState(v75);
GJBaseGameLayer::flipGravity(*(GJBaseGameLayer **)(v76 + 552), this, *((_BYTE *)this + 2423) != 1, 1);
}
else
{
PlayerObject::flipGravity((__int64)this, *((_BYTE *)this + 2423) ^ 1, 1u);
}
}
}
v24 = PlayerObject::flipMod(this);
PlayerObject::setYVelocity((__int64)this, (float)((float)((float)v24 * v23) * v22));
if ( *((_BYTE *)this + 2419) )
PlayerObject::runBallRotation2((__int64)this);
else
PlayerObject::runRotateAction(this);
if ( *((_BYTE *)this + 2832) && !*((_BYTE *)this + 1784) )
PlayerObject::animatePlatformerJump((__int64)this, 1.0);
v25 = (*(__int64 (__fastcall **)(PlayerObject *))(*(_QWORD *)this + 192LL))(this);
cocos2d::CCPoint::operator=((char *)this + 2532, v25);
PlayerObject::activateStreak((cocos2d::CCNode **)this);
v26 = *((unsigned __int8 *)this + 2419);
*((_BYTE *)this + 2601) = 1;
if ( v26 )
goto LABEL_120;
if ( *((_BYTE *)this + 2428) )
{
v27 = *((double *)this + 299);
*((_BYTE *)this + 2365) = 0;
*((double *)this + 299) = v27 * 0.600000024;
goto LABEL_38;
}
if ( *((_BYTE *)this + 2422) )
{
LABEL_120:
v61 = *((double *)this + 299);
*((_BYTE *)this + 2365) = 0;
*((double *)this + 299) = v61 * 0.699999988;
}
LABEL_38:
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 13 )
{
v65 = (GameManager *)*((unsigned __int8 *)this + 1972);
if ( *((_BYTE *)this + 1972) )
{
v66 = GameManager::sharedState(v65);
GJBaseGameLayer::flipGravity(*(GJBaseGameLayer **)(v66 + 544), this, *((_BYTE *)this + 2423) != 1, 1);
if ( !v80 )
{
v67 = GameManager::sharedState(nullptr);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v67 + 544) + 1480LL))(
*(_QWORD *)(v67 + 544),
*((unsigned __int8 *)this + 2423));
}
}
else
{
v77 = *(GameManager **)(GameManager::sharedState(v65) + 552);
if ( v77 )
{
v78 = GameManager::sharedState(v77);
GJBaseGameLayer::flipGravity(*(GJBaseGameLayer **)(v78 + 552), this, *((_BYTE *)this + 2423) != 1, 1);
}
else
{
PlayerObject::flipGravity((__int64)this, *((_BYTE *)this + 2423) ^ 1, 1u);
}
}
}
if ( *((_BYTE *)this + 2421) )
{
v64 = *((_QWORD *)this + 267);
v86 = 0;
v87 = 0;
v88 = nullptr;
std::string::__init(&v86, "jump_start", 0xAu);
CCAnimatedSprite::runAnimation(v64, (char *)&v86);
}
else
{
if ( !*((_BYTE *)this + 2422) )
{
LABEL_41:
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 35 )
*((_BYTE *)this + 2314) = 1;
goto LABEL_43;
}
CCAnimatedSprite::stopTween(*((CCAnimatedSprite **)this + 268));
SpriteAnimationManager::stopAnimations(*(SpriteAnimationManager **)(*((_QWORD *)this + 268) + 648LL));
v71 = *((_QWORD *)this + 268);
v86 = 0;
v87 = 0;
v88 = nullptr;
std::string::__init(&v86, "jump", 4u);
CCAnimatedSprite::tweenToAnimation(v71, (__int64)&v86, 0.06);
}
if ( (v86 & 1) != 0 )
operator delete(v88);
goto LABEL_41;
}
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 29 )
{
if ( *((_BYTE *)this + 2417) )
v23 = v23 * 0.7;
goto LABEL_29;
}
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 12 )
{
if ( *((_BYTE *)this + 2417) )
{
v23 = v23 * 0.37;
}
else if ( *((_BYTE *)this + 2418) )
{
v23 = v23 * 0.42;
}
else if ( *((_BYTE *)this + 2419) )
{
v23 = v23 * 0.77;
}
else
{
v23 = v23 * 0.72;
}
goto LABEL_29;
}
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) != 35 )
{
if ( *((_BYTE *)this + 2421) )
v23 = v23 * 0.9;
goto LABEL_29;
}
if ( *((_BYTE *)this + 2417) )
{
if ( *((float *)this + 618) != 1.0 )
v23 = v23 * 1.4;
goto LABEL_29;
}
if ( *((_BYTE *)this + 2418) )
{
if ( *((float *)this + 618) == 1.0 )
v23 = v23 * 1.02;
else
v23 = v23 * 1.36;
goto LABEL_29;
}
if ( !*((_BYTE *)this + 2419) )
{
if ( *((_BYTE *)this + 2421) )
{
v23 = v23 * 1.28;
goto LABEL_29;
}
if ( !*((_BYTE *)this + 2422) )
{
v23 = v23 * 1.38;
goto LABEL_29;
}
}
v23 = v23 * 1.34;
goto LABEL_29;
}
GJBaseGameLayer::teleportPlayer(*((GJBaseGameLayer **)this + 377), a2, this);
*((_BYTE *)this + 2366) = 0;
LABEL_43:
if ( !*((_BYTE *)this + 1969)
&& !*(_BYTE *)(GameManager::sharedState((GameManager *)*((unsigned __int8 *)this + 1969)) + 925)
&& !(*(unsigned __int8 (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1552LL))(a2)
&& *((unsigned __int8 *)this + 1972) > v80
&& *((_DWORD *)a2 + 257) != 3643 )
{
v38 = (GameManager *)((*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) - 12);
switch ( (int)v38 )
{
case 0:
case 26:
v39 = -1;
v40 = 0;
v41 = -1;
break;
case 1:
v39 = -1;
v41 = 0;
v40 = -1;
break;
case 17:
case 25:
v39 = 0;
v40 = -1;
v41 = 0;
break;
case 20:
v57 = GameManager::sharedState(v38);
active = GJEffectManager::activeColorForIndex(*(GJEffectManager **)(*(_QWORD *)(v57 + 544) + 2152LL), 1007);
v41 = active;
BYTE2(v85) = BYTE2(active);
v40 = BYTE1(active);
LOWORD(v85) = active;
v39 = BYTE2(active);
break;
case 23:
v39 = 0;
v40 = 100;
v41 = -1;
break;
case 24:
v55 = *((_QWORD *)a2 + 111);
if ( v55 )
v56 = (char *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v55 + 944LL))(v55);
else
v56 = (char *)(*(__int64 (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 944LL))(a2);
v41 = *v56;
v40 = v56[1];
v39 = v56[2];
break;
case 31:
v39 = -1;
v40 = 50;
v41 = -1;
break;
default:
v39 = 0;
v40 = -56;
v41 = -1;
break;
}
if ( (*(unsigned int (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1800LL))(a2) == 35 )
v42 = 42.0;
else
v42 = 35.0;
v43 = (CCCircleWave *)CCCircleWave::create((CCCircleWave *)((char *)&dword_0 + 1), v42, 5.0, 0.35);
*((_BYTE *)v43 + 340) = v41;
*((_BYTE *)v43 + 341) = v40;
*((_BYTE *)v43 + 342) = v39;
v44 = *(void (__fastcall **)(CCCircleWave *, __int64))(*(_QWORD *)v43 + 184LL);
v45 = (*(__int64 (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 192LL))(a2);
v44(v43, v45);
v46 = (GameManager *)CCCircleWave::followObject(v43, a2, 1u);
v47 = *(_QWORD *)(GameManager::sharedState(v46) + 544);
if ( v47 )
v48 = (GameManager *)(v47 + 13992);
else
v48 = nullptr;
*((_QWORD *)v43 + 46) = v48;
v49 = GameManager::sharedState(v48);
PlayLayer::addCircle(*(cocos2d::CCArray ***)(v49 + 544), v43);
(*(void (__fastcall **)(_QWORD, CCCircleWave *, _QWORD))(**((_QWORD **)this + 378) + 464LL))(
*((_QWORD *)this + 378),
v43,
0);
}
if ( !*((_BYTE *)this + 649) )
EffectGameObject::playTriggerEffect(a2);
(*(void (__fastcall **)(RingObject *, PlayerObject *))(*(_QWORD *)a2 + 1536LL))(a2, this);
(*(void (__fastcall **)(RingObject *))(*(_QWORD *)a2 + 1832LL))(a2);
PlayerObject::incrementJumps(this);
return _stack_chk_guard;
}