//
// sub_10065A85C from 0x10065a85c to 0x10065a8e8 (140 bytes)
//
// 1 xrefs:
// > sub_10064ADC8 @ 0x10064b058
//
// 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:10:55 +0000
//
__int64 __fastcall sub_10065A85C(__int64 a1, const void *a2, __int64 a3)
{
__int64 v5; // x21
void *v6; // x0
void *v7; // x0
if ( (*(_BYTE *)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 200LL) + 112LL) & 2) == 0 )
return 1;
v5 = *(_QWORD *)(a1 + 256);
if ( !v5 )
return 0;
v6 = *(void **)(v5 + 576);
if ( v6 )
sub_1006AEDAC(v6);
v7 = (void *)sub_1006AE878(a3, "t1_lib.c", 3701);
*(_QWORD *)(v5 + 576) = v7;
if ( v7 )
{
*(_QWORD *)(v5 + 584) = (int)a3;
memcpy(v7, a2, (int)a3);
return 1;
}
return 0;
}