//
// GJBaseGameLayer::playKeyframeAnimation from 0x5a591c to 0x5a5b84 (616 bytes)
//
// 1 xrefs:
// > EffectGameObject::triggerObject @ 0x4f505a
//
// 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:53:20 +0000
//
int __fastcall GJBaseGameLayer::playKeyframeAnimation(int a1, int a2, int a3)
{
cocos2d::CCObject *Group; // r0
_DWORD *v7; // r3
_DWORD *v8; // r8
unsigned int v9; // r4
unsigned int v10; // r7
unsigned int v11; // r2
unsigned int v12; // r6
_DWORD *v13; // r3
unsigned int v14; // r0
int v15; // r1
float v16; // s15
bool v17; // r6
unsigned int v18; // r6
unsigned int v19; // r1
void **v20; // r3
unsigned int v21; // r0
int v22; // r1
cocos2d::CCArray *v23; // r4
int MainObject; // r0
int v25; // r1
_DWORD *v26; // [sp+2Ch] [bp-48h]
_DWORD *v27; // [sp+30h] [bp-44h]
int v29; // [sp+48h] [bp-2Ch] BYREF
void *v30; // [sp+4Ch] [bp-28h] BYREF
int v31; // [sp+58h] [bp-1Ch] BYREF
unsigned int v32; // [sp+5Ch] [bp-18h]
void *v33; // [sp+60h] [bp-14h] BYREF
int v34; // [sp+64h] [bp-10h]
float v35; // [sp+68h] [bp-Ch]
Group = GJBaseGameLayer::getGroup((GJBaseGameLayer *)a1, *(_DWORD *)(a2 + 1472));
v31 = 0;
v32 = 0;
v33 = nullptr;
v34 = 0;
v35 = 1.0;
if ( Group )
{
v7 = *((_DWORD **)Group + 13);
if ( *v7 )
{
v26 = (_DWORD *)v7[3];
v27 = &v26[*v7 - 1];
while ( 1 )
{
while ( 1 )
{
if ( v26 <= v27 )
{
v8 = (_DWORD *)*v26++;
if ( v8 )
continue;
}
return std::__hash_table,std::equal_to,std::allocator>::~__hash_table((int)&v31);
if ( v8[223] == 3032 )
{
v29 = v8[414];
if ( !std::__hash_table,std::equal_to,std::allocator>::find(
&v31,
(unsigned int *)&v29) )
break;
}
}
v9 = v32;
v10 = v29;
if ( v32 )
{
v11 = v32 - 1;
if ( ((v32 - 1) & v32) != 0 )
{
v11 = v32 - 1;
v12 = v29 % v32;
}
else
{
v12 = v11 & v29;
}
v13 = *(_DWORD **)(v31 + 4 * v12);
if ( v13 )
{
while ( 1 )
{
v13 = (_DWORD *)*v13;
if ( !v13 )
break;
v14 = v13[1];
v15 = ((v32 - 1) & v32) != 0 ? v14 % v32 : v11 & v14;
if ( v15 != v12 )
break;
if ( v13[2] == v29 )
goto LABEL_37;
}
}
}
else
{
v12 = 0;
}
std::__hash_table,std::equal_to,std::allocator>::__construct_node_hash(
(int)&v30,
(int)&v31,
v29,
&v29);
v16 = (float)(unsigned int)(v34 + 1);
if ( v16 > (float)((float)v9 * v35) )
break;
if ( !v9 )
{
v17 = 0;
LABEL_24:
v18 = 2 * v9 + !v17;
v19 = (unsigned int)ceilf(v16 / v35);
if ( v19 < v18 )
v19 = v18;
std::__hash_table,std::equal_to,std::allocator>::rehash((int)&v31, v19);
v9 = v32;
if ( ((v32 - 1) & v32) != 0 )
v12 = v10 % v32;
else
v12 = (v32 - 1) & v10;
}
v20 = *(void ***)(v31 + 4 * v12);
if ( v20 )
{
*(_DWORD *)v30 = *v20;
*v20 = v30;
}
else
{
*(_DWORD *)v30 = v33;
v33 = v30;
*(_DWORD *)(v31 + 4 * v12) = &v33;
if ( *(_DWORD *)v30 )
{
v21 = *(_DWORD *)(*(_DWORD *)v30 + 4);
if ( ((v9 - 1) & v9) != 0 )
v22 = v21 % v9;
else
v22 = (v9 - 1) & v21;
*(_DWORD *)(v31 + 4 * v22) = v30;
}
}
++v34;
LABEL_37:
v23 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 11232), v29);
MainObject = GJBaseGameLayer::tryGetMainObject((cocos2d::CCDictionary **)a1, *(_DWORD *)(a2 + 1288));
v25 = *(_DWORD *)(a2 + 1284);
if ( !v25 )
v25 = v8[321];
GJEffectManager::createKeyframeCommand(
*(_DWORD *)(a1 + 1524),
v25,
v23,
MainObject,
*(_DWORD *)(a2 + 780),
*(_DWORD *)(a2 + 1492),
0,
*(float *)(a2 + 1652),
*(float *)(a2 + 1656),
*(float *)(a2 + 1660),
*(float *)(a2 + 1664),
*(float *)(a2 + 1668),
*(float *)(a2 + 1648),
a3);
}
v17 = v9 > 2 && ((v9 - 1) & v9) == 0;
goto LABEL_24;
}
}
return std::__hash_table,std::equal_to,std::allocator>::~__hash_table((int)&v31);
}