//
// sub_1005F4D04 from 0x1005f4d04 to 0x1005f4e2c (296 bytes)
//
// 3 xrefs:
// > sub_1005834D0 @ 0x1005846a8
// > sub_10060A87C @ 0x10060a930
// > sub_10060DC3C @ 0x10060dc90
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
bool __fastcall sub_1005F4D04(__int64 a1, __int64 a2)
{
int v4; // w9
__int64 v5; // x22
__int64 v6; // x2
__int64 v7; // x23
int v8; // w8
int v9; // w10
bool v10; // zf
bool v11; // zf
_BYTE v13[80]; // [xsp+8h] [xbp-98h] BYREF
if ( !a2 )
return 0;
v4 = *(_DWORD *)a2;
if ( *(int *)a2 < 1 )
return 1;
v5 = 0;
LODWORD(v6) = 0;
v7 = *(_QWORD *)(a2 + 8);
do
{
v8 = *(char *)(v7 + v5);
if ( v8 != 127
&& ((v9 = *(unsigned __int8 *)(v7 + v5), v8 <= 31) ? (v10 = v9 == 10) : (v10 = 1),
!v10 ? (v11 = v9 == 13) : (v11 = 1),
v11) )
{
v13[(int)v6] = v8;
}
else
{
v13[(int)v6] = 46;
}
if ( (int)v6 < 79 )
{
v6 = (unsigned int)(v6 + 1);
}
else
{
if ( (int)sub_1005DA72C(a1, (__int64)v13, (unsigned int)(v6 + 1)) < 1 )
return 0;
v6 = 0;
v4 = *(_DWORD *)a2;
}
++v5;
}
while ( v5 < v4 );
return (int)v6 < 1 || (int)sub_1005DA72C(a1, (__int64)v13, v6) >= 1;
}