//
// PlayerObject::spiderTestJumpX from 0x445da4 to 0x44665a (2230 bytes)
//
// 0 xrefs:
//
// 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:48:30 +0000
//
GJBaseGameLayer *__fastcall PlayerObject::spiderTestJumpX(GJBaseGameLayer *this, int a2)
{
int v2; // r4
int v3; // r11
const cocos2d::CCRect *v4; // r0
float v5; // s19
float v6; // s20
float v7; // s15
float *v8; // r9
cocos2d::CCArray *v9; // r6
cocos2d::CCArray *v10; // r7
size_t *v11; // r3
void *v12; // r0
size_t v13; // r1
int (**v14)(const void *, const void *); // r3
size_t *v15; // r3
void *v16; // r0
size_t v17; // r1
int (**v18)(const void *, const void *); // r3
unsigned int v19; // r8
const cocos2d::CCPoint *v20; // r0
int v21; // r11
int (*v22)(void); // r3
cocos2d::CCRect *v23; // r0
float v24; // r0
float v25; // s16
cocos2d::CCRect *v26; // r0
float v27; // r0
cocos2d::CCRect *v28; // r0
float v29; // r0
cocos2d::CCRect *v30; // r0
float v31; // r0
unsigned int v32; // r10
int v33; // r0
const cocos2d::CCRect *v34; // r0
int v35; // r3
int v36; // r0
int v37; // r0
const cocos2d::CCPoint *v38; // r0
int v39; // r2
double v40; // r0
int v41; // r0
GameManager *v42; // r0
int v43; // r0
float v44; // r3
CCCircleWave *v45; // r0
CCCircleWave *v46; // r6
char *v47; // r3
char v48; // r1
char v49; // r2
char v50; // r3
GameManager *v51; // r0
GameManager *v52; // r0
int v53; // r3
int v54; // r0
CCCircleWave *v55; // r0
CCCircleWave *v56; // r6
char *v57; // r3
char v58; // r1
char v59; // r2
char v60; // r3
GameManager *v61; // r0
GameManager *v62; // r0
int v63; // r3
int v64; // r0
CCCircleWave *v65; // r0
CCCircleWave *v66; // r6
char *v67; // r3
char v68; // r1
char v69; // r2
char v70; // r3
GameManager *v71; // r0
GameManager *v72; // r0
int v73; // r3
int v74; // r0
float v75; // r2
cocos2d::CCEaseElasticOut *v76; // r0
float v77; // r2
cocos2d::CCAction *v78; // r6
const char *v79; // r1
cocos2d::CCNode *v80; // r0
int v81; // r1
cocos2d::CCNode *v82; // r6
GameManager *v83; // r0
int v84; // r0
void (__fastcall *v85)(cocos2d::CCNode *, _DWORD); // r7
float v86; // s16
float *v87; // r0
void (__fastcall *v88)(cocos2d::CCNode *, float *); // r7
int v89; // r1
cocos2d::CCArray *v90; // r0
int v91; // r7
cocos2d::CCSpriteFrameCache *v92; // r0
cocos2d::CCArray *v93; // r8
cocos2d::CCSpriteFrameCache *v94; // r0
const char *v95; // r1
cocos2d::CCSpriteFrameCache *v96; // r10
cocos2d::CCString *v97; // r0
const char *CString; // r0
cocos2d::CCObject *v99; // r0
float v100; // r2
cocos2d::CCAnimate *v101; // r0
cocos2d::CCAnimation *v102; // r1
cocos2d::CCSequence *v103; // r7
cocos2d::CCFiniteTimeAction *v104; // r0
cocos2d::CCAction *v105; // r0
int v106; // [sp+0h] [bp-94h]
bool v107; // [sp+4h] [bp-90h]
bool v108; // [sp+4h] [bp-90h]
bool v109; // [sp+4h] [bp-90h]
float v111; // [sp+1Ch] [bp-78h] BYREF
float v112; // [sp+20h] [bp-74h]
float v113; // [sp+24h] [bp-70h] BYREF
float v114; // [sp+28h] [bp-6Ch]
_BYTE v115[4]; // [sp+2Ch] [bp-68h] BYREF
float v116; // [sp+30h] [bp-64h]
float v117; // [sp+34h] [bp-60h]
float v118; // [sp+38h] [bp-5Ch]
float v119; // [sp+3Ch] [bp-58h] BYREF
float v120; // [sp+40h] [bp-54h]
float v121; // [sp+44h] [bp-50h]
float v122; // [sp+48h] [bp-4Ch]
_BYTE v123[4]; // [sp+4Ch] [bp-48h] BYREF
float v124; // [sp+50h] [bp-44h]
float v125; // [sp+58h] [bp-3Ch]
_BYTE v126[12]; // [sp+5Ch] [bp-38h] BYREF
float v127; // [sp+68h] [bp-2Ch]
float v128[4]; // [sp+6Ch] [bp-28h] BYREF
float v129[2]; // [sp+7Ch] [bp-18h] BYREF
float v130; // [sp+84h] [bp-10h]
v2 = (int)this;
if ( *((_BYTE *)this + 1960) || *((_BYTE *)this + 2066) || *((_BYTE *)this + 1601) )
return this;
v3 = *((_DWORD *)this + 610);
v4 = (const cocos2d::CCRect *)(*(int (__fastcall **)(GJBaseGameLayer *))(*(_DWORD *)this + 664))(this);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v115, v4);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v119, (const cocos2d::CCRect *)v115);
v5 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 96))(v2);
v6 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 96))(v2);
if ( *(_BYTE *)(v2 + 1959) )
v7 = (float)(v121 - 2.0) + v119;
else
v7 = v119 - 2998.0;
v8 = (float *)(v2 + 2008);
v119 = v7;
v121 = 3000.0;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v123, (const cocos2d::CCRect *)&v119);
v125 = v118;
v124 = v116;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v126, (const cocos2d::CCRect *)v123);
v127 = v127 + 4.0;
v125 = *(float *)(v2 + 2008) * 8.0;
v124 = v124 + (float)((float)(v122 - v125) * 0.5);
v122 = (float)(v118 * 0.5) + 1.0;
v120 = v120 + (float)(v118 * 0.5);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v129, (const cocos2d::CCRect *)&v119);
v9 = (cocos2d::CCArray *)GJBaseGameLayer::staticObjectsInRect(v3, v129, 1);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v129, (const cocos2d::CCRect *)v123);
v10 = (cocos2d::CCArray *)GJBaseGameLayer::damagingObjectsInRect(v3, v129, 1);
if ( !cocos2d::CCArray::count(v9) && cocos2d::CCArray::count(v10) || a2 )
{
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v129, (const cocos2d::CCRect *)v126);
a2 = 1;
v9 = (cocos2d::CCArray *)GJBaseGameLayer::staticObjectsInRect(v3, v129, 1);
}
if ( cocos2d::CCArray::count(v9) )
{
v11 = *((size_t **)v9 + 13);
v12 = (void *)v11[3];
v13 = *v11;
if ( *(_BYTE *)(v2 + 1959) )
v14 = (int (**)(const void *, const void *))&boxCompMinX;
else
v14 = (int (**)(const void *, const void *))&boxCompMaxX;
qsort(v12, v13, 4u, *v14);
}
if ( cocos2d::CCArray::count(v10) )
{
v15 = *((size_t **)v10 + 13);
v16 = (void *)v15[3];
v17 = *v15;
if ( *(_BYTE *)(v2 + 1959) )
v18 = (int (**)(const void *, const void *))&boxCompMinX;
else
v18 = (int (**)(const void *, const void *))&boxCompMaxX;
qsort(v16, v17, 4u, *v18);
}
if ( cocos2d::CCArray::count(v9) )
{
v19 = 0;
v20 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 96))(v2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, v20);
while ( v19 < cocos2d::CCArray::count(v9) )
{
v21 = cocos2d::CCArray::objectAtIndex(v9, v19);
v22 = *(int (**)(void))(*(_DWORD *)v21 + 664);
if ( *(_BYTE *)(v2 + 1959) )
{
v23 = (cocos2d::CCRect *)v22();
v24 = COERCE_FLOAT(cocos2d::CCRect::getMinX(v23));
v25 = v24 - (float)(v117 * 0.5);
}
else
{
v26 = (cocos2d::CCRect *)v22();
v27 = COERCE_FLOAT(cocos2d::CCRect::getMaxX(v26));
v25 = v27 + (float)(v118 * 0.5);
}
if ( *(_BYTE *)(v2 + 1959) )
{
if ( v25 >= (float)(v113 - 10.0) )
goto LABEL_32;
}
else if ( v25 <= (float)(v113 + 10.0) )
{
LABEL_32:
if ( !*(_BYTE *)(v2 + 1962)
&& (v28 = (cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v21 + 664))(v21),
v29 = COERCE_FLOAT(cocos2d::CCRect::getMinY(v28)),
v29 > v114)
|| *(_BYTE *)(v2 + 1962)
&& (v30 = (cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v21 + 664))(v21),
v31 = COERCE_FLOAT(cocos2d::CCRect::getMaxY(v30)),
v31 < v114) )
{
v32 = 0;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v128, (const cocos2d::CCRect *)v115);
v128[0] = v25 - (float)(v117 * 0.5);
while ( v32 < cocos2d::CCArray::count(v9) )
{
v33 = cocos2d::CCArray::objectAtIndex(v9, v32);
if ( v19 != v32 )
{
v34 = (const cocos2d::CCRect *)(*(int (__fastcall **)(int))(*(_DWORD *)v33 + 664))(v33);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v129, v34);
v130 = v130 - 4.0;
v129[0] = v129[0] + 2.0;
if ( cocos2d::CCRect::intersectsRect((cocos2d::CCRect *)v129, (const cocos2d::CCRect *)v128) )
goto LABEL_43;
}
++v32;
}
}
if ( v25 != 0.0 )
goto LABEL_53;
goto LABEL_45;
}
LABEL_43:
++v19;
}
goto LABEL_45;
}
if ( !cocos2d::CCArray::count(v10) )
{
LABEL_45:
v35 = 0;
goto LABEL_49;
}
v36 = cocos2d::CCArray::objectAtIndex(v10, 0);
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v36 + 680))(v129, v36);
v25 = v129[0];
if ( v129[0] != 0.0 )
goto LABEL_56;
v35 = 1;
LABEL_49:
if ( *(_BYTE *)(v2 + 1959) )
v25 = (float)(v5 + 3000.0) - (float)(v117 * 0.5);
else
v25 = (float)(v6 - 3000.0) + (float)(v117 * 0.5);
if ( v35 )
goto LABEL_56;
LABEL_53:
if ( cocos2d::CCArray::count(v10) )
{
v37 = cocos2d::CCArray::objectAtIndex(v10, 0);
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v37 + 680))(v129, v37);
if ( *(_BYTE *)(v2 + 1959) )
{
if ( v129[0] >= v25 )
goto LABEL_56;
LABEL_93:
if ( !a2 )
return (GJBaseGameLayer *)PlayerObject::spiderTestJump((PlayerObject *)v2, 1);
v25 = v129[0];
goto LABEL_56;
}
if ( v129[0] > v25 )
goto LABEL_93;
}
LABEL_56:
v38 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(int))(*(_DWORD *)v2 + 96))(v2);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v111, v38);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v113, v25, v112);
(*(void (__fastcall **)(int, float *))(*(_DWORD *)v2 + 92))(v2, &v113);
PlayerObject::flipGravity((unsigned __int8 *)v2, *(unsigned __int8 *)(v2 + 1959) ^ 1, 1);
v39 = -PlayerObject::flipMod((PlayerObject *)v2);
LODWORD(v40) = v2;
PlayerObject::setYVelocity(v40, (double)v39, 35);
*(_BYTE *)(v2 + 1608) = 0;
*(_BYTE *)(v2 + 1901) = 0;
PlayerObject::resetCollisionLog((cocos2d::CCDictionary **)v2, 1);
*(float *)(v2 + 2112) = v113;
*(_QWORD *)(v2 + 1664) = *(_QWORD *)(v2 + 2128);
if ( *(_BYTE *)(v2 + 1604) && !*(_BYTE *)(v2 + 1483) )
{
v41 = PlayerObject::reverseMod((PlayerObject *)v2);
v111 = v111 + (float)((float)v41 * 7.5);
v42 = (GameManager *)PlayerObject::reverseMod((PlayerObject *)v2);
v113 = v113 + (float)((float)(int)v42 * 7.5);
v43 = GameManager::sharedState(v42);
LODWORD(v44) = *(unsigned __int8 *)(v43 + 725);
if ( !*(_BYTE *)(v43 + 725) )
{
v113 = v113 + 6.0;
v45 = CCCircleWave::create(
COERCE_CCCIRCLEWAVE_((float)(*v8 * 10.0) * 1.3),
1.0,
(cocos2d::CCActionTween *)0x3E19999A,
v44,
SLOBYTE(v44),
v107);
v46 = v45;
if ( *(_BYTE *)(v2 + 2153) )
v47 = (char *)(v2 + 2106);
else
v47 = (char *)(v2 + 2109);
v48 = *v47;
v49 = v47[1];
v50 = v47[2];
*((_BYTE *)v45 + 280) = v48;
*((_BYTE *)v45 + 281) = v49;
*((_BYTE *)v45 + 282) = v50;
(*(void (__fastcall **)(CCCircleWave *, float *))(*(_DWORD *)v45 + 92))(v45, &v111);
v51 = (GameManager *)(*(int (__fastcall **)(_DWORD, CCCircleWave *, _DWORD))(**(_DWORD **)(v2 + 2444) + 232))(
*(_DWORD *)(v2 + 2444),
v46,
0);
v52 = (GameManager *)GameManager::sharedState(v51);
v53 = *((_DWORD *)v52 + 101);
if ( v53 )
v53 += 11688;
*((_DWORD *)v46 + 77) = v53;
v54 = GameManager::sharedState(v52);
PlayLayer::addCircle(*(cocos2d::CCArray ***)(v54 + 404), v46);
*((_DWORD *)v46 + 75) = 1054280254;
v55 = CCCircleWave::create(
COERCE_CCCIRCLEWAVE_((float)(*v8 * 20.0) * 1.3),
2.0,
(cocos2d::CCActionTween *)0x3E800000,
0.0,
0,
v108);
v56 = v55;
if ( *(_BYTE *)(v2 + 2153) )
v57 = (char *)(v2 + 2106);
else
v57 = (char *)(v2 + 2109);
v58 = *v57;
v59 = v57[1];
v60 = v57[2];
*((_BYTE *)v55 + 280) = v58;
*((_BYTE *)v55 + 281) = v59;
*((_BYTE *)v55 + 282) = v60;
(*(void (__fastcall **)(CCCircleWave *, float *))(*(_DWORD *)v55 + 92))(v55, &v113);
v61 = (GameManager *)(*(int (__fastcall **)(_DWORD, CCCircleWave *, _DWORD))(**(_DWORD **)(v2 + 2444) + 232))(
*(_DWORD *)(v2 + 2444),
v56,
0);
v62 = (GameManager *)GameManager::sharedState(v61);
v63 = *((_DWORD *)v62 + 101);
if ( v63 )
v63 += 11688;
*((_DWORD *)v56 + 77) = v63;
v64 = GameManager::sharedState(v62);
PlayLayer::addCircle(*(cocos2d::CCArray ***)(v64 + 404), v56);
*((_DWORD *)v56 + 75) = 1062668862;
v65 = CCCircleWave::create(
COERCE_CCCIRCLEWAVE_(*v8 * 10.0),
(float)(*v8 * 30.0) * 1.5,
(cocos2d::CCActionTween *)0x3E800000,
0.0,
0,
v109);
v66 = v65;
if ( *(_BYTE *)(v2 + 2153) )
v67 = (char *)(v2 + 2106);
else
v67 = (char *)(v2 + 2109);
v68 = *v67;
v69 = v67[1];
v70 = v67[2];
*((_BYTE *)v65 + 280) = v68;
*((_BYTE *)v65 + 281) = v69;
*((_BYTE *)v65 + 282) = v70;
(*(void (__fastcall **)(CCCircleWave *, float *))(*(_DWORD *)v65 + 92))(v65, &v113);
v71 = (GameManager *)(*(int (__fastcall **)(_DWORD, CCCircleWave *, _DWORD))(**(_DWORD **)(v2 + 2444) + 232))(
*(_DWORD *)(v2 + 2444),
v66,
0);
v72 = (GameManager *)GameManager::sharedState(v71);
v73 = *((_DWORD *)v72 + 101);
if ( v73 )
v73 += 11688;
*((_DWORD *)v66 + 77) = v73;
v74 = GameManager::sharedState(v72);
PlayLayer::addCircle(*(cocos2d::CCArray ***)(v74 + 404), v66);
*((_DWORD *)v66 + 73) = 1;
}
LOWORD(v106) = -1;
BYTE2(v106) = -1;
PlayerObject::flashPlayer(v2, 1050253722, 1028443341, 0xFFFFFF, v106);
cocos2d::CCNode::stopActionByTag(*(cocos2d::CCNode **)(v2 + 1736), 10);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v2 + 1736) + 80))(*(_DWORD *)(v2 + 1736), 1053609165);
v76 = (cocos2d::CCEaseElasticOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3EE66666, 1.0, v75);
v78 = (cocos2d::CCAction *)cocos2d::CCEaseElasticOut::create(v76, (cocos2d::CCActionInterval *)0x3EB33333, v77);
(*(void (__fastcall **)(cocos2d::CCAction *, int))(*(_DWORD *)v78 + 36))(v78, 10);
cocos2d::CCNode::runAction(*(cocos2d::CCNode **)(v2 + 1736), v78);
if ( *(_BYTE *)(v2 + 1604) )
{
v80 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"spiderDash_002.png",
v79);
if ( *(_BYTE *)(v2 + 1959) )
v81 = 0;
else
v81 = 1127481344;
v82 = v80;
v83 = (GameManager *)(*(int (__fastcall **)(cocos2d::CCNode *, int))(*(_DWORD *)v80 + 180))(v80, v81);
v84 = GameManager::sharedState(v83);
(*(void (__fastcall **)(_DWORD, cocos2d::CCNode *, int))(**(_DWORD **)(*(_DWORD *)(v84 + 404) + 2436) + 232))(
*(_DWORD *)(*(_DWORD *)(v84 + 404) + 2436),
v82,
40);
LODWORD(v128[0]) = 770;
LODWORD(v128[1]) = 1;
(*(void (__fastcall **)(cocos2d::CCNode *, int, int))(*(_DWORD *)v82 + 540))(v82, 770, 1);
v85 = *(void (__fastcall **)(cocos2d::CCNode *, _DWORD))(*(_DWORD *)v82 + 64);
v86 = fabsf(v111 - v113) + 30.0;
v87 = (float *)(*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v82 + 164))(v82);
v85(v82, v86 / *v87);
v88 = *(void (__fastcall **)(cocos2d::CCNode *, float *))(*(_DWORD *)v82 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v129, v111 + (float)((float)(v113 - v111) * 0.5), v112);
v88(v82, v129);
if ( *(_BYTE *)(v2 + 2153) )
v89 = v2 + 2106;
else
v89 = v2 + 2109;
v90 = (cocos2d::CCArray *)(*(int (__fastcall **)(cocos2d::CCNode *, int))(*(_DWORD *)v82 + 480))(v82, v89);
v91 = 1;
v92 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::create(v90);
v93 = v92;
do
{
v94 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v92);
v95 = (const char *)v91++;
v96 = v94;
v97 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"spiderDash_%03d.png", v95);
CString = (const char *)cocos2d::CCString::getCString(v97);
v99 = (cocos2d::CCObject *)cocos2d::CCSpriteFrameCache::spriteFrameByName(v96, CString);
v92 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::addObject(v93, v99);
}
while ( v91 != 9 );
v101 = (cocos2d::CCAnimate *)cocos2d::CCAnimation::createWithSpriteFrames(
v93,
(cocos2d::CCArray *)0x3D23D70A,
v100);
v103 = (cocos2d::CCSequence *)cocos2d::CCAnimate::create(v101, v102);
LODWORD(v129[0]) = 268;
LODWORD(v129[1]) = 1;
v104 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCCallFunc::create(v82, 268, 1);
v105 = (cocos2d::CCAction *)cocos2d::CCSequence::create(v103, v104, 0);
cocos2d::CCNode::runAction(v82, v105);
}
}
if ( !*(_BYTE *)(v2 + 1483) && (!*(_BYTE *)(v2 + 1958) || !*(_BYTE *)(v2 + 2320)) )
cocos2d::CCParticleSystem::resetSystem(*(cocos2d::CCParticleSystem **)(v2 + 1744));
this = *(GJBaseGameLayer **)(v2 + 2440);
if ( this )
return (GJBaseGameLayer *)GJBaseGameLayer::checkCameraLimitAfterTeleport(this, (PlayerObject *)v2, 60.0);
return this;
}