//
// sub_E1B2E8 from 0xe1b2e8 to 0xe1b458 (368 bytes)
//
// 2 xrefs:
// > ??> @ 0x13fc348
// > ??> @ 0x13fc3f8
//
// 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:43 +0000
//
__int64 __fastcall sub_E1B2E8(_DWORD *a1, unsigned int a2)
{
__int64 v3; // x1
__int64 v4; // x19
_DWORD *v6; // x20
v3 = *(_QWORD *)a1;
v4 = *(_QWORD *)(*(_QWORD *)a1 + 536LL);
if ( v4 )
{
if ( a2 )
{
sub_E0F4CC((__int64)a1, 1);
}
else
{
if ( *(_BYTE *)(v3 + 1601) || *(_QWORD *)(v4 + 56) )
goto LABEL_4;
if ( *(_QWORD *)(v4 + 24) )
{
if ( !*(_BYTE *)(v3 + 1569) )
{
v6 = a1 + 390;
a1[418] = 10;
do
LABEL_10:
a2 = sub_E202AC(v6, 1);
while ( !a2 && v6[28] );
goto LABEL_4;
}
}
else if ( !*(_BYTE *)(v3 + 1569) )
{
goto LABEL_4;
}
v6 = a1 + 390;
a2 = sub_E20668(a1 + 390, "%s", &byte_11B8890);
if ( !a2 )
{
v6[28] = 12;
goto LABEL_10;
}
}
LABEL_4:
off_154A3C8(*(void **)(v4 + 8));
*(_QWORD *)(v4 + 8) = 0;
off_154A3C8(*(void **)(v4 + 16));
*(_QWORD *)(v4 + 16) = 0;
off_154A3C8(*(void **)(v4 + 24));
*(_QWORD *)(v4 + 24) = 0;
off_154A3C8(*(void **)(v4 + 32));
*(_QWORD *)(v4 + 32) = 0;
off_154A3C8(*(void **)(v4 + 40));
*(_QWORD *)(v4 + 40) = 0;
off_154A3C8(*(void **)(v4 + 48));
*(_QWORD *)(v4 + 48) = 0;
off_154A3C8(*(void **)(v4 + 56));
*(_QWORD *)(v4 + 56) = 0;
off_154A3C8(*(void **)(v4 + 64));
*(_QWORD *)(v4 + 64) = 0;
*(_DWORD *)v4 = 0;
return a2;
}
return 0;
}