//
// sub_10073FF18 from 0x10073ff18 to 0x100740030 (280 bytes)
//
// 1 xrefs:
// > sub_10074061C @ 0x10074062c
//
// 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:13:19 +0000
//
__int64 __fastcall sub_10073FF18(__int64 a1, char *a2, size_t a3)
{
size_t v3; // x19
int v6; // w0
size_t v7; // x22
__int64 v8; // x8
size_t v9; // x23
int v10; // w24
v3 = a3;
if ( *(_DWORD *)(a1 + 296) == -1 )
return 0;
if ( !a3 )
return 1;
v6 = sub_1007113BC(a1);
v7 = v6;
v8 = *(int *)(a1 + 296);
if ( (int)v8 >= 1 )
{
if ( v6 - v8 <= v3 )
v9 = v6 - v8;
else
v9 = v3;
if ( v6 - v8 <= v3 )
v10 = v6 - v8;
else
v10 = v3;
memcpy((void *)(a1 + v8 + 264), a2, v9);
*(_DWORD *)(a1 + 296) += v10;
if ( v9 == v3 )
return 1;
if ( !(unsigned int)sub_1007113C8(a1, a1 + 232, a1 + 264, v7) )
return 0;
v3 -= v9;
a2 += v9;
}
if ( v3 <= v7 )
{
LABEL_16:
memcpy((void *)(a1 + 264), a2, v3);
*(_DWORD *)(a1 + 296) = v3;
return 1;
}
while ( (unsigned int)sub_1007113C8(a1, a1 + 232, (__int64)a2, v7) )
{
v3 -= v7;
a2 += v7;
if ( v3 <= v7 )
goto LABEL_16;
}
return 0;
}