//
// ERR_peek_error_line_data from 0x7fb394 to 0x7fb46c (216 bytes)
//
// 1 xrefs:
// > ??> @ 0x629ac
//
// 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_data(_DWORD *a1, _DWORD *a2, _DWORD *a3, _DWORD *a4)
{
int state; // r0
int v9; // r12
_DWORD *v10; // r12
bool v11; // zf
int result; // r0
int v13; // r3
int v14; // r3
state = ERR_get_state();
v9 = *(_DWORD *)(state + 388);
if ( v9 == *(_DWORD *)(state + 384) )
return 0;
v10 = (_DWORD *)(state + 4 * ((v9 + 1) % 16));
v11 = a1 == nullptr;
if ( a1 )
v11 = a2 == nullptr;
result = v10[16];
if ( v11 )
{
LABEL_6:
if ( !a3 )
return result;
goto LABEL_8;
}
v14 = v10[64];
if ( !v14 )
{
*a1 = "NA";
*a2 = 0;
goto LABEL_6;
}
*a1 = v14;
*a2 = v10[80];
if ( !a3 )
return result;
LABEL_8:
v13 = v10[32];
if ( v13 )
{
*a3 = v13;
if ( !a4 )
return result;
v13 = v10[48];
LABEL_11:
*a4 = v13;
return result;
}
*a3 = &byte_9B1912;
if ( a4 )
goto LABEL_11;
return result;
}