//
// sub_100643790 from 0x100643790 to 0x100643833 (163 bytes)
//
// 0 xrefs:
//
// 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
//
_OWORD *__fastcall sub_100643790(_QWORD *a1, char *a2, char *a3)
{
_OWORD *result; // rax
size_t v5; // r14
_QWORD *v6; // rdi
_OWORD *v7; // r15
char *v8; // r13
_QWORD *v9; // rdi
if ( a2 > a3 )
sub_1007CD530(a1);
v5 = a3 - a2;
if ( (unsigned __int64)(a3 - a2) > 0x10 )
{
result = (_OWORD *)off_10099E670();
if ( !result )
return result;
v7 = result;
memcpy(result, a2, v5);
v9 = (_QWORD *)a1[3];
result = a1 + 1;
if ( v9 != a1 + 1 )
result = (_OWORD *)off_10099E668(v9);
}
else
{
v6 = (_QWORD *)a1[3];
v7 = a1 + 1;
if ( v6 != a1 + 1 )
{
v8 = a3;
result = (_OWORD *)off_10099E668(v6);
a3 = v8;
}
if ( a2 != a3 )
*v7 = *(_OWORD *)a2;
}
a1[3] = v7;
a1[4] = (char *)v7 + v5;
return result;
}