// // ECDH_KDF_X9_62 from 0x88b708 to 0x88b878 (368 bytes) // // 2 xrefs: // > sub_88B1F4 @ 0x88b310 // > @ 0x6aa7c // // 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 // int __fastcall ECDH_KDF_X9_62(char *a1, unsigned int a2, int a3, unsigned int a4, int a5, unsigned int a6, int a7) { bool v7; // cc size_t v8; // r6 int v9; // r3 int *v12; // r5 int v13; // r4 unsigned int v14; // r7 int v15; // r0 int v16; // r1 int v17; // r4 _BYTE v18[68]; // [sp+8h] [bp-44h] BYREF v7 = a4 > 0x40000000; if ( a4 <= 0x40000000 ) v7 = a2 > 0x40000000; v8 = a2; v9 = v7; if ( a6 > 0x40000000 ) v9 |= 1u; if ( v9 ) return 0; v12 = (int *)EVP_MD_CTX_new(); if ( !v12 ) return 0; v13 = 1; v14 = EVP_MD_size(a7); while ( 1 ) { if ( !EVP_DigestInit_ex(v12, a7, nullptr) ) goto LABEL_19; ++v13; if ( !EVP_DigestUpdate((int)v12) ) goto LABEL_19; if ( !EVP_DigestUpdate((int)v12) ) goto LABEL_19; v15 = EVP_DigestUpdate((int)v12); v16 = (int)a1; if ( !v15 ) goto LABEL_19; if ( v8 < v14 ) break; a1 += v14; if ( !EVP_DigestFinal((int **)v12, v16, nullptr) ) goto LABEL_19; v8 -= v14; if ( !v8 ) goto LABEL_23; } if ( !EVP_DigestFinal((int **)v12, (int)v18, nullptr) ) { LABEL_19: v17 = 0; goto LABEL_20; } memcpy(a1, v18, v8); OPENSSL_cleanse(v18, v14); LABEL_23: v17 = 1; LABEL_20: EVP_MD_CTX_free(v12); return v17; }