//
// ASN1_TYPE_get_octetstring from 0x108cd08 to 0x108cd98 (144 bytes)
//
// 2 xrefs:
// > EVP_CIPHER_get_asn1_iv @ 0x1028820
// > ??> @ 0x9aa38
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:17:16 +0000
//
__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;
}
}