//
// sub_991E2E from 0x991e2e to 0x991ed4 (166 bytes)
//
// 2 xrefs:
// > sub_987AD4 @ 0x987be2
// > sub_991E2E @ 0x991e72
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:06:36 +0000
//
unsigned __int8 *__fastcall sub_991E2E(unsigned __int8 *a1, unsigned __int8 *a2, __int64 *a3)
{
unsigned __int8 *v5; // r8
int v6; // r0
unsigned __int8 *v7; // r4
unsigned __int8 *v8; // r0
_BYTE *v9; // r4
int v10; // r0
bool v11; // zf
unsigned __int8 *v12; // r0
int v13; // t1
v5 = a1;
if ( a1 != a2 )
{
v6 = *a1;
if ( v6 == 74 )
{
v9 = v5 + 1;
if ( v5 + 1 != a2 )
{
while ( *v9 != 69 )
{
v10 = sub_991E2E(v9, a2, a3);
v11 = v10 == (_DWORD)v9;
v9 = (_BYTE *)v10;
if ( v11 )
return v5;
}
return v9 + 1;
}
}
else
{
if ( v6 == 76 )
{
if ( v5 + 1 == a2 || v5[1] != 90 )
return sub_98D8EC(v5, a2, (int)a3);
v7 = v5 + 2;
v8 = sub_982908(v5 + 2, a2, a3);
}
else
{
if ( v6 != 88 )
return sub_983468(v5, a2, a3);
v7 = v5 + 1;
v8 = sub_989930(v5 + 1, a2, (int)a3);
}
v11 = v8 == v7;
if ( v8 != v7 )
v11 = v8 == a2;
if ( !v11 )
{
v13 = *v8;
v12 = v8 + 1;
if ( v13 == 69 )
return v12;
}
}
}
return v5;
}