//
// ERR_peek_error_line_data from 0xda11cc to 0xda12d0 (260 bytes)
//
// 1 xrefs:
// > ??> @ 0x7a1a8
//
// 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 ERR_peek_error_line_data(_QWORD *a1, _DWORD *a2, _QWORD *a3, _DWORD *a4)
{
__int64 state; // x0
int v6; // w4
__int64 v7; // x5
__int64 v8; // x4
_QWORD *v9; // x0
__int64 v10; // x6
__int64 v11; // x8
__int64 v12; // x0
__int64 result; // x0
state = ERR_get_state();
v6 = *(_DWORD *)(state + 580);
v7 = state;
if ( v6 == *(_DWORD *)(state + 576) )
return 0;
v8 = (v6 + 1) % 16;
v9 = (_QWORD *)(state + 8 * v8);
v10 = v9[8];
if ( a1 && a2 )
{
v11 = v9[48];
if ( v11 )
{
*a1 = v11;
*a2 = *(_DWORD *)(v7 + 4 * (v8 + 128));
}
else
{
*a1 = "NA";
*a2 = 0;
}
}
if ( !a3 )
return v10;
v12 = v9[24];
if ( !v12 )
{
*a3 = &byte_F288A0;
if ( a4 )
{
*a4 = 0;
return v10;
}
return v10;
}
*a3 = v12;
if ( !a4 )
return v10;
result = v10;
*a4 = *(_DWORD *)(v7 + 4 * (v8 + 80));
return result;
}