//
// ERR_get_error_line_data from 0xa0f748 to 0xa0f860 (280 bytes)
//
// 2 xrefs:
// > ERR_print_errors_cb @ 0xac9a28
// > ??> @ 0x7c3cc
//
// 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_get_error_line_data(_DWORD *a1, _DWORD *a2, _DWORD *a3, _DWORD *a4)
{
int state; // r0
int v9; // r12
int v10; // r12
_DWORD *v11; // r9
bool v12; // zf
int v13; // r8
int v14; // r3
int v16; // r3
state = ERR_get_state();
v9 = *(_DWORD *)(state + 388);
if ( v9 == *(_DWORD *)(state + 384) )
return 0;
v10 = (v9 + 1) % 16;
v11 = (_DWORD *)(state + 4 * v10);
v12 = a1 == nullptr;
if ( a1 )
v12 = a2 == nullptr;
v13 = v11[16];
*(_DWORD *)(state + 388) = v10;
v11[16] = 0;
if ( !v12 )
{
v16 = v11[64];
if ( v16 )
{
*a1 = v16;
*a2 = v11[80];
}
else
{
*a1 = "NA";
*a2 = 0;
}
}
if ( a3 )
{
v14 = v11[32];
if ( v14 )
{
*a3 = v14;
if ( !a4 )
return v13;
v14 = v11[48];
}
else
{
*a3 = &byte_BF4ECA;
if ( !a4 )
return v13;
}
*a4 = v14;
return v13;
}
if ( (v11[48] & 1) != 0 )
{
CRYPTO_free(v11[32], "crypto/err/err.c", 481);
v11[32] = 0;
}
v11[48] = 0;
return v13;
}