// // ec_key_simple_check_key from 0x9fdc3c to 0x9fdee0 (676 bytes) // // 5 xrefs: // > @ 0x7b19c // > @ 0xd16e2c // > @ 0xd16ef0 // > @ 0xd16fb4 // > @ 0xd196f8 // // 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:36 +0000 // int __fastcall ec_key_simple_check_key(_DWORD *a1) { int v2; // r4 int v3; // r6 int v4; // r7 int *v6; // r8 int *v7; // r0 if ( a1 && a1[3] && a1[4] ) { v2 = ((int (*)(void))EC_POINT_is_at_infinity)(); if ( v2 ) { ERR_put_error(16, 258, 106, "crypto/ec/ec_key.c", 283); v3 = 0; v4 = 0; v2 = 0; LABEL_6: BN_CTX_free(v4); EC_POINT_free(v3); return v2; } v4 = BN_CTX_new(); if ( !v4 ) { v3 = 0; v2 = 0; goto LABEL_6; } v3 = EC_POINT_new(a1[3]); if ( v3 ) { if ( EC_POINT_is_on_curve(a1[3], a1[4], v4) <= 0 ) { ERR_put_error(16, 258, 107, "crypto/ec/ec_key.c", 294); goto LABEL_6; } v6 = *(int **)(a1[3] + 8); if ( BN_is_zero((int)v6) ) { ERR_put_error(16, 258, 122, "crypto/ec/ec_key.c", 300); goto LABEL_6; } v2 = EC_POINT_mul(a1[3], v3, 0, a1[4], v6, v4); if ( !v2 ) { ERR_put_error(16, 258, 16, "crypto/ec/ec_key.c", 304); goto LABEL_6; } if ( EC_POINT_is_at_infinity(a1[3], v3) ) { v7 = (int *)a1[5]; if ( v7 ) { if ( BN_cmp(v7, v6) >= 0 ) { ERR_put_error(16, 258, 130, "crypto/ec/ec_key.c", 317); v2 = 0; goto LABEL_6; } v2 = EC_POINT_mul(a1[3], v3, a1[5], 0, 0, v4); if ( !v2 ) { ERR_put_error(16, 258, 16, "crypto/ec/ec_key.c", 322); goto LABEL_6; } if ( EC_POINT_cmp(a1[3], v3, a1[4]) ) { v2 = 0; ERR_put_error(16, 258, 123, "crypto/ec/ec_key.c", 326); goto LABEL_6; } } v2 = 1; goto LABEL_6; } ERR_put_error(16, 258, 130, "crypto/ec/ec_key.c", 308); } v2 = 0; goto LABEL_6; } ERR_put_error(16, 258, 67, "crypto/ec/ec_key.c", 278); return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source