//
// ASN1_TYPE_get_octetstring from 0xe0ea08 to 0xe0ea98 (144 bytes)
//
// 2 xrefs:
// > EVP_CIPHER_get_asn1_iv @ 0xdaa4c0
// > ??> @ 0x73248
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall ASN1_TYPE_get_octetstring(__int64 a1, void *a2, int a3)
{
__int64 v5; // x0
unsigned int v6; // w19
unsigned int v7; // w2
void *v10; // [xsp+28h] [xbp+28h]
if ( *(_DWORD *)a1 == 4 && (v5 = *(_QWORD *)(a1 + 8)) != 0 )
{
v10 = (void *)ASN1_STRING_get0_data(v5);
v6 = ASN1_STRING_length(*(unsigned int **)(a1 + 8));
v7 = a3;
if ( (int)v6 <= a3 )
v7 = v6;
memcpy(a2, v10, (int)v7);
return v6;
}
else
{
ERR_put_error(13, 135, 109, (__int64)"crypto/asn1/evp_asn1.c", 36);
return 0xFFFFFFFFLL;
}
}