//
// BuildCatchObjectInternal<__FrameHandler3> from 0x180125b84 to 0x180125c44 (192 bytes)
//
// 2 xrefs:
// > CatchIt<__FrameHandler3> @ 0x180125ca2
// > ??> @ 0x1802028b8
//
// 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 BuildCatchObjectInternal<__FrameHandler3>(__int64 a1, __int64 *a2, int *a3, __int64 a4)
{
__int64 v6; // rbx
__int64 *v7; // rsi
__int64 result; // rax
__int64 v9; // rcx
__int64 v10; // r14
__int64 v11; // rcx
__int64 v12; // r14
v6 = 0;
if ( *a3 >= 0 )
v7 = (__int64 *)(*a2 + a3[2]);
else
v7 = a2;
result = (unsigned int)sub_180125984(a1, a2, a3, a4) - 1;
if ( (_DWORD)result )
{
if ( (_DWORD)result == 1 )
{
v10 = _AdjustPointer(*(_QWORD *)(a1 + 40), (int *)(a4 + 8));
if ( *(_DWORD *)(a4 + 24) )
v6 = GetThrowImageBase(v9) + *(int *)(a4 + 24);
return unknown_libname_21(v7, v6, v10, 1);
}
}
else
{
v12 = _AdjustPointer(*(_QWORD *)(a1 + 40), (int *)(a4 + 8));
if ( *(_DWORD *)(a4 + 24) )
v6 = GetThrowImageBase(v11) + *(int *)(a4 + 24);
return unknown_libname_20(v7, v6, v12);
}
return result;
}