//
// cocos2d::CCFileUtils::removeSearchPath from 0x5dee10 to 0x5def78 (360 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void cocos2d::CCFileUtils::removeSearchPath(cocos2d::CCFileUtils *a1, const char *a2)
{
int v3; // r4
cocos2d::CCFileUtils_vtbl *v4; // r6
cocos2d::CCFileUtils_vtbl *v5; // r10
int i; // r11
const void **p_addSearchPath; // r4
int v8; // r3
cocos2d::CCFileUtils_vtbl *v9; // r4
cocos2d::CCFileUtils_vtbl *v10; // r0
int j; // r6
void *v12; // [sp+0h] [bp-14h] BYREF
_DWORD *v13; // [sp+4h] [bp-10h] BYREF
_BYTE v14[4]; // [sp+8h] [bp-Ch] BYREF
v12 = &unk_ACDDA8;
sub_776584((int)&v13, (char *)a2);
if ( !((int (__fastcall *)(cocos2d::CCFileUtils *, _DWORD **))a1->loadFilenameLookupDictionaryFromFile)(a1, &v13) )
sub_775D40(&v12, &a1[8]);
sub_775C20(v14);
sub_77441C(v14, &v13);
sub_774794(&v13, v14);
sub_774008(v14);
v3 = *(v13 - 3);
if ( v3 )
{
sub_775170(&v13);
if ( *((_BYTE *)v13 + v3 - 1) != 47 )
sub_774394((int)&v13, "/");
}
v4 = a1[6].__vftable;
v5 = a1[5].__vftable;
for ( i = ((char *)v4 - (char *)v5) >> 4; i > 0; --i )
{
if ( std::operator==((const void **)&v5->getClassTypeInfo, (const void **)&v13) )
goto LABEL_25;
p_addSearchPath = (const void **)&v5->~CCFileUtils;
if ( std::operator==((const void **)&v5->~CCFileUtils, (const void **)&v13) )
goto LABEL_26;
p_addSearchPath = (const void **)&v5->~CCFileUtils_0;
if ( std::operator==((const void **)&v5->~CCFileUtils_0, (const void **)&v13) )
goto LABEL_26;
p_addSearchPath = (const void **)&v5->addSearchPath;
if ( std::operator==((const void **)&v5->addSearchPath, (const void **)&v13) )
goto LABEL_26;
v5 = (cocos2d::CCFileUtils_vtbl *)((char *)v5 + 16);
}
p_addSearchPath = (const void **)&v5->getClassTypeInfo;
v8 = ((char *)v4 - (char *)v5) >> 2;
if ( v8 != 2 )
{
if ( v8 != 3 )
{
if ( v8 != 1 )
{
p_addSearchPath = (const void **)&v4->getClassTypeInfo;
goto LABEL_26;
}
goto LABEL_21;
}
if ( std::operator==((const void **)&v5->getClassTypeInfo, (const void **)&v13) )
{
LABEL_25:
p_addSearchPath = (const void **)&v5->getClassTypeInfo;
goto LABEL_26;
}
p_addSearchPath = (const void **)&v5->~CCFileUtils;
}
if ( std::operator==(p_addSearchPath, (const void **)&v13) )
goto LABEL_26;
++p_addSearchPath;
LABEL_21:
if ( !std::operator==(p_addSearchPath, (const void **)&v13) )
p_addSearchPath = (const void **)&v4->getClassTypeInfo;
LABEL_26:
v9 = (cocos2d::CCFileUtils_vtbl *)(p_addSearchPath + 1);
if ( v9 != v4 )
{
for ( j = ((char *)v4 - (char *)v9) >> 2; j > 0; --j )
{
sub_774794(&v9[-1].writeToFile, v9);
v9 = (cocos2d::CCFileUtils_vtbl *)((char *)v9 + 4);
}
}
v10 = (cocos2d::CCFileUtils_vtbl *)((char *)a1[6].__vftable - 4);
a1[6].__vftable = v10;
sub_774008(v10);
sub_774008(&v13);
sub_774008(&v12);
}