//
// cocos2d::CCFileUtils::fullPathFromRelativeFile from 0x100151988 to 0x100151aa8 (288 bytes)
//
// 2 xrefs:
// > ??> @ 0x10079a428
// > ??> @ 0x1007c7cf8
//
// 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
//
const char *__fastcall cocos2d::CCFileUtils::fullPathFromRelativeFile(
cocos2d::CCFileUtils *a1,
const char *a2,
const char *a3)
{
__int64 v5; // x19
std::string::size_type v6; // x0
std::string *p_p; // x1
std::string::size_type size; // x2
const char *CString; // x19
std::string __p; // [xsp+8h] [xbp-58h] BYREF
std::string __str; // [xsp+20h] [xbp-40h] BYREF
std::allocator __a; // [xsp+3Fh] [xbp-21h] BYREF
sub_100009900(&__str, (char *)a3);
sub_100009900(&__p, "");
v5 = sub_100268E48(&__p);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
v6 = std::string::rfind(&__str, 47, 0xFFFFFFFFFFFFFFFFLL);
std::string::basic_string(&__p, &__str, 0, v6 + 1, &__a);
if ( *(char *)(v5 + 79) < 0 )
operator delete(*(void **)(v5 + 56));
*(std::string *)(v5 + 56) = __p;
((void (__fastcall *)(std::string *__return_ptr, cocos2d::CCFileUtils *, const char *))a1->setFilenameLookupDictionary)(
&__p,
a1,
a2);
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
p_p = &__p;
else
p_p = (std::string *)__p.__r_.__value_.__r.__words[0];
if ( (__p.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL )
size = HIBYTE(__p.__r_.__value_.__r.__words[2]);
else
size = __p.__r_.__value_.__l.__size_;
std::string::append((std::string *)(v5 + 56), (const std::string::value_type *)p_p, size);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
CString = cocos2d::CCString::getCString((cocos2d::CCString *)v5);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
return CString;
}