//
// GameManager::getNextUsedKey from 0x7174e0 to 0x717594 (180 bytes)
//
// 2 xrefs:
// > GameManager::reorderKey @ 0x7188bc
// > ??> @ 0x605c8
//
// This function is hookable on this platform (idp: arm, 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:52:16 +0000
//
__int64 __fastcall GameManager::getNextUsedKey(cocos2d::CCDictionary **this, int a2, unsigned __int8 a3)
{
int v4; // w23
unsigned int v5; // w19
unsigned int v6; // w21
cocos2d::CCArray *OrderedCustomObjectKeys; // x20
cocos2d::CCString *v8; // x0
unsigned int v9; // w0
__int64 result; // x0
unsigned int v11; // w19
cocos2d::CCString *v12; // x0
v4 = a3;
v5 = 0;
v6 = 0;
OrderedCustomObjectKeys = GameManager::getOrderedCustomObjectKeys(this);
while ( 1 )
{
if ( v5 >= (unsigned int)cocos2d::CCArray::count(OrderedCustomObjectKeys) )
return 0;
v8 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(OrderedCustomObjectKeys, v5);
v9 = cocos2d::CCString::intValue(v8);
if ( v9 == a2 )
break;
++v5;
v6 = v9;
}
result = v6;
if ( !v4 )
{
v11 = v5 + 1;
if ( v11 >= (unsigned int)cocos2d::CCArray::count(OrderedCustomObjectKeys) )
return 0;
v12 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(OrderedCustomObjectKeys, v11);
return cocos2d::CCString::intValue(v12);
}
return result;
}