// // sub_D856C0 from 0xd856c0 to 0xd859a8 (744 bytes) // // 2 xrefs: // > @ 0x1122698 // > @ 0x1122770 // // 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 sub_D856C0(__int64 a1, __int64 a2, int a3) { __int64 v5; // x19 __int64 v6; // x20 __int64 v7; // x21 int v8; // w0 unsigned int v9; // w24 __int64 v10; // x2 __int64 v12; // x2 __int64 v13; // x2 __int64 v14; // x20 const char *v15; // x3 int v16; // w2 int v17; // w0 __int64 v18; // x2 v5 = *(_QWORD *)(a2 + 32); v6 = *(_QWORD *)(v5 + 40); v7 = *(_QWORD *)(v5 + 32); if ( *(_QWORD *)(v5 + 8) == 0 || v6 == 0 || !v7 ) { v10 = 67; } else { BIO_indent(a1, a3, 128); v8 = BN_num_bits(*(_QWORD *)(v5 + 8)); if ( (int)BIO_printf(a1, "%s: (%d bit)\n", "DH Private-Key", v8) > 0 ) { v9 = a3 + 4; if ( (unsigned int)ASN1_bn_print(a1, "private-key:", v6, 0, (unsigned int)(a3 + 4)) ) { if ( (unsigned int)ASN1_bn_print(a1, "public-key:", v7, 0, v9) ) { if ( (unsigned int)ASN1_bn_print(a1, "prime:", *(_QWORD *)(v5 + 8), 0, v9) ) { if ( (unsigned int)ASN1_bn_print(a1, "generator:", *(_QWORD *)(v5 + 16), 0, v9) ) { v12 = *(_QWORD *)(v5 + 64); if ( !v12 || (unsigned int)ASN1_bn_print(a1, "subgroup order:", v12, 0, v9) ) { v13 = *(_QWORD *)(v5 + 72); if ( !v13 || (unsigned int)ASN1_bn_print(a1, "subgroup factor:", v13, 0, v9) ) { if ( *(_QWORD *)(v5 + 80) ) { BIO_indent(a1, v9, 128); v14 = 0; BIO_puts(a1, (__int64)"seed:"); while ( 1 ) { v17 = *(_DWORD *)(v5 + 88); if ( (int)v14 >= v17 ) break; if ( 15 * ((int)v14 / 15) == (_DWORD)v14 ) { if ( (int)BIO_puts(a1, (__int64)&byte_F1AB78) <= 0 || !(unsigned int)BIO_indent(a1, a3 + 8, 128) ) goto LABEL_5; v17 = *(_DWORD *)(v5 + 88); } if ( (_DWORD)v14 + 1 == v17 ) v15 = &byte_F288A0; else v15 = ":"; v16 = *(unsigned __int8 *)(*(_QWORD *)(v5 + 80) + v14++); if ( (int)BIO_printf(a1, "%02x%s", v16, v15) <= 0 ) goto LABEL_5; } if ( (int)BIO_write(a1, (__int64)&byte_F1AB78, 1u) <= 0 ) return 0; } v18 = *(_QWORD *)(v5 + 96); if ( !v18 || (unsigned int)ASN1_bn_print(a1, "counter:", v18, 0, v9) ) { if ( !*(_QWORD *)(v5 + 24) ) return 1; BIO_indent(a1, v9, 128); if ( (int)BIO_printf(a1, "recommended-private-length: %d bits\n", *(_DWORD *)(v5 + 24)) > 0 ) return 1; } } } } } } } } LABEL_5: v10 = 7; } ERR_put_error(5, 100, v10, "crypto/dh/dh_ameth.c", 343); return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source