//
// ERR_peek_last_error_line_data from 0xa0fed0 to 0xa0ff8c (188 bytes)
//
// 1 xrefs:
// > ??> @ 0x7c41c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:07:45 +0000
//
int __fastcall ERR_peek_last_error_line_data(_DWORD *a1, _DWORD *a2, _DWORD *a3, _DWORD *a4)
{
int state; // r0
int v9; // lr
_DWORD *v10; // r12
bool v11; // zf
int v12; // lr
int v13; // r3
int v15; // r3
state = ERR_get_state();
v9 = *(_DWORD *)(state + 384);
if ( *(_DWORD *)(state + 388) != v9 )
{
v10 = (_DWORD *)(state + 4 * v9);
v11 = a1 == nullptr;
if ( a1 )
v11 = a2 == nullptr;
v12 = v10[16];
if ( !v11 )
{
v15 = v10[64];
if ( v15 )
{
*a1 = v15;
*a2 = v10[80];
}
else
{
*a1 = "NA";
*a2 = 0;
}
}
if ( !a3 )
return v12;
v13 = v10[32];
if ( v13 )
{
*a3 = v13;
if ( !a4 )
return v12;
v13 = v10[48];
}
else
{
*a3 = &byte_BF4ECA;
if ( !a4 )
return v12;
}
*a4 = v13;
return v12;
}
return 0;
}