//
// sub_E1D7F4 from 0xe1d7f4 to 0xe1d904 (272 bytes)
//
// 2 xrefs:
// > sub_E1DCB4 @ 0xe1dcfc
// > sub_E1DCB4 @ 0xe1dd0c
//
// 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 13:09:45 +0000
//
__int64 __fastcall sub_E1D7F4(__int64 a1, _BYTE *a2, unsigned __int64 a3, _DWORD *a4)
{
int v7; // w0
int v8; // w0
__int64 result; // x0
_DWORD *v10; // [xsp+38h] [xbp+38h]
_DWORD *v11; // [xsp+38h] [xbp+38h]
if ( a3 > 3 )
{
v10 = a4;
v7 = memcmp("-ERR", a2, 4u);
a4 = v10;
if ( !v7 )
{
*v10 = 45;
return 1;
}
}
if ( *(_DWORD *)(a1 + 1672) == 2 )
{
if ( !a3 || *a2 != 46 )
{
LABEL_12:
*a4 = 42;
return 1;
}
LABEL_14:
*a4 = 43;
return 1;
}
if ( a3 > 2 )
{
v11 = a4;
v8 = memcmp("+OK", a2, 3u);
a4 = v11;
if ( v8 )
goto LABEL_6;
goto LABEL_14;
}
result = 0;
if ( a3 )
{
LABEL_6:
if ( *a2 != 43 )
return 0;
goto LABEL_12;
}
return result;
}