//
// sub_5F6CC from 0x5f6cc to 0x5f7a0 (212 bytes)
//
// 2 xrefs:
// > sub_5F970 @ 0x5f9e0
// > sub_5FA28 @ 0x5fa9c
//
// 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 12:13:53 +0000
//
__int64 __fastcall sub_5F6CC(__int64 a1, void *s2, size_t n)
{
__int64 v3; // x22
unsigned int v5; // w20
__int64 v7; // x8
__int64 v8; // x2
__int64 v9; // x8
__int64 v10; // x2
void *v11; // x0
v3 = *(_QWORD *)(a1 + 40);
v5 = n;
if ( *(_DWORD *)(a1 + 56) == (_DWORD)n && !memcmp(*(const void **)(a1 + 40), s2, (unsigned int)n) )
goto LABEL_7;
if ( v3 )
{
sub_5FB58(off_114000);
sub_E2D74(*(_QWORD *)(v7 + 432), v3, v8, 125, 1);
*(_QWORD *)(a1 + 40) = 0;
}
sub_5FB58(off_114000);
v11 = (void *)sub_E2908(*(_QWORD *)(v9 + 432), v5, v10, 129, 0, 0, 1);
*(_QWORD *)(a1 + 40) = v11;
if ( v11 )
{
memcpy(v11, s2, v5);
*(_DWORD *)(a1 + 56) = v5;
LABEL_7:
*(_BYTE *)(a1 + 60) = 1;
return 0;
}
return 38;
}