//
// ERR_add_error_vdata from 0xa10138 to 0xa10204 (204 bytes)
//
// 2 xrefs:
// > ERR_add_error_data @ 0xa10230
// > ??> @ 0x7c45c
//
// 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:46 +0000
//
_BYTE *__fastcall ERR_add_error_vdata(int a1, int a2)
{
_BYTE *result; // r0
int v5; // r7
int v6; // r4
int v7; // r8
int v8; // r6
int v9; // r9
const char *v10; // r5
const char *v11; // t1
const char *v12; // r0
int v13; // r0
result = (_BYTE *)CRYPTO_malloc(81, "crypto/err/err.c", 713);
v5 = (int)result;
if ( result )
{
v6 = 0;
*result = 0;
if ( a1 <= 0 )
return (_BYTE *)ERR_set_error_data(v5, 3);
v7 = a2 - 4;
v8 = 0;
v9 = 80;
while ( 1 )
{
v11 = *(const char **)(v7 + 4);
v7 += 4;
v10 = v11;
++v8;
v12 = v11;
if ( v11 )
{
v6 += strlen(v12);
if ( v6 > v9 )
{
v13 = CRYPTO_realloc(v5, v6 + 21, "crypto/err/err.c", 726);
v9 = v6 + 20;
if ( !v13 )
return (_BYTE *)CRYPTO_free(v5, "crypto/err/err.c", 728);
v5 = v13;
}
OPENSSL_strlcat(v5, v10, v9 + 1);
}
if ( v8 == a1 )
return (_BYTE *)ERR_set_error_data(v5, 3);
}
}
return result;
}