//
// ERR_peek_last_error_line from 0x101f2e0 to 0x101f384 (164 bytes)
//
// 1 xrefs:
// > ??> @ 0xffcd0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:16:10 +0000
//
__int64 __fastcall ERR_peek_last_error_line(_QWORD *a1, _DWORD *a2)
{
__int64 state; // x0
int v4; // w2
__int64 v5; // x3
__int64 v6; // x0
__int64 v7; // x4
__int64 v8; // x5
__int64 result; // x0
state = ERR_get_state();
v4 = *(_DWORD *)(state + 576);
v5 = state;
if ( *(_DWORD *)(state + 580) == v4 )
return 0;
v6 = state + 8LL * v4;
v7 = *(_QWORD *)(v6 + 64);
if ( !a1 || !a2 )
return *(_QWORD *)(v6 + 64);
v8 = *(_QWORD *)(v6 + 384);
if ( v8 )
{
*a1 = v8;
*a2 = *(_DWORD *)(v5 + 4 * (v4 + 128LL));
return v7;
}
else
{
result = *(_QWORD *)(v6 + 64);
*a1 = "NA";
*a2 = 0;
}
return result;
}