//
// GJBaseGameLayer::resetSpawnChannelIndex from 0x5a8df0 to 0x5a8e5e (110 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::onPlaytest @ 0x4683a2
// > LevelEditorLayer::updateGameObjects @ 0x46cc72
// > GJBaseGameLayer::resetLevelVariables @ 0x5b99da
//
// 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:23 +0000
//
unsigned int __fastcall GJBaseGameLayer::resetSpawnChannelIndex(GJBaseGameLayer *this, unsigned int a2)
{
unsigned int v3; // r4
char *v4; // r10
cocos2d::CCArray *v5; // r7
unsigned int result; // r0
int v7; // r0
unsigned int v8[2]; // [sp+0h] [bp-8h] BYREF
v8[0] = (unsigned int)this;
v8[1] = a2;
v3 = 0;
*((_DWORD *)this + 183) = 0;
v4 = (char *)this + 740;
v5 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*((cocos2d::CCDictionary **)this + 526));
while ( 1 )
{
result = cocos2d::CCArray::count(v5);
if ( v3 >= result )
break;
v7 = cocos2d::CCArray::objectAtIndex(v5, v3++);
v8[0] = *(_DWORD *)(v7 + 52);
*std::unordered_map::operator[]((int)v4, v8) = 0;
*(_BYTE *)std::unordered_map::operator[]((int)this + 760, v8) = 0;
}
return result;
}