//
// SecretLayer4::selectAThread from 0x620dd8 to 0x620e68 (144 bytes)
//
// 1 xrefs:
// > SecretLayer4::getMessage @ 0x6224b0
//
// 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:55:05 +0000
//
int __fastcall SecretLayer4::selectAThread(SecretLayer4 *this)
{
cocos2d::CCArray *v2; // r0
int v3; // r3
cocos2d::CCArray *v4; // r6
unsigned int v5; // r5
bool v6; // cf
cocos2d::CCDictionary *v7; // r0
int result; // r0
int v9; // r0
int v10; // r0
v2 = (cocos2d::CCArray *)cocos2d::CCDictionary::allKeys(*((cocos2d::CCDictionary **)this + 91));
v3 = *((_DWORD *)this + 82);
v4 = v2;
if ( v3 >= 0 )
{
*((_DWORD *)this + 82) = v3 + 1;
}
else
{
cocos2d::CCArray::count(v2);
rand();
*((_DWORD *)this + 82) = lroundf();
}
v5 = *((_DWORD *)this + 82);
v6 = v5 >= cocos2d::CCArray::count(v4);
v7 = *((cocos2d::CCDictionary **)this + 91);
if ( v6 )
*((_DWORD *)this + 82) = 0;
result = cocos2d::CCDictionary::count(v7);
if ( result )
{
v9 = cocos2d::CCArray::objectAtIndex(v4, *((_DWORD *)this + 82));
v10 = cocos2d::CCDictionary::objectForKey(*((cocos2d::CCDictionary **)this + 91), *(_DWORD *)(v9 + 52));
result = (*(int (__fastcall **)(int))(*(_DWORD *)v10 + 32))(v10);
*((_DWORD *)this + 84) = result;
}
*((_DWORD *)this + 85) = 0;
return result;
}