//
// sub_1003B6344 from 0x1003b6344 to 0x1003b6418 (212 bytes)
//
// 1 xrefs:
// > sub_1003B656C @ 0x1003b6584
//
// 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 11:03:56 +0000
//
__int64 __fastcall sub_1003B6344(__int64 a1, int a2, char a3)
{
__int64 v3; // x23
__int64 OrderedCustomObjectKeys; // x21
unsigned int v7; // w22
__int64 v8; // x25
__int64 v9; // x0
unsigned int v10; // w0
unsigned int v11; // w24
__int64 v12; // x26
__int64 v13; // x0
OrderedCustomObjectKeys = GameManager::getOrderedCustomObjectKeys(a1);
if ( !(unsigned int)sub_1002E757C(OrderedCustomObjectKeys) )
return 0;
v7 = 0;
v8 = 0;
while ( 1 )
{
v9 = cocos2d::CCArray::stringAtIndex(OrderedCustomObjectKeys, v7);
v10 = cocos2d::CCString::intValue(v9);
v11 = v10;
if ( v10 == a2 )
v12 = (unsigned int)v8;
else
v12 = v10;
if ( v10 == a2 )
v3 = (unsigned int)v8;
else
v3 = (unsigned int)v3;
if ( v10 == a2 && (a3 & 1) == 0 )
{
if ( v7 + 1 >= (unsigned int)sub_1002E757C(OrderedCustomObjectKeys) )
{
v3 = 0;
}
else
{
v13 = cocos2d::CCArray::stringAtIndex(OrderedCustomObjectKeys, v7 + 1);
v3 = cocos2d::CCString::intValue(v13);
}
v12 = v8;
}
if ( v11 == a2 )
break;
++v7;
v8 = v12;
if ( v7 >= (unsigned int)sub_1002E757C(OrderedCustomObjectKeys) )
return 0;
}
return v3;
}