//
// GameManager::getNextUniqueObjectKey from 0x5ed734 to 0x5ed7d0 (156 bytes)
//
// 2 xrefs:
// > GameManager::addNewCustomObject @ 0x5ed800
// > ??> @ 0x839e8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int GameManager::getNextUniqueObjectKey(GameManager *a1)
{
cocos2d::CCArray *OrderedCustomObjectKeys; // x0
cocos2d::ccArray *data; // x2
int v3; // w1
cocos2d::CCString **arr; // x19
cocos2d::CCString **v5; // x21
cocos2d::CCString *v6; // x0
int v7; // w20
int v8; // w0
OrderedCustomObjectKeys = GameManager::getOrderedCustomObjectKeys(a1);
if ( !OrderedCustomObjectKeys )
return -1;
data = OrderedCustomObjectKeys->data;
v3 = -1;
if ( data->num )
{
arr = (cocos2d::CCString **)data->arr;
v5 = &arr[data->num - 1];
if ( arr <= v5 )
{
v6 = *arr;
v7 = 0;
if ( *arr )
{
do
{
v8 = cocos2d::CCString::intValue(v6);
++arr;
if ( v7 > v8 )
v7 = v8;
if ( v5 < arr )
break;
v6 = *arr;
}
while ( *arr );
return v7 - 1;
}
}
}
return v3;
}