// // ec_key_simple_check_key from 0xd90014 to 0xd902a8 (660 bytes) // // 5 xrefs: // > @ 0x6a5a8 // > @ 0x1222250 // > @ 0x12223d0 // > @ 0x1222550 // > @ 0x1227290 // // 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 // __int64 __fastcall ec_key_simple_check_key(_QWORD *a1) { __int64 v2; // x0 __int64 v3; // x1 __int64 v4; // x2 unsigned int v5; // w19 __int64 v6; // x21 __int64 v7; // x22 __int64 *v9; // x23 __int64 *v10; // x0 if ( a1 && a1[3] && a1[4] ) { v2 = ((__int64 (*)(void))EC_POINT_is_at_infinity)(); v5 = v2; if ( (_DWORD)v2 ) { v6 = 0; v7 = 0; v5 = 0; ERR_put_error(16, 258, 106, "crypto/ec/ec_key.c", 283); } else { v7 = BN_CTX_new(v2, v3, v4); if ( v7 ) { v6 = EC_POINT_new(a1[3]); if ( v6 ) { if ( (int)EC_POINT_is_on_curve(a1[3], a1[4], v7) <= 0 ) { ERR_put_error(16, 258, 107, "crypto/ec/ec_key.c", 294); } else { v9 = *(__int64 **)(a1[3] + 16LL); if ( BN_is_zero((__int64)v9) ) { ERR_put_error(16, 258, 122, "crypto/ec/ec_key.c", 300); } else { v5 = EC_POINT_mul(a1[3], v6, 0, a1[4], v9, v7); if ( v5 ) { if ( (unsigned int)EC_POINT_is_at_infinity(a1[3], v6) ) { v10 = (__int64 *)a1[5]; if ( v10 ) { if ( (BN_cmp(v10, v9) & 0x80000000) != 0 ) { v5 = EC_POINT_mul(a1[3], v6, a1[5], 0, 0, v7); if ( v5 ) { v5 = 1; if ( (unsigned int)EC_POINT_cmp(a1[3], v6, a1[4], v7) ) { v5 = 0; ERR_put_error(16, 258, 123, "crypto/ec/ec_key.c", 326); } } else { ERR_put_error(16, 258, 16, "crypto/ec/ec_key.c", 322); } } else { v5 = 0; ERR_put_error(16, 258, 130, "crypto/ec/ec_key.c", 317); } } else { v5 = 1; } } else { v5 = 0; ERR_put_error(16, 258, 130, "crypto/ec/ec_key.c", 308); } } else { ERR_put_error(16, 258, 16, "crypto/ec/ec_key.c", 304); } } } } else { v5 = 0; } } else { v6 = 0; v5 = 0; } } BN_CTX_free(v7); EC_POINT_free(v6); return v5; } else { ERR_put_error(16, 258, 67, "crypto/ec/ec_key.c", 278); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source