//
// sub_18006EB20 from 0x18006eb20 to 0x18006ebf7 (215 bytes)
//
// 7 xrefs:
// > sub_18006ED80 @ 0x18006eda8
// > cocos2d::CCFileUtils::fullPathForFilename @ 0x180070bcf
// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180094c86
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b3a2e
// > ??> @ 0x1801441e0
// > ??> @ 0x1801441f0
// > ??> @ 0x1801be314
//
// 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 11:21:55 +0000
//
__int64 __fastcall sub_18006EB20(__int64 *a1, __int64 a2, const void **a3)
{
__int64 v3; // rax
__int64 *v6; // rbx
size_t v7; // rbp
unsigned __int64 v8; // r15
_QWORD *v9; // rcx
const void *v10; // rdx
size_t v11; // rsi
size_t v12; // r8
int v13; // eax
int v14; // eax
v3 = *a1;
*(_DWORD *)(a2 + 8) = 0;
*(_QWORD *)(a2 + 16) = v3;
v6 = *(__int64 **)(v3 + 8);
*(_QWORD *)a2 = v6;
if ( !*((_BYTE *)v6 + 25) )
{
v7 = (size_t)a3[2];
v8 = (unsigned __int64)a3[3];
do
{
*(_QWORD *)a2 = v6;
v9 = v6 + 4;
v10 = a3;
if ( v8 > 0xF )
v10 = *a3;
if ( (unsigned __int64)v6[7] > 0xF )
v9 = (_QWORD *)*v9;
v11 = v6[6];
v12 = v11;
if ( v7 < v11 )
v12 = v7;
v13 = memcmp(v9, v10, v12);
if ( !v13 )
{
if ( v11 >= v7 )
v13 = v11 > v7;
else
v13 = -1;
}
if ( v13 >= 0 )
{
*(_QWORD *)(a2 + 16) = v6;
v14 = 1;
}
else
{
v14 = 0;
v6 += 2;
}
v6 = (__int64 *)*v6;
*(_DWORD *)(a2 + 8) = v14;
}
while ( !*((_BYTE *)v6 + 25) );
}
return a2;
}