//
// sub_1005789B0 from 0x1005789b0 to 0x100578a6c (188 bytes)
//
// 1 xrefs:
// > sub_100577CA4 @ 0x100577ce0
//
// 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
//
__int64 __fastcall sub_1005789B0(__int64 a1, _DWORD *__s2, unsigned __int64 a3, int *a4)
{
int v6; // w8
if ( a3 >= 4 && *__s2 == 1381123373 )
{
v6 = 45;
goto LABEL_14;
}
if ( *(_DWORD *)(a1 + 1448) == 2 )
{
if ( a3 && *(_BYTE *)__s2 == 46 )
{
v6 = 43;
LABEL_14:
*a4 = v6;
return 1;
}
LABEL_12:
v6 = 42;
goto LABEL_14;
}
if ( a3 < 3 )
{
if ( !a3 )
return 0;
}
else if ( !memcmp("+OK", __s2, 3u) )
{
v6 = 43;
goto LABEL_14;
}
if ( *(_BYTE *)__s2 == 43 )
goto LABEL_12;
return 0;
}