//
// sub_1800039A0 from 0x1800039a0 to 0x180003a20 (128 bytes)
//
// 8 xrefs:
// > cocos2d::extension::AssetsManager::AssetsManager @ 0x1800015ba
// > cocos2d::extension::AssetsManager::checkStoragePath @ 0x18000186e
// > cocos2d::extension::AssetsManager::setStoragePath @ 0x1800028d7
// > cocos2d::extension::CCEditBoxImplWin::setText @ 0x180011b52
// > cocos2d::extension::WebSocket::onSubThreadStarted @ 0x18001a693
// > ??> @ 0x18002d304
// > ??> @ 0x18002d314
// > ??> @ 0x180049288
//
// 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_1800039A0(_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_180003810(Src, a3, v6, 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;
}