//
// cocos2d::CCFileUtils::setSearchPaths from 0x7e95dc to 0x7e97ca (494 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:57 +0000
//
int *__fastcall cocos2d::CCFileUtils::setSearchPaths(int *a1, unsigned __int8 **a2)
{
int *v4; // r4
int *result; // r0
int v6; // r0
unsigned __int8 *v7; // r8
int v8; // r4
int v9; // r2
int v10; // r0
size_t v11; // r1
char *v12; // r2
int v13; // r2
int v14; // r1
int v15; // r1
char *v16; // r2
size_t v17; // r2
int v18; // r1
int v19; // r3
int v20; // r1
char *v21; // r0
unsigned __int8 *v22; // r1
char *v23; // r0
unsigned __int8 *v24; // r2
int v25; // t1
int *v26; // r0
int v27; // r1
_DWORD v28[3]; // [sp+8h] [bp-2Ch] BYREF
int v29; // [sp+14h] [bp-20h] BYREF
size_t v30; // [sp+18h] [bp-1Ch]
char *v31; // [sp+1Ch] [bp-18h]
int v32; // [sp+20h] [bp-14h] BYREF
size_t v33; // [sp+24h] [bp-10h]
char *v34; // [sp+28h] [bp-Ch]
std::__tree,std::__map_value_compare,std::less,true>,std::allocator>>::destroy(
(int)(a1 + 11),
(_DWORD *)a1[12]);
v4 = (int *)a1[5];
a1[13] = 0;
a1[11] = (int)(a1 + 12);
a1[12] = 0;
while ( 1 )
{
result = (int *)a1[6];
if ( v4 == result )
break;
v6 = (int)(result - 3);
a1[6] = v6;
std::string::~string(v6);
}
v7 = *a2;
v8 = 0;
while ( v7 != a2[1] )
{
v9 = *a1;
memset(v28, 0, sizeof(v28));
v29 = 0;
v30 = 0;
v31 = nullptr;
if ( !(*(int (__fastcall **)(int *, unsigned __int8 *))(v9 + 84))(a1, v7) )
std::string::operator=((unsigned __int8 *)v28, (unsigned __int8 *)a1 + 32);
std::operator+(&v32, (unsigned __int8 *)v28, v7);
if ( (v29 & 1) != 0 )
{
*v31 = 0;
v30 = 0;
}
else
{
LOWORD(v29) = 0;
}
std::string::reserve(&v29, 0);
v10 = v32;
v11 = v33;
v12 = v34;
v32 = 0;
v33 = 0;
v34 = nullptr;
v29 = v10;
v30 = v11;
v31 = v12;
std::string::~string((int)&v32);
v13 = (unsigned __int8)v29;
if ( (v29 & 1) != 0 )
{
v14 = v30;
if ( !v30 )
{
if ( v8 )
goto LABEL_44;
v8 = v29 & 1;
goto LABEL_23;
}
}
else
{
v14 = (int)(unsigned __int8)v29 >> 1;
if ( !v14 )
{
if ( v8 )
goto LABEL_44;
goto LABEL_25;
}
}
v15 = v14 - 1;
if ( (v29 & 1) != 0 )
v16 = v31;
else
v16 = (char *)&v29 + 1;
if ( v16[v15] != 47 )
std::string::append(&v29, "/");
if ( v8 )
goto LABEL_44;
v13 = (unsigned __int8)v29;
v8 = v29 & 1;
if ( v8 )
{
v8 = 1;
LABEL_23:
v17 = v30;
goto LABEL_26;
}
LABEL_25:
v17 = v13 >> 1;
LABEL_26:
v18 = *((unsigned __int8 *)a1 + 32);
v19 = v18 & 1;
if ( (v18 & 1) != 0 )
v20 = a1[9];
else
v20 = v18 >> 1;
if ( v17 == v20 )
{
if ( v8 )
v21 = v31;
else
v21 = (char *)&v29 + 1;
if ( v19 )
v22 = (unsigned __int8 *)a1[10];
else
v22 = (unsigned __int8 *)a1 + 33;
if ( v8 )
{
v8 = std::char_traits::compare(v21, v22, v17) == 0;
}
else
{
v23 = v21 - 1;
v24 = &v22[v17];
while ( v22 != v24 )
{
v25 = (unsigned __int8)*++v23;
if ( v25 != *v22 )
goto LABEL_43;
++v22;
}
v8 = 1;
}
}
else
{
LABEL_43:
v8 = 0;
}
LABEL_44:
v26 = (int *)a1[6];
if ( v26 == (int *)a1[7] )
{
std::vector::__push_back_slow_path(a1 + 5, (int)&v29);
}
else
{
if ( v26 )
std::string::basic_string(v26, (int)&v29);
a1[6] += 12;
}
v7 += 12;
std::string::~string((int)&v29);
result = (int *)std::string::~string((int)v28);
}
if ( !v8 )
{
result = (int *)a1[6];
v27 = (int)(a1 + 8);
if ( result == (int *)a1[7] )
{
return (int *)std::vector::__push_back_slow_path(a1 + 5, v27);
}
else
{
if ( result )
result = std::string::basic_string(result, v27);
a1[6] += 12;
}
}
return result;
}