//
// sub_E8B510 from 0xe8b510 to 0xe8b5fc (236 bytes)
//
// 3 xrefs:
// > _Unwind_ForcedUnwind @ 0xe8b8e8
// > _Unwind_Resume @ 0xe8b9e4
// > _Unwind_Resume_or_Rethrow @ 0xe8badc
//
// 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
//
__int64 __fastcall sub_E8B510(_QWORD *a1, __int64 *a2)
{
unsigned int (__fastcall *v2)(__int64, __int64, _QWORD, _QWORD *, __int64 *, __int64); // x23
__int64 v3; // x24
unsigned int v6; // w0
unsigned int v7; // w19
__int64 v8; // x1
unsigned int v9; // w0
__int64 v11[202]; // [xsp+50h] [xbp+50h] BYREF
__int64 (__fastcall *v12)(__int64, __int64, _QWORD, _QWORD *, __int64 *); // [xsp+6A0h] [xbp+6A0h]
v2 = (unsigned int (__fastcall *)(__int64, __int64, _QWORD, _QWORD *, __int64 *, __int64))a1[2];
v3 = a1[3];
while ( 1 )
{
v6 = sub_E8A744(a2, (char *)v11);
v7 = v6;
if ( v6 != 5 && v6 )
return 2;
v8 = v6 == 5 ? 26LL : 10LL;
if ( v2(1, v8, *a1, a1, a2, v3) )
return 2;
if ( v7 == 5 )
return v7;
if ( v12 )
break;
LABEL_10:
sub_E8B404(a2, v11);
}
v9 = v12(1, 10, *a1, a1, a2);
v7 = v9;
if ( v9 != 7 )
{
if ( v9 != 8 )
return 2;
goto LABEL_10;
}
return v7;
}