//
// sub_9DF694 from 0x9df694 to 0x9df7e4 (336 bytes)
//
// 1 xrefs:
// > ??> @ 0xd25c48
//
// 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:07:20 +0000
//
int __fastcall sub_9DF694(void *a1, unsigned __int8 *a2, int a3, int a4, int a5, int a6)
{
int v6; // r3
int v8; // r3
_DWORD v9[2]; // [sp+Ch] [bp-8h] BYREF
if ( a3 > 4 )
{
ERR_put_error(13, 166, 128, "crypto/asn1/x_long.c", 113);
return 0;
}
if ( a3 )
{
if ( (*a2 & 0x80u) != 0 )
{
if ( a3 > 0 )
{
v8 = (unsigned __int8)~*a2;
if ( a3 != 1 )
{
v8 = (unsigned __int8)~a2[1] | (v8 << 8);
if ( a3 != 2 )
{
v8 = (unsigned __int8)~a2[2] | (v8 << 8);
if ( a3 == 4 )
v8 = (unsigned __int8)~a2[3] | (v8 << 8);
}
}
v6 = ~v8;
}
else
{
v6 = -1;
}
goto LABEL_9;
}
if ( a3 > 0 )
{
v6 = *a2;
if ( a3 != 1 )
{
v6 = a2[1] | (v6 << 8);
if ( a3 != 2 )
{
v6 = a2[2] | (v6 << 8);
if ( a3 == 4 )
v6 = a2[3] | (v6 << 8);
}
}
LABEL_9:
v9[0] = v6;
goto LABEL_10;
}
}
v6 = 0;
v9[0] = 0;
LABEL_10:
if ( *(_DWORD *)(a6 + 20) == v6 )
{
ERR_put_error(13, 166, 128, "crypto/asn1/x_long.c", 135);
return 0;
}
else
{
memcpy(a1, v9, 4u);
return 1;
}
}