//
// ERR_set_error_data from 0xa100e4 to 0xa10130 (76 bytes)
//
// 2 xrefs:
// > ERR_add_error_vdata @ 0xa101ec
// > ??> @ 0x7c44c
//
// 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_set_error_data(int a1, int a2)
{
int result; // r0
int v5; // r4
int v6; // r4
result = ERR_get_state();
v5 = *(_DWORD *)(result + 384);
if ( !v5 )
v5 = 15;
v6 = result + 4 * v5;
if ( (*(_DWORD *)(v6 + 192) & 1) != 0 )
result = CRYPTO_free(*(_DWORD *)(v6 + 128), "crypto/err/err.c", 694);
*(_DWORD *)(v6 + 128) = a1;
*(_DWORD *)(v6 + 192) = a2;
return result;
}