//
// cocos2d::CCFileUtils::removeSearchPath from 0x1001d0c64 to 0x1001d0db0 (332 bytes)
//
// 2 xrefs:
// > ??> @ 0x1008ef8a0
// > ??> @ 0x100920368
//
// 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:00:22 +0000
//
void __fastcall cocos2d::CCFileUtils::removeSearchPath(__int64 a1, char *a2)
{
std::string::size_type size; // x9
std::string *p_p; // x8
__int64 v5; // x0
void **v6; // x1
void **v7; // x20
void **v8; // x21
int v9; // w8
std::string v10; // [xsp+8h] [xbp-68h] BYREF
std::string __p; // [xsp+20h] [xbp-50h] BYREF
std::string v12; // [xsp+38h] [xbp-38h] BYREF
memset(&v12, 0, sizeof(v12));
sub_100009900(&__p, a2);
if ( ((*(__int64 (__fastcall **)(__int64, std::string *))(*(_QWORD *)a1 + 168LL))(a1, &__p) & 1) == 0 )
std::string::operator=(&v12, (const std::string *)(a1 + 64));
sub_10011E060(
(const void **)&v12.__r_.__value_.__l.__data_,
(const void **)&__p.__r_.__value_.__l.__data_,
(__int64)&v10);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
__p = v10;
if ( (SHIBYTE(v10.__r_.__value_.__r.__words[2]) & 0x8000000000000000LL) != 0 )
{
size = __p.__r_.__value_.__l.__size_;
if ( !__p.__r_.__value_.__l.__size_ )
goto LABEL_13;
}
else
{
if ( !*((_BYTE *)&v10.__r_.__value_.__s + 23) )
goto LABEL_13;
size = SHIBYTE(v10.__r_.__value_.__r.__words[2]);
}
p_p = &__p;
if ( (v10.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
if ( p_p->__r_.__value_.__s.__data_[size - 1] != 47 )
std::string::append(&__p, "/");
LABEL_13:
v5 = sub_1001D1270(*(_QWORD *)(a1 + 40), *(_QWORD *)(a1 + 48), &__p, &v10);
sub_1001D1300(&v10, v5 + 24, *(_QWORD *)(a1 + 48));
v7 = v6;
v8 = *(void ***)(a1 + 48);
while ( v8 != v7 )
{
v9 = *((char *)v8 - 1);
v8 -= 3;
if ( v9 < 0 )
operator delete(*v8);
}
*(_QWORD *)(a1 + 48) = v7;
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( SHIBYTE(v12.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v12.__r_.__value_.__l.__data_);
}