//
// sub_1005ECBB0 from 0x1005ecbb0 to 0x1005ecc08 (88 bytes)
//
// 0 xrefs:
//
// 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:09:46 +0000
//
__int64 __fastcall sub_1005ECBB0(char *a1, size_t __size, const char *a3, va_list a4)
{
int v4; // w21
int v5; // w20
int v7; // w0
unsigned int v8; // w8
__int64 result; // x0
v4 = __size - 1;
if ( (int)__size < 1 )
return 0;
v5 = __size;
*a1 = 0;
v7 = vsnprintf(a1, (unsigned int)__size, a3, a4);
if ( v7 >= v5 )
v8 = v5;
else
v8 = v7;
if ( v7 >= 0 )
result = v8;
else
result = (unsigned int)v5;
a1[v4] = 0;
return result;
}