// // sub_1004670 from 0x1004670 to 0x1004938 (712 bytes) // // 2 xrefs: // > @ 0x13ffc70 // > @ 0x13ffd48 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:15:55 +0000 // __int64 __fastcall sub_1004670(__int64 a1, __int64 a2, int a3) { __int64 v5; // x19 int v6; // w0 unsigned int v7; // w22 __int64 v8; // x2 __int64 v10; // x2 __int64 v11; // x2 __int64 v12; // x23 const char *v13; // x3 int v14; // w2 int v15; // w0 __int64 v16; // x2 v5 = *(_QWORD *)(a2 + 32); if ( *(_QWORD *)(v5 + 8) ) { BIO_indent(a1, a3, 128); v6 = BN_num_bits(*(_QWORD *)(v5 + 8)); if ( (int)BIO_printf(a1, "%s: (%d bit)\n", "DH Parameters", v6) > 0 ) { v7 = a3 + 4; if ( (unsigned int)ASN1_bn_print(a1, "private-key:", 0, 0, (unsigned int)(a3 + 4)) ) { if ( (unsigned int)ASN1_bn_print(a1, "public-key:", 0, 0, v7) ) { if ( (unsigned int)ASN1_bn_print(a1, "prime:", *(_QWORD *)(v5 + 8), 0, v7) ) { if ( (unsigned int)ASN1_bn_print(a1, "generator:", *(_QWORD *)(v5 + 16), 0, v7) ) { v10 = *(_QWORD *)(v5 + 64); if ( !v10 || (unsigned int)ASN1_bn_print(a1, "subgroup order:", v10, 0, v7) ) { v11 = *(_QWORD *)(v5 + 72); if ( !v11 || (unsigned int)ASN1_bn_print(a1, "subgroup factor:", v11, 0, v7) ) { if ( *(_QWORD *)(v5 + 80) ) { BIO_indent(a1, v7, 128); v12 = 0; BIO_puts(a1, (__int64)"seed:"); while ( 1 ) { v15 = *(_DWORD *)(v5 + 88); if ( (int)v12 >= v15 ) break; if ( 15 * ((int)v12 / 15) == (_DWORD)v12 ) { if ( (int)BIO_puts(a1, (__int64)&byte_11AAA48) <= 0 || !(unsigned int)BIO_indent(a1, a3 + 8, 128) ) { goto LABEL_4; } v15 = *(_DWORD *)(v5 + 88); } if ( (_DWORD)v12 + 1 == v15 ) v13 = &byte_11B8890; else v13 = ":"; v14 = *(unsigned __int8 *)(*(_QWORD *)(v5 + 80) + v12++); if ( (int)BIO_printf(a1, "%02x%s", v14, v13) <= 0 ) goto LABEL_4; } if ( (int)BIO_write(a1, (__int64)&byte_11AAA48, 1u) <= 0 ) return 0; } v16 = *(_QWORD *)(v5 + 96); if ( !v16 || (unsigned int)ASN1_bn_print(a1, "counter:", v16, 0, v7) ) { if ( !*(_QWORD *)(v5 + 24) ) return 1; BIO_indent(a1, v7, 128); if ( (int)BIO_printf(a1, "recommended-private-length: %d bits\n", *(_DWORD *)(v5 + 24)) > 0 ) return 1; } } } } } } } } LABEL_4: v8 = 7; } else { v8 = 67; } ERR_put_error(5, 100, v8, "crypto/dh/dh_ameth.c", 343); return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source