//
// sub_1001E6094 from 0x1001e6094 to 0x1001e6164 (208 bytes)
//
// 3 xrefs:
// > sub_1001DFEDC @ 0x1001dff1c
// > sub_1001E6164 @ 0x1001e61dc
// > sub_1001E6164 @ 0x1001e61ec
//
// This function is hookable on this platform (idp: arm, 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:00:33 +0000
//
void *__fastcall sub_1001E6094(__int64 a1, char *__src, unsigned int a3)
{
__int64 v6; // x24
unsigned int v7; // w22
unsigned int v8; // w23
v6 = ((unsigned int)*(_QWORD *)(a1 + 32) >> 3) & 0x3F;
*(_OWORD *)(a1 + 32) += __PAIR128__((unsigned __int64)a3 >> 29, 8 * (unsigned __int64)a3);
v7 = 64 - v6;
if ( 64 - (int)v6 <= a3 )
{
memcpy((void *)(a1 + 48 + (unsigned int)v6), __src, (unsigned int)(64 - v6));
sub_1001E62B4(a1, a1 + 48);
v8 = v6 ^ 0x7F;
if ( ((unsigned int)v6 ^ 0x7F) >= a3 )
{
v6 = 0;
}
else
{
do
{
sub_1001E62B4(a1, &__src[v8 - 63]);
v8 += 64;
}
while ( v8 < a3 );
v6 = 0;
v7 = v8 - 63;
}
}
else
{
v7 = 0;
}
return memcpy((void *)(a1 + v6 + 48), &__src[v7], a3 - v7);
}