//
// cocos2d::CCFileUtils::setSearchResolutionsOrder from 0x7e803c to 0x7e8182 (326 bytes)
//
// 0 xrefs:
//
// 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:56 +0000
//
int __fastcall cocos2d::CCFileUtils::setSearchResolutionsOrder(int a1, int *a2)
{
int v4; // r5
int result; // r0
int v6; // r0
_BOOL4 v7; // r6
int i; // r8
int v9; // r5
int v10; // r2
int v11; // r5
int v12; // r5
char *v13; // r2
int *v14; // r0
_DWORD *v15; // r7
int v16; // r1
char *v17; // r2
int v18; // [sp+10h] [bp-14h] BYREF
int v19; // [sp+14h] [bp-10h]
char *v20; // [sp+18h] [bp-Ch]
std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy(
a1 + 44,
*(_DWORD **)(a1 + 48));
v4 = *(_DWORD *)(a1 + 8);
*(_DWORD *)(a1 + 52) = 0;
*(_DWORD *)(a1 + 44) = a1 + 48;
*(_DWORD *)(a1 + 48) = 0;
while ( 1 )
{
result = *(_DWORD *)(a1 + 12);
if ( v4 == result )
break;
v6 = result - 12;
*(_DWORD *)(a1 + 12) = v6;
std::string::~string(v6);
}
v7 = 0;
for ( i = *a2; i != a2[1]; i += 12 )
{
std::string::basic_string(&v18, i);
v9 = (unsigned __int8)v18;
if ( !v7 )
{
v10 = v18 & 1;
if ( v10 )
{
if ( v19 )
goto LABEL_14;
}
else if ( (unsigned __int8)v18 >> 1 )
{
v10 = 0;
goto LABEL_17;
}
v7 = std::string::compare((unsigned __int8 *)&v18, 0, 0xFFFFFFFF, &unk_B6B226, 0) == 0;
}
v10 = v9 & 1;
if ( (v9 & 1) != 0 )
{
v10 = 1;
LABEL_14:
v11 = v19;
if ( !v19 )
goto LABEL_23;
goto LABEL_18;
}
LABEL_17:
v11 = v9 >> 1;
if ( !v11 )
goto LABEL_23;
LABEL_18:
v12 = v11 - 1;
if ( v10 )
v13 = v20;
else
v13 = (char *)&v18 + 1;
if ( v13[v12] != 47 )
std::string::append(&v18, "/");
LABEL_23:
v14 = *(int **)(a1 + 12);
if ( v14 == *(int **)(a1 + 16) )
{
std::vector::__push_back_slow_path((int *)(a1 + 8), (int)&v18);
}
else
{
if ( v14 )
std::string::basic_string(v14, (int)&v18);
*(_DWORD *)(a1 + 12) += 12;
}
result = std::string::~string((int)&v18);
}
if ( !v7 )
{
v18 = 0;
v19 = 0;
v20 = nullptr;
std::string::__init(&v18, &unk_B6B226, 0);
v15 = *(_DWORD **)(a1 + 12);
if ( (unsigned int)v15 >= *(_DWORD *)(a1 + 16) )
{
std::vector::__push_back_slow_path((void **)(a1 + 8), &v18);
}
else
{
if ( v15 )
{
v16 = v19;
v17 = v20;
*v15 = v18;
v15[1] = v16;
v15[2] = v17;
v18 = 0;
v19 = 0;
v20 = nullptr;
}
*(_DWORD *)(a1 + 12) += 12;
}
return std::string::~string((int)&v18);
}
return result;
}