//
// cocos2d::CCArray::randomObject from 0x7c9028 to 0x7c9072 (74 bytes)
//
// 3 xrefs:
// > LevelTools::sortSpeedObjects @ 0x41f824
// > CurrencyRewardLayer::createObjectsFull @ 0x60511e
// > cocos2d::CCDictionary::randomObject @ 0x7c7c6e
//
// 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 12:00:28 +0000
//
int __fastcall cocos2d::CCArray::randomObject(cocos2d::CCArray *this)
{
int result; // r0
float v3; // s14
result = **((_DWORD **)this + 13);
if ( result )
{
v3 = vcvts_n_f32_s32(rand(), 0x1Fu);
if ( v3 == 1.0 )
v3 = 0.0;
return *(_DWORD *)(*(_DWORD *)(*((_DWORD *)this + 13) + 12)
+ 4 * (int)(float)((float)**((unsigned int **)this + 13) * v3));
}
return result;
}