//
// sub_66E98 from 0x66e98 to 0x66ee4 (76 bytes)
//
// 7 xrefs:
// > sub_66EE4 @ 0x66f8e
// > sub_66EE4 @ 0x66f9c
// > sub_66EE4 @ 0x66faa
// > sub_66EE4 @ 0x66fb8
// > sub_66EE4 @ 0x66fc6
// > sub_66EE4 @ 0x66fd4
// > sub_66EE4 @ 0x66fe2
//
// 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
//
int __fastcall sub_66E98(int a1, unsigned int a2, _WORD *a3, _WORD *a4)
{
int v4; // r5
int v7; // r0
int v9; // [sp+4h] [bp-1Ch] BYREF
int v10; // [sp+8h] [bp-18h] BYREF
int v11; // [sp+Ch] [bp-14h] BYREF
v4 = 0;
*a3 = 0;
*a4 = 0;
v11 = 0;
v7 = sub_61FEC(*(_DWORD *)(a1 + 20), a2, &v11);
if ( v7 )
{
if ( v7 != 9 )
return v7;
}
else
{
v9 = 0;
v10 = 0;
v4 = sub_89E9C(v11, &v10, &v9);
if ( !v4 )
{
*a3 = v10;
*a4 = v9;
}
}
return v4;
}