//
// ERR_peek_error_line from 0x7fb244 to 0x7fb2cc (136 bytes)
//
// 1 xrefs:
// > ??> @ 0x6298c
//
// 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 ERR_peek_error_line(_DWORD *a1, _DWORD *a2)
{
int state; // r0
int v5; // r3
int v6; // r3
bool v7; // zf
_DWORD *v8; // r3
int result; // r0
int v10; // r2
state = ERR_get_state();
v5 = *(_DWORD *)(state + 388);
if ( v5 == *(_DWORD *)(state + 384) )
return 0;
v6 = (v5 + 1) % 16;
v7 = a1 == nullptr;
if ( a1 )
v7 = a2 == nullptr;
v8 = (_DWORD *)(state + 4 * v6);
result = v8[16];
if ( !v7 )
{
v10 = v8[64];
if ( v10 )
{
*a1 = v10;
*a2 = v8[80];
}
else
{
*a1 = "NA";
*a2 = 0;
}
}
return result;
}