// // DHparams_print from 0x7dfa7c to 0x7dfd6c (752 bytes) // // 1 xrefs: // > @ 0x609fc // // 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 DHparams_print(int a1, _DWORD *a2) { int v4; // r0 int v5; // r2 int v7; // r2 int v8; // r2 int v9; // r6 int v10; // r2 char *v11; // r3 int v12; // r1 int v13; // r2 if ( !a2[2] ) { v5 = 67; goto LABEL_5; } BIO_indent(a1, 4, 128); v4 = BN_num_bits((_DWORD *)a2[2]); if ( BIO_printf(a1, "%s: (%d bit)\n", "DH Parameters", v4) <= 0 || !ASN1_bn_print(a1, "private-key:", 0, 0, 8) || !ASN1_bn_print(a1, "public-key:", 0, 0, 8) || !ASN1_bn_print(a1, "prime:", a2[2], 0, 8) || !ASN1_bn_print(a1, "generator:", a2[3], 0, 8) || (v7 = a2[9]) != 0 && !ASN1_bn_print(a1, "subgroup order:", v7, 0, 8) || (v8 = a2[10]) != 0 && !ASN1_bn_print(a1, "subgroup factor:", v8, 0, 8) ) { LABEL_4: v5 = 7; LABEL_5: ERR_put_error(5, 100, v5, "crypto/dh/dh_ameth.c", 343); return 0; } if ( !a2[11] ) goto LABEL_25; BIO_indent(a1, 8, 128); BIO_puts(a1, (int)"seed:"); v9 = 0; while ( 1 ) { v12 = a2[12]; if ( v9 >= v12 ) break; if ( v9 == 15 * (v9 / 15) ) { if ( BIO_puts(a1, (int)"\n") <= 0 || !BIO_indent(a1, 12, 128) ) goto LABEL_4; v12 = a2[12]; } v10 = *(unsigned __int8 *)(a2[11] + v9++); if ( v12 == v9 ) v11 = &byte_9B1912; else v11 = (char *)&unk_9B1F30; if ( BIO_printf(a1, "%02x%s", v10, v11) <= 0 ) goto LABEL_4; } if ( BIO_write(a1, (int)"\n", 1) > 0 ) { LABEL_25: v13 = a2[13]; if ( !v13 || ASN1_bn_print(a1, "counter:", v13, 0, 8) ) { if ( !a2[4] ) return 1; BIO_indent(a1, 8, 128); if ( BIO_printf(a1, "recommended-private-length: %d bits\n", a2[4]) > 0 ) return 1; } goto LABEL_4; } return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source