//
// GameLevelManager::getHighestLevelOrder from 0x4aa700 to 0x4aa736 (54 bytes)
//
// 2 xrefs:
// > LevelInfoLayer::downloadLevel @ 0x49a03c
// > LevelInfoLayer::FLAlert_Clicked @ 0x49bbf4
//
// 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:49:58 +0000
//
int __fastcall GameLevelManager::getHighestLevelOrder(GameLevelManager *this)
{
int result; // r0
int v2; // r3
int v3; // r2
int v4; // r3
int v5; // r1
result = *((_DWORD *)this + 136);
if ( result )
{
v2 = *(_DWORD *)(result + 52);
if ( v2 )
v3 = *(_DWORD *)(v2 + 272);
else
v3 = 0;
result = 0;
while ( v2 )
{
v4 = *(_DWORD *)(*(_DWORD *)(v2 + 260) + 460);
if ( result < v4 )
result = v4;
if ( v3 )
v5 = *(_DWORD *)(v3 + 272);
else
v5 = 0;
v2 = v3;
v3 = v5;
}
}
return result;
}