//
// GJBaseGameLayer::resetSpawnChannelIndex from 0x100139640 to 0x100139724 (228 bytes)
//
// 3 xrefs:
// > LevelEditorLayer::updateGameObjects @ 0x1000ad196
// > LevelEditorLayer::onPlaytest @ 0x1000c5e81
// > GJBaseGameLayer::resetLevelVariables @ 0x100138e6f
//
// 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 12:24:52 +0000
//
__int64 __fastcall GJBaseGameLayer::resetSpawnChannelIndex(__int64 a1, __m128 a2)
{
__int64 v2; // r14
__int64 result; // rax
unsigned int v4; // r12d
int v5; // [rsp+14h] [rbp-3Ch] BYREF
int *v6; // [rsp+18h] [rbp-38h] BYREF
_BYTE v7[41]; // [rsp+27h] [rbp-29h] BYREF
*(_DWORD *)(a1 + 828) = 0;
v2 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 3312));
result = sub_1007FEF90(v2);
if ( (_DWORD)result )
{
v4 = 0;
do
{
v5 = *(_DWORD *)(sub_1007FEFE0(v2, v4) + 56);
v6 = &v5;
*((_DWORD *)sub_10001C2C0((float *)(a1 + 840), &v5, a2, (__int64)&unk_100A04ED8, &v6) + 5) = 0;
v6 = &v5;
*(_BYTE *)(sub_100147B80(a1 + 880, &v5, &unk_100A04ED8, &v6, v7) + 20) = 0;
++v4;
result = sub_1007FEF90(v2);
}
while ( v4 < (unsigned int)result );
}
return result;
}