//
// GJBaseGameLayer::generateSpawnRemap from 0x5bf6fc to 0x5bf7da (222 bytes)
//
// 2 xrefs:
// > LevelEditorLayer::getLevelString @ 0x472602
// > GJBaseGameLayer::updateSpecialGroupData @ 0x5c14fc
//
// 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:46 +0000
//
int __fastcall GJBaseGameLayer::generateSpawnRemap(GJBaseGameLayer *this)
{
_DWORD *v2; // r6
_DWORD *v3; // r0
int v4; // r0
int result; // r0
int v6; // r3
_DWORD *v7; // r2
int v8; // r3
int *v9; // r2
unsigned int v10; // r5
int *v11; // r8
int v12; // r6
int v13; // t1
int v14[5]; // [sp+0h] [bp-18h] BYREF
v2 = *((_DWORD **)this + 373);
while ( 1 )
{
v3 = *((_DWORD **)this + 374);
if ( v2 == v3 )
break;
v4 = (int)(v3 - 5);
*((_DWORD *)this + 374) = v4;
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::~__hash_table(v4);
}
memset(v14, 0, 16);
v14[4] = 1065353216;
if ( (unsigned int)v2 >= *((_DWORD *)this + 375) )
{
std::vector>::__push_back_slow_path>(
(int **)this + 373,
v14);
}
else
{
if ( v2 )
std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::__hash_table(
v2,
v14);
*((_DWORD *)this + 374) += 20;
}
result = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::~__hash_table((int)v14);
v6 = *((_DWORD *)this + 522);
if ( v6 )
{
v7 = *(_DWORD **)(v6 + 52);
if ( *v7 )
{
v8 = *v7 + 0x40000000;
v9 = (int *)v7[3];
v10 = (unsigned int)&v9[v8 - 1];
v11 = v9;
while ( (unsigned int)v11 <= v10 )
{
v13 = *v11++;
v12 = v13;
if ( !v13 )
break;
if ( *(_DWORD *)(v12 + 892) == 1268 )
{
if ( *(_DWORD *)(v12 + 1648) == *(_DWORD *)(v12 + 1652) )
{
*(_DWORD *)(v12 + 1660) = 0;
}
else
{
result = GJBaseGameLayer::registerSpawnRemap((int)this, (unsigned int **)(v12 + 1648));
*(_DWORD *)(v12 + 1660) = result;
}
}
}
}
}
return result;
}