//
// ASN1_TYPE_get_octetstring from 0xa7b5c0 to 0xa7b64c (140 bytes)
//
// 2 xrefs:
// > EVP_CIPHER_get_asn1_iv @ 0xa18328
// > ??> @ 0x7d06c
//
// 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:08:46 +0000
//
int __fastcall ASN1_TYPE_get_octetstring(_DWORD *a1, void *a2, signed int a3)
{
int v4; // r0
const void *v7; // r7
int v8; // r4
size_t v9; // r2
if ( *a1 == 4 && (v4 = a1[1]) != 0 )
{
v7 = (const void *)ASN1_STRING_get0_data(v4);
v8 = ASN1_STRING_length(a1[1]);
if ( v8 >= a3 )
v9 = a3;
else
v9 = v8;
memcpy(a2, v7, v9);
return v8;
}
else
{
ERR_put_error(13, 135, 109, (int)"crypto/asn1/evp_asn1.c", 36);
return -1;
}
}