// // ec_GF2m_simple_set_compressed_coordinates from 0x10b092c to 0x10b0ba8 (636 bytes) // // 3 xrefs: // > EC_POINT_set_compressed_coordinates_GFp @ 0x10120e4 // > EC_POINT_set_compressed_coordinates_GF2m @ 0x10121e0 // > @ 0x9b740 // // 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:43 +0000 // int32x2_t *__fastcall ec_GF2m_simple_set_compressed_coordinates( _QWORD *a1, _QWORD *a2, __int64 a3, int a4, int32x2_t *a5) { void **v10; // x21 __int64 v11; // x26 __int64 v12; // x22 __int64 v13; // x27 __int64 v14; // x23 _BOOL4 v15; // w20 int32x2_t *result; // x0 __int64 error; // x0 int is_odd; // w24 v10 = nullptr; ERR_clear_error(); if ( a5 ) { LABEL_2: BN_CTX_start((unsigned __int64)a5); v11 = BN_CTX_get(a5); v12 = BN_CTX_get(a5); v13 = BN_CTX_get(a5); v14 = BN_CTX_get(a5); if ( !v14 || !(unsigned int)BN_GF2m_mod_arr(v12, a3, a1 + 9) ) goto LABEL_4; if ( BN_is_zero(v12) ) { if ( !(unsigned int)BN_GF2m_mod_sqrt_arr(v13, a1[13], a1 + 9, a5) ) { LABEL_4: v15 = 0; LABEL_5: BN_CTX_end((__int64)a5); BN_CTX_free(v10); return (int32x2_t *)v15; } } else { if ( !(*(unsigned int (__fastcall **)(_QWORD *, __int64, __int64, int32x2_t *))(*a1 + 272LL))(a1, v11, v12, a5) || !(*(unsigned int (__fastcall **)(_QWORD *, __int64, _QWORD, __int64, int32x2_t *))(*a1 + 280LL))( a1, v11, a1[13], v11, a5) || !(unsigned int)BN_GF2m_add(v11, a1[12], v11) || !(unsigned int)BN_GF2m_add(v11, v12, v11) ) { goto LABEL_4; } if ( !(unsigned int)BN_GF2m_mod_solve_quad_arr(v14, v11, a1 + 9, a5) ) { error = ERR_peek_last_error(); if ( BYTE3(error) == 3 && (error & 0xFFF) == 0x74 ) { ERR_clear_error(); v15 = 0; ERR_put_error(16, 164, 110, (__int64)"crypto/ec/ec2_oct.c", 96); } else { v15 = 0; ERR_put_error(16, 164, 3, (__int64)"crypto/ec/ec2_oct.c", 99); } goto LABEL_5; } is_odd = BN_is_odd(v14); if ( !(*(unsigned int (__fastcall **)(_QWORD *, __int64, __int64, __int64, int32x2_t *))(*a1 + 264LL))( a1, v13, v12, v14, a5) || (a4 != 0) != (is_odd != 0) && !(unsigned int)BN_GF2m_add(v13, v13, v12) ) { goto LABEL_4; } } v15 = EC_POINT_set_affine_coordinates_GF2m((__int64)a1, a2) != 0; goto LABEL_5; } result = (int32x2_t *)BN_CTX_new(); a5 = result; if ( result ) { v10 = (void **)result; goto LABEL_2; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source