// // ec_key_simple_generate_key from 0xd8fe2c to 0xd8ff68 (316 bytes) // // 5 xrefs: // > @ 0xc6900 // > @ 0x1222248 // > @ 0x12223c8 // > @ 0x1222548 // > @ 0x1227288 // // 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_generate_key(_QWORD *a1, __int64 a2, __int64 a3) { __int64 v4; // x22 __int64 v5; // x19 __int64 v6; // x20 __int64 v7; // x1 unsigned int v8; // w23 v4 = BN_CTX_new(a1, a2, a3); if ( v4 ) { v5 = a1[5]; if ( v5 || (v5 = BN_new()) != 0 ) { v6 = EC_GROUP_get0_order(a1[3]); if ( !v6 ) goto LABEL_19; do { if ( !(unsigned int)BN_rand_range(v5) ) { v6 = 0; v7 = a1[4]; v8 = 0; goto LABEL_8; } } while ( BN_is_zero(v5) ); v6 = a1[4]; if ( v6 || (v6 = EC_POINT_new(a1[3])) != 0 ) { if ( (unsigned int)EC_POINT_mul(a1[3], v6, v5, 0, 0, v4) ) { a1[5] = v5; v8 = 1; a1[4] = v6; goto LABEL_10; } v7 = a1[4]; v8 = 0; } else { LABEL_19: v7 = a1[4]; v8 = v6; } } else { v7 = a1[4]; v6 = 0; v8 = 0; } } else { v7 = a1[4]; v6 = 0; v5 = 0; v8 = 0; } LABEL_8: if ( !v7 ) EC_POINT_free(v6); LABEL_10: if ( a1[5] != v5 ) BN_free(v5); BN_CTX_free(v4); return v8; }
GD Web Decomp Icon

GD Web Decomp

Raw Source