//
// cocos2d::CCFileUtils::addSearchPath from 0x7e94cc to 0x7e95d2 (262 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::addSearchPath(cocos2d::CCFileUtils *this, const char *a2)
{
size_t v4; // r0
int v5; // r0
int v6; // r1
char *v7; // r2
int v8; // r3
int v9; // r3
char *v10; // r2
int *v11; // r0
_DWORD v13[3]; // [sp+0h] [bp-28h] BYREF
int v14; // [sp+Ch] [bp-1Ch] BYREF
int v15; // [sp+10h] [bp-18h]
char *v16; // [sp+14h] [bp-14h]
int v17; // [sp+18h] [bp-10h] BYREF
int v18; // [sp+1Ch] [bp-Ch]
char *v19; // [sp+20h] [bp-8h]
memset(v13, 0, sizeof(v13));
v14 = 0;
v15 = 0;
v16 = nullptr;
v4 = strlen(a2);
std::string::__init(&v14, a2, v4);
if ( !(*(int (__fastcall **)(cocos2d::CCFileUtils *, int *))(*(_DWORD *)this + 84))(this, &v14) )
std::string::operator=((unsigned __int8 *)v13, (unsigned __int8 *)this + 32);
std::operator+(&v17, (unsigned __int8 *)v13, (unsigned __int8 *)&v14);
if ( (v14 & 1) != 0 )
{
*v16 = 0;
v15 = 0;
}
else
{
LOWORD(v14) = 0;
}
std::string::reserve(&v14, 0);
v5 = v17;
v6 = v18;
v7 = v19;
v17 = 0;
v18 = 0;
v19 = nullptr;
v14 = v5;
v15 = v6;
v16 = v7;
std::string::~string((int)&v17);
if ( (v14 & 1) != 0 )
{
v8 = v15;
if ( !v15 )
goto LABEL_15;
}
else
{
v8 = (int)(unsigned __int8)v14 >> 1;
if ( !v8 )
goto LABEL_15;
}
v9 = v8 - 1;
if ( (v14 & 1) != 0 )
v10 = v16;
else
v10 = (char *)&v14 + 1;
if ( v10[v9] != 47 )
std::string::append(&v14, "/");
LABEL_15:
v11 = *((int **)this + 6);
if ( v11 == *((int **)this + 7) )
{
std::vector::__push_back_slow_path((int *)this + 5, (int)&v14);
}
else
{
if ( v11 )
std::string::basic_string(v11, (int)&v14);
*((_DWORD *)this + 6) += 12;
}
std::string::~string((int)&v14);
return std::string::~string((int)v13);
}