//
// i2s_ASN1_INTEGER from 0x85cfa4 to 0x85d014 (112 bytes)
//
// 16 xrefs:
// > sub_851B20 @ 0x851c08
// > sub_851B20 @ 0x851c48
// > sub_851B20 @ 0x851d14
// > sub_851B20 @ 0x851dcc
// > sub_851B20 @ 0x851e14
// > sub_851B20 @ 0x851e74
// > sub_854684 @ 0x8547cc
// > sub_85B704 @ 0x85b780
// > X509V3_add_value_int @ 0x85d1f0
// > sub_867C80 @ 0x868754
// > sub_867C80 @ 0x868a34
// > ASN1_item_print @ 0x8693d0
// > ??> @ 0x6898c
// > ??> @ 0xab58e8
// > ??> @ 0xab5920
// > ??> @ 0xab5958
//
// 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
//
_BYTE *__fastcall i2s_ASN1_INTEGER(int a1, int a2)
{
_DWORD *v2; // r0
int v3; // r5
_BYTE *v4; // r4
if ( !a2 )
return nullptr;
v2 = (_DWORD *)ASN1_INTEGER_to_BN(a2, 0);
v3 = (int)v2;
if ( !v2 || (v4 = BN_bn2dec(v2)) == nullptr )
{
ERR_put_error(34, 120, 65, (int)"crypto/x509v3/v3_utl.c", 120);
v4 = nullptr;
}
BN_free(v3);
return v4;
}