// // BN_to_ASN1_ENUMERATED from 0x108932c to 0x1089474 (328 bytes) // // 1 xrefs: // > @ 0x536b0 // // 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:14 +0000 // __int64 __fastcall BN_to_ASN1_ENUMERATED(_QWORD *a1, __int64 a2) { __int64 v4; // x19 int v5; // w0 int v6; // w3 int v7; // w20 if ( a2 ) { v4 = a2; *(_DWORD *)(a2 + 4) = 10; } else { v4 = ASN1_STRING_type_new(10); if ( !v4 ) { ERR_put_error(13, 229, 58, (__int64)"crypto/asn1/a_int.c", 484); return 0; } } if ( BN_is_negative((__int64)a1) && !BN_is_zero((__int64)a1) ) *(_DWORD *)(v4 + 4) |= 0x102u; v5 = BN_num_bits((__int64)a1); v6 = v5 + 7; if ( v5 + 7 < 0 ) v6 = v5 + 14; v7 = v6 >> 3; if ( !(v6 >> 3) ) v7 = 1; if ( (unsigned int)ASN1_STRING_set(v4, nullptr, v7) ) { if ( BN_is_zero((__int64)a1) ) **(_BYTE **)(v4 + 8) = 0; else v7 = BN_bn2bin(a1, *(_BYTE **)(v4 + 8)); *(_DWORD *)v4 = v7; return v4; } else { ERR_put_error(13, 229, 65, (__int64)"crypto/asn1/a_int.c", 497); if ( a2 != v4 ) ASN1_INTEGER_free(v4); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source