//
// sub_A62688 from 0xa62688 to 0xa62760 (216 bytes)
//
// 2 xrefs:
// > X509v3_addr_add_range @ 0xa632cc
// > X509v3_addr_canonize @ 0xa63f78
//
// 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:34 +0000
//
int __fastcall sub_A62688(_DWORD *a1, int a2, int a3)
{
int v3; // r5
_DWORD *v6; // r0
int v7; // r5
_DWORD *v8; // r7
int v9; // r0
int v10; // r1
int v11; // r4
int v13; // r0
v3 = a3 + 7;
if ( a3 + 7 < 0 )
v3 = a3 + 14;
v6 = IPAddressOrRange_new();
v7 = v3 >> 3;
v8 = v6;
if ( !v6 )
return 0;
v9 = v6[1];
*v8 = 0;
if ( !v9 && (v13 = ASN1_BIT_STRING_new(), (v8[1] = v13) == 0) || !ASN1_BIT_STRING_set() )
{
IPAddressOrRange_free(v8);
return 0;
}
v10 = v8[1];
v11 = a3 % 8;
*(_DWORD *)(v10 + 12) = *(_DWORD *)(v10 + 12) & 0xFFFFFFF0 | 8;
if ( v11 > 0 )
{
*(_BYTE *)(*(_DWORD *)(v10 + 8) + v7 - 1) &= ~(255 >> v11);
*(_DWORD *)(v8[1] + 12) |= 8 - v11;
}
*a1 = v8;
return 1;
}