//
// sub_E1B8F8 from 0xe1b8f8 to 0xe1bb10 (536 bytes)
//
// 2 xrefs:
// > ??> @ 0x13fc358
// > ??> @ 0x13fc408
//
// 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:44 +0000
//
__int64 __fastcall sub_E1B8F8(__int64 a1, bool *a2)
{
__int64 v3; // x22
__int64 v5; // x24
unsigned __int8 *v6; // x0
unsigned int v7; // w2
unsigned __int8 *v8; // x20
int v9; // w2
int v10; // t1
_BOOL4 v11; // w3
unsigned __int8 *v12; // x19
int v13; // w2
int v14; // t1
int v15; // w0
int v16; // w0
int v18; // w0
__int64 v19; // x1
unsigned int v20; // w2
*a2 = 0;
v3 = a1 + 1560;
v5 = a1 + 1680;
sub_E0F4CC(a1, 0);
*(_QWORD *)(v3 + 80) = 1800000;
*(_QWORD *)(v3 + 96) = sub_E1C978;
*(_QWORD *)(v3 + 104) = sub_E1C2F0;
*(_QWORD *)(v3 + 88) = a1;
*(_DWORD *)(v3 + 152) = -1;
sub_E24B50(v5, &off_13FC3B0);
sub_E20498(v3);
v6 = *(unsigned __int8 **)(a1 + 552);
*(_BYTE *)(v3 + 144) = 1;
v7 = 0;
if ( v6 )
{
while ( 1 )
{
if ( v7 )
goto LABEL_18;
v7 = *v6;
if ( !*v6 )
goto LABEL_18;
v8 = v6;
if ( v7 == 61 )
break;
do
{
v10 = *++v8;
v9 = v10;
v11 = v10 != 0;
}
while ( v10 != 61 && v11 );
if ( v9 != 59 && v11 )
break;
v12 = v8;
v18 = sub_E0A82C(v6, "AUTH=", 5);
v7 = 3;
if ( v18 )
goto LABEL_23;
LABEL_14:
if ( *v12 == 59 )
v6 = v12 + 1;
else
v6 = v12;
if ( !v6 )
goto LABEL_18;
}
v12 = v8;
do
{
v14 = *++v12;
v13 = v14;
}
while ( v14 != 59 && v13 );
v15 = sub_E0A82C(v6, "AUTH=", 5);
v7 = 3;
if ( !v15 )
goto LABEL_14;
LABEL_23:
v7 = sub_E24A04(v5, (char *)v8 + 1);
goto LABEL_14;
}
LABEL_18:
v16 = *(_DWORD *)(v3 + 136);
if ( !v16 )
{
LABEL_25:
*(_DWORD *)(v3 + 152) = v16;
if ( v7 )
return v7;
goto LABEL_26;
}
if ( v16 != -33 )
{
v16 = 2;
goto LABEL_25;
}
*(_DWORD *)(v3 + 152) = -1;
if ( v7 )
return v7;
LABEL_26:
*(_DWORD *)(v3 + 112) = 1;
v19 = *(_QWORD *)(a1 + 1024);
strcpy((char *)(a1 + 1720), "*");
if ( (*(_DWORD *)(v19 + 124) & 1) != 0 && !*(_BYTE *)(v3 + 116) )
{
v7 = sub_E30164(a1, v7, a1 + 1676);
if ( v7 || !*(_BYTE *)(v3 + 116) )
return v7;
}
v20 = sub_E202AC(v3, 0);
*a2 = *(_DWORD *)(v3 + 112) == 0;
return v20;
}