//
// cocos2d::CCFileUtils::getFullPathForDirectoryAndFilename from 0x10042b540 to 0x10042b68c (332 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b41ea0
//
// This function is hookable on this platform (idp: pc, 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 12:30:19 +0000
//
std::string *__fastcall cocos2d::CCFileUtils::getFullPathForDirectoryAndFilename(
std::string *this,
__int64 a2,
unsigned __int8 *a3,
unsigned __int8 *a4)
{
unsigned int v5; // edi
size_t v6; // r14
unsigned int v7; // eax
size_t v8; // r12
std::string::size_type v9; // r15
std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0 v10; // r15
std::string::value_type *v11; // rax
size_t v12; // r13
std::string::size_type v13; // r13
std::string::value_type *data; // r13
const void *v15; // rdx
char *v16; // r13
const void *v17; // rsi
unsigned __int8 *v21; // [rsp+18h] [rbp-38h]
char v22; // [rsp+20h] [rbp-30h]
v5 = *a3;
if ( (v5 & 1) != 0 )
{
v6 = *((_QWORD *)a3 + 1);
v7 = *a4;
if ( (v7 & 1) == 0 )
{
LABEL_3:
v8 = v7 >> 1;
goto LABEL_6;
}
}
else
{
v6 = v5 >> 1;
v7 = *a4;
if ( (v7 & 1) == 0 )
goto LABEL_3;
}
v8 = *((_QWORD *)a4 + 1);
LABEL_6:
v9 = v8 + v6;
if ( v8 + v6 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100003630();
v22 = v7;
if ( v9 > 0x16 )
{
v12 = 26;
if ( (v9 | 7) != 0x17 )
v12 = (v9 | 7) + 1;
v21 = a3;
v11 = (std::string::value_type *)operator new(v12);
a3 = v21;
v13 = v12 + 1;
this->__r_.__value_.__r.__words[0] = v13;
this->__r_.__value_.__r.__words[2] = (std::string::size_type)v11;
this->__r_.__value_.__l.__size_ = v9;
v10 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)v13;
}
else
{
*(_OWORD *)&this->__r_.__value_.__l.0 = 0;
this->__r_.__value_.__r.__words[2] = 0;
v10 = (std::string::__short::$7162EEB0FEF29CC674EFA33D0008C7E0)(2 * v9);
this->__r_.__value_.__s.0 = v10;
v11 = nullptr;
}
data = this->__r_.__value_.__s.__data_;
if ( (*(_BYTE *)&v10 & 1) != 0 )
data = v11;
if ( v6 )
{
if ( (v5 & 1) != 0 )
v15 = *((const void **)a3 + 2);
else
v15 = a3 + 1;
memmove(data, v15, v6);
}
v16 = &data[v6];
if ( v8 )
{
if ( (v22 & 1) != 0 )
v17 = *((const void **)a4 + 2);
else
v17 = a4 + 1;
memmove(v16, v17, v8);
}
v16[v8] = 0;
if ( !(*(unsigned __int8 (__fastcall **)(__int64, std::string *, unsigned __int8 *))(*(_QWORD *)a2 + 160LL))(
a2,
this,
a3) )
std::string::assign(this, "");
return this;
}