//
// ASN1_TYPE_get_int_octetstring from 0xa7b6a4 to 0xa7b778 (212 bytes)
//
// 2 xrefs:
// > sub_A15DCC @ 0xa15e10
// > ??> @ 0x7ce0c
//
// 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_int_octetstring(_DWORD *a1, _DWORD *a2, void *a3, signed int a4)
{
_DWORD *v4; // r5
int v5; // r4
_DWORD *v10; // r0
const void *v11; // r0
size_t v12; // r2
if ( *a1 != 16 || !a1[1] || (v10 = (_DWORD *)ASN1_TYPE_unpack_sequence((int)byte_C80C70, a1), (v4 = v10) == nullptr) )
{
v4 = nullptr;
LABEL_3:
ERR_put_error(13, 134, 109, (int)"crypto/asn1/evp_asn1.c", 111);
v5 = -1;
goto LABEL_4;
}
if ( a2 )
*a2 = *v10;
v5 = ASN1_STRING_length(v10[1]);
if ( a3 )
{
v11 = (const void *)ASN1_STRING_get0_data(v4[1]);
if ( v5 >= a4 )
v12 = a4;
else
v12 = v5;
memcpy(a3, v11, v12);
}
if ( v5 == -1 )
goto LABEL_3;
LABEL_4:
ASN1_item_free(v4, byte_C80C70);
return v5;
}