//
// cocos2d::CCFileUtils::addSearchPath from 0x100151fc0 to 0x1001520c0 (256 bytes)
//
// 2 xrefs:
// > ??> @ 0x10079a450
// > ??> @ 0x1007c7d20
//
// 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 __fastcall cocos2d::CCFileUtils::addSearchPath(cocos2d::CCFileUtils *a1, const char *a2)
{
std::string::size_type size; // x9
std::string *p_p; // x8
std::string v5; // [xsp+8h] [xbp-58h] BYREF
std::string __p; // [xsp+20h] [xbp-40h] BYREF
std::string v7; // [xsp+38h] [xbp-28h] BYREF
memset(&v7, 0, sizeof(v7));
sub_100009900(&__p, (char *)a2);
if ( (((__int64 (__fastcall *)(cocos2d::CCFileUtils *, std::string *))a1->loadFilenameLookupDictionaryFromFile)(
a1,
&__p)
& 1) == 0 )
std::string::operator=(&v7, (const std::string *)&a1[8]);
sub_100151EF8(
(const void **)&v7.__r_.__value_.__l.__data_,
(const void **)&__p.__r_.__value_.__l.__data_,
(__int64)&v5);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
__p = v5;
if ( (SHIBYTE(v5.__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 *)&v5.__r_.__value_.__s + 23) )
goto LABEL_13;
size = SHIBYTE(v5.__r_.__value_.__r.__words[2]);
}
p_p = &__p;
if ( (v5.__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:
sub_100017238((__int64)&a1[5]);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( SHIBYTE(v7.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v7.__r_.__value_.__l.__data_);
}