// // ec_GFp_simple_cmp from 0xd9a2c8 to 0xd9a568 (672 bytes) // // 4 xrefs: // > @ 0xa4f28 // > @ 0x12221d0 // > @ 0x1222350 // > @ 0x12224d0 // // 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_GFp_simple_cmp(_QWORD *a1, __int64 a2, __int64 a3, __int64 a4) { __int64 v8; // x2 __int64 v9; // x0 __int64 v10; // x25 unsigned int (__fastcall *v11)(_QWORD *, __int64, __int64, __int64, __int64); // x28 unsigned int (__fastcall *v12)(_QWORD *, __int64, _QWORD, __int64); // x21 __int64 v13; // d9 __int64 v14; // d10 __int64 v15; // x27 __int64 v16; // x24 __int64 *v17; // x26 __int64 *v18; // d8 unsigned int v19; // w21 __int64 v21; // x0 if ( (unsigned int)EC_POINT_is_at_infinity((__int64)a1, (_QWORD *)a2) ) return (unsigned int)EC_POINT_is_at_infinity((__int64)a1, (_QWORD *)a3) == 0; if ( (unsigned int)EC_POINT_is_at_infinity((__int64)a1, (_QWORD *)a3) ) return 1; v9 = *(unsigned int *)(a2 + 32); if ( !(_DWORD)v9 || (v9 = *(unsigned int *)(a3 + 32), !(_DWORD)v9) ) { v10 = 0; v11 = *(unsigned int (__fastcall **)(_QWORD *, __int64, __int64, __int64, __int64))(*a1 + 264LL); v12 = *(unsigned int (__fastcall **)(_QWORD *, __int64, _QWORD, __int64))(*a1 + 272LL); if ( !a4 ) { v21 = BN_CTX_new(v9, *a1, v8); a4 = v21; if ( !v21 ) return 0xFFFFFFFFLL; v10 = v21; } BN_CTX_start(a4); v13 = BN_CTX_get(a4); v14 = BN_CTX_get(a4); v15 = BN_CTX_get(a4); v16 = BN_CTX_get(a4); if ( !v16 ) goto LABEL_21; if ( *(_DWORD *)(a3 + 32) ) { v17 = *(__int64 **)(a2 + 8); } else { if ( !v12(a1, v16, *(_QWORD *)(a3 + 24), a4) ) goto LABEL_21; v17 = (__int64 *)v13; if ( !v11(a1, v13, *(_QWORD *)(a2 + 8), v16, a4) ) goto LABEL_21; } if ( *(_DWORD *)(a2 + 32) ) { v18 = *(__int64 **)(a3 + 8); } else { if ( !v12(a1, v15, *(_QWORD *)(a2 + 24), a4) || !v11(a1, v14, *(_QWORD *)(a3 + 8), v15, a4) ) goto LABEL_21; v18 = (__int64 *)v14; } v19 = 1; if ( (unsigned int)BN_cmp(v17, v18) ) { LABEL_22: BN_CTX_end(a4); BN_CTX_free(v10); return v19; } if ( *(_DWORD *)(a3 + 32) ) { v17 = *(__int64 **)(a2 + 16); } else if ( !v11(a1, v16, v16, *(_QWORD *)(a3 + 24), a4) || !v11(a1, v13, *(_QWORD *)(a2 + 16), v16, a4) ) { goto LABEL_21; } if ( *(_DWORD *)(a2 + 32) ) { v18 = *(__int64 **)(a3 + 16); LABEL_15: v19 = BN_cmp(v17, v18) != 0; goto LABEL_22; } if ( v11(a1, v15, v15, *(_QWORD *)(a2 + 24), a4) && v11(a1, v14, *(_QWORD *)(a3 + 16), v15, a4) ) goto LABEL_15; LABEL_21: v19 = -1; goto LABEL_22; } if ( (unsigned int)BN_cmp(*(__int64 **)(a2 + 8), *(__int64 **)(a3 + 8)) ) return 1; return (unsigned int)BN_cmp(*(__int64 **)(a2 + 16), *(__int64 **)(a3 + 16)) != 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source