//
// sub_E89FFC from 0xe89ffc to 0xe8a108 (268 bytes)
//
// 4 xrefs:
// > _Unwind_RaiseException @ 0xe8b804
// > _Unwind_ForcedUnwind @ 0xe8b900
// > _Unwind_Resume @ 0xe8b9fc
// > _Unwind_Resume_or_Rethrow @ 0xe8baf4
//
// 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_E89FFC(__int64 a1, __int64 a2)
{
__int64 i; // x20
_QWORD *v5; // x0
_QWORD *v6; // x1
__int64 result; // x0
__int64 v8; // [xsp+38h] [xbp+38h] BYREF
if ( ((*(_QWORD *)(a2 + 832) & 0x4000000000000000LL) == 0 || !*(_BYTE *)(a2 + 887)) && !*(_QWORD *)(a2 + 248) )
sub_E89F68(a2, *(_QWORD *)(a2 + 784), &v8);
for ( i = 0; i != 97; ++i )
{
v5 = *(_QWORD **)(a1 + 8 * i);
v6 = *(_QWORD **)(a2 + 8 * i);
if ( *(_BYTE *)(a1 + i + 856) )
LABEL_7:
abort();
if ( *(_BYTE *)(a2 + i + 856) && v5 )
{
if ( byte_125FE30[i] != 8 )
goto LABEL_7;
*v5 = v6;
}
else if ( v5 != nullptr && v6 != nullptr && v6 != v5 )
{
memcpy(v5, v6, (unsigned __int8)byte_125FE30[i]);
}
}
if ( (*(_QWORD *)(a1 + 832) & 0x4000000000000000LL) == 0 || (result = 0, !*(_BYTE *)(a1 + 887)) )
{
result = 0;
if ( !*(_QWORD *)(a1 + 248) )
return Unwind_GetGR(a2, 31) - *(_QWORD *)(a1 + 784) + *(_QWORD *)(a2 + 848);
}
return result;
}