//
// GJBaseGameLayer::parentForZLayer from 0x1403152d0 to 0x140315f1a (3146 bytes)
//
// 7 xrefs:
// > GameObject::parentForZLayer @ 0x140299012
// > GJBaseGameLayer::parentForZLayer @ 0x140315359
// > GJBaseGameLayer::claimCustomParticle @ 0x14034b1c3
// > LevelEditorLayer::claimCustomParticle @ 0x1404012c4
// > ??> @ 0x1408b4c78
// > ??> @ 0x1408b4cac
// > ??> @ 0x14091e95c
//
// 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:30:17 +0000
//
struct cocos2d::CCObject *__fastcall GJBaseGameLayer::parentForZLayer(
__int64 a1,
int a2,
unsigned __int8 a3,
int a4,
int a5)
{
cocos2d::CCDictionary *v8; // rcx
unsigned __int8 v9; // r10
unsigned __int8 v10; // r15
__int64 v11; // r12
struct cocos2d::CCObject *v12; // rbp
__int64 v13; // rax
__int64 v14; // r14
struct cocos2d::CCTexture2D *v15; // rax
struct cocos2d::CCSpriteBatchNode *v16; // rax
__int64 *v17; // rdi
__int64 v18; // rbx
unsigned int v19; // eax
if ( a5 )
{
v8 = *(cocos2d::CCDictionary **)(a1 + 13904);
v9 = 1;
if ( a4 != 5 )
v9 = a3;
v10 = v9;
v11 = v9 + 100 * (a2 + 1000 * (a4 + 10));
v12 = cocos2d::CCDictionary::objectForKey(v8, v11);
if ( !v12 )
{
v13 = GJBaseGameLayer::parentForZLayer(a1, a2, v10, a4, 0);
v14 = v13;
if ( a4 == 4 )
{
v12 = (struct cocos2d::CCObject *)CCNodeContainer::create();
}
else
{
v15 = (struct cocos2d::CCTexture2D *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(v13 + 320) + 16LL))(v13 + 320);
v16 = cocos2d::CCSpriteBatchNode::createWithTexture(v15);
v12 = v16;
if ( v10 )
(**((void (__fastcall ***)(__int64, __int64))v16 + 40))((__int64)v16 + 320, 0x100000302LL);
}
cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 13904), v12, v11);
v17 = *(__int64 **)(a1 + 13912);
v18 = *v17;
v19 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v14 + 96LL))(v14);
(*(void (__fastcall **)(__int64 *, struct cocos2d::CCObject *, _QWORD))(v18 + 456))(v17, v12, v19);
}
return v12;
}
else if ( a4 == 5 )
{
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 4 )
{
if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
return *(struct cocos2d::CCObject **)(a1 + 2472);
else
return *(struct cocos2d::CCObject **)(a1 + 2584);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2696);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2808);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2968);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3080);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3192);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3304);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3416);
}
}
else if ( a4 == 4 )
{
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 3 )
{
if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
return *(struct cocos2d::CCObject **)(a1 + 2480);
else
return *(struct cocos2d::CCObject **)(a1 + 2592);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2704);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2816);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2976);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3088);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3200);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3312);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3424);
}
}
else if ( a3 )
{
switch ( a4 )
{
case 1:
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 3 )
{
if ( a2 == 4 )
{
return *(struct cocos2d::CCObject **)(a1 + 2944);
}
else if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
{
if ( a2 > 11 )
return *(struct cocos2d::CCObject **)(a1 + 2448);
else
return *(struct cocos2d::CCObject **)(a1 + 2560);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2672);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2784);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2896);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3056);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3168);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3280);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3392);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3504);
}
case 2:
if ( *(_BYTE *)(a1 + 4520) )
return *(struct cocos2d::CCObject **)(a1 + 2992);
if ( a2 <= -5 )
return *(struct cocos2d::CCObject **)(a1 + 3440);
if ( a2 <= -3 )
return *(struct cocos2d::CCObject **)(a1 + 3328);
if ( a2 <= -1 )
return *(struct cocos2d::CCObject **)(a1 + 3216);
if ( a2 <= 1 )
return *(struct cocos2d::CCObject **)(a1 + 3104);
if ( a2 <= 3 )
{
return *(struct cocos2d::CCObject **)(a1 + 2992);
}
else if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
return *(struct cocos2d::CCObject **)(a1 + 2496);
else
return *(struct cocos2d::CCObject **)(a1 + 2608);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2720);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2832);
}
case 3:
if ( *(_BYTE *)(a1 + 4520) )
return *(struct cocos2d::CCObject **)(a1 + 3008);
if ( a2 <= -5 )
return *(struct cocos2d::CCObject **)(a1 + 3456);
if ( a2 <= -3 )
return *(struct cocos2d::CCObject **)(a1 + 3344);
if ( a2 <= -1 )
return *(struct cocos2d::CCObject **)(a1 + 3232);
if ( a2 <= 1 )
return *(struct cocos2d::CCObject **)(a1 + 3120);
if ( a2 <= 3 )
{
return *(struct cocos2d::CCObject **)(a1 + 3008);
}
else if ( a2 == 4 )
{
return *(struct cocos2d::CCObject **)(a1 + 2920);
}
else if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
{
if ( a2 > 11 )
return *(struct cocos2d::CCObject **)(a1 + 2424);
else
return *(struct cocos2d::CCObject **)(a1 + 2512);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2624);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2736);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2848);
}
case 6:
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 3 )
{
if ( a2 == 4 )
{
return *(struct cocos2d::CCObject **)(a1 + 2928);
}
else if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
{
if ( a2 > 11 )
return *(struct cocos2d::CCObject **)(a1 + 2432);
else
return *(struct cocos2d::CCObject **)(a1 + 2528);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2640);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2752);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2864);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3024);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3136);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3248);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3360);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3472);
}
case 8:
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 3 )
{
if ( a2 == 4 )
{
return *(struct cocos2d::CCObject **)(a1 + 2936);
}
else if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
{
if ( a2 > 11 )
return *(struct cocos2d::CCObject **)(a1 + 2440);
else
return *(struct cocos2d::CCObject **)(a1 + 2544);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2656);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2768);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2880);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3040);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3152);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3264);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3376);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3488);
}
default:
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 3 )
{
if ( a2 == 4 )
{
return *(struct cocos2d::CCObject **)(a1 + 2912);
}
else if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
{
if ( a2 > 11 )
return *(struct cocos2d::CCObject **)(a1 + 2416);
else
return *(struct cocos2d::CCObject **)(a1 + 2464);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2576);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2688);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2800);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2960);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3072);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3184);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3296);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3408);
}
}
}
else
{
switch ( a4 )
{
case 1:
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 3 )
{
if ( a2 == 4 )
{
return *(struct cocos2d::CCObject **)(a1 + 2904);
}
else if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
return *(struct cocos2d::CCObject **)(a1 + 2552);
else
return *(struct cocos2d::CCObject **)(a1 + 2664);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2776);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2888);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3048);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3160);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3272);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3384);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3496);
}
case 2:
if ( *(_BYTE *)(a1 + 4520) )
return *(struct cocos2d::CCObject **)(a1 + 2984);
if ( a2 <= -5 )
return *(struct cocos2d::CCObject **)(a1 + 3432);
if ( a2 <= -3 )
return *(struct cocos2d::CCObject **)(a1 + 3320);
if ( a2 <= -1 )
return *(struct cocos2d::CCObject **)(a1 + 3208);
if ( a2 <= 1 )
return *(struct cocos2d::CCObject **)(a1 + 3096);
if ( a2 <= 3 )
{
return *(struct cocos2d::CCObject **)(a1 + 2984);
}
else if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
return *(struct cocos2d::CCObject **)(a1 + 2488);
else
return *(struct cocos2d::CCObject **)(a1 + 2600);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2712);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2824);
}
case 3:
if ( *(_BYTE *)(a1 + 4520) )
return *(struct cocos2d::CCObject **)(a1 + 3000);
if ( a2 <= -5 )
return *(struct cocos2d::CCObject **)(a1 + 3448);
if ( a2 <= -3 )
return *(struct cocos2d::CCObject **)(a1 + 3336);
if ( a2 <= -1 )
return *(struct cocos2d::CCObject **)(a1 + 3224);
if ( a2 <= 1 )
return *(struct cocos2d::CCObject **)(a1 + 3112);
if ( a2 <= 3 )
{
return *(struct cocos2d::CCObject **)(a1 + 3000);
}
else if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
return *(struct cocos2d::CCObject **)(a1 + 2504);
else
return *(struct cocos2d::CCObject **)(a1 + 2616);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2728);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2840);
}
case 6:
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 3 )
{
if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
return *(struct cocos2d::CCObject **)(a1 + 2520);
else
return *(struct cocos2d::CCObject **)(a1 + 2632);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2744);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2856);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3016);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3128);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3240);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3352);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3464);
}
case 8:
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 3 )
{
if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
return *(struct cocos2d::CCObject **)(a1 + 2536);
else
return *(struct cocos2d::CCObject **)(a1 + 2648);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2760);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2872);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3032);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3144);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3256);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3368);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3480);
}
default:
if ( a2 > -5 )
{
if ( a2 > -3 )
{
if ( a2 > -1 )
{
if ( a2 > 1 )
{
if ( a2 > 3 )
{
if ( a2 > 5 )
{
if ( a2 > 7 )
{
if ( a2 > 9 )
return *(struct cocos2d::CCObject **)(a1 + 2456);
else
return *(struct cocos2d::CCObject **)(a1 + 2568);
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2680);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2792);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 2952);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3064);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3176);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3288);
}
}
else
{
return *(struct cocos2d::CCObject **)(a1 + 3400);
}
}
}
}