//
// GameManager::getNextUniqueObjectKey from 0x100319208 to 0x100319278 (112 bytes)
//
// 1 xrefs:
// > GameManager::addNewCustomObject @ 0x1003193b4
//
// 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 __fastcall GameManager::getNextUniqueObjectKey(GameManager *a1)
{
cocos2d::CCArray *OrderedCustomObjectKeys; // x0
cocos2d::ccArray *data; // x9
__int64 num; // x8
int v4; // w19
cocos2d::CCString **arr; // x20
unsigned __int64 v6; // x21
int v7; // w0
OrderedCustomObjectKeys = GameManager::getOrderedCustomObjectKeys(a1);
if ( !OrderedCustomObjectKeys )
return -1;
data = OrderedCustomObjectKeys->data;
num = data->num;
if ( !(_DWORD)num )
return -1;
v4 = 0;
arr = (cocos2d::CCString **)data->arr;
v6 = (unsigned __int64)&arr[num - 1];
do
{
if ( !*arr )
break;
v7 = cocos2d::CCString::intValue(*arr);
if ( v7 < v4 )
v4 = v7;
++arr;
}
while ( (unsigned __int64)arr <= v6 );
return v4 - 1;
}