//
// sub_180007CF0 from 0x180007cf0 to 0x180007d73 (131 bytes)
//
// 26 xrefs:
// > cocos2d::CCPrettyPrinter::visit @ 0x18000802a
// > cocos2d::CCPrettyPrinter::visit @ 0x1800082ab
// > cocos2d::CCPrettyPrinter::visit @ 0x18000837c
// > cocos2d::CCPrettyPrinter::visit @ 0x1800085b6
// > cocos2d::CCPrettyPrinter::visit @ 0x1800088ca
// > cocos2d::CCPrettyPrinter::visit @ 0x180008a98
// > cocos2d::CCPrettyPrinter::visit @ 0x180008e90
// > cocos2d::CCPrettyPrinter::visit @ 0x180008fbe
// > cocos2d::CCPrettyPrinter::visit @ 0x18000917a
// > cocos2d::CCPrettyPrinter::visit @ 0x180009345
// > cocos2d::CCPrettyPrinter::visit @ 0x180009426
// > cocos2d::CCFileUtils::fullPathFromRelativeFile @ 0x18006f8cd
// > cocos2d::CCFileUtils::getPathForFilename @ 0x1800704d2
// > cocos2d::CCFileUtils::getPathForFilename @ 0x1800704eb
// > sub_180071FE0 @ 0x1800721a3
// > sub_1800864F0 @ 0x18008653e
// > cocos2d::ZipUtils::decompressString2 @ 0x1800a3ee8
// > cocos2d::ZipUtils::decompressString2 @ 0x1800a401d
// > cocos2d::ZipUtils::decompressString2 @ 0x1800a4096
// > cocos2d::ZipUtils::decompressString2 @ 0x1800a40dc
// > cocos2d::ZipUtils::decompressString @ 0x1800a4271
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b08ed
// > cocos2d::CCTMXMapInfo::startElement @ 0x1800b1155
// > ??> @ 0x180131894
// > ??> @ 0x1801318a4
// > ??> @ 0x1801adb64
//
// 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
//
_QWORD *__fastcall sub_180007CF0(_QWORD *Src, const void *a2, unsigned __int64 a3)
{
__int64 v5; // rcx
unsigned __int64 v6; // r8
_QWORD *v7; // rax
char *v8; // rbx
v5 = Src[2];
v6 = Src[3];
if ( a3 > v6 - v5 )
return sub_180007900(Src, a3, 0, a2, a3);
Src[2] = v5 + a3;
v7 = Src;
if ( v6 > 0xF )
v7 = (_QWORD *)*Src;
v8 = (char *)v7 + v5;
memmove((char *)v7 + v5, a2, a3);
v8[a3] = 0;
return Src;
}