// // sub_1005C3DA8 from 0x1005c3da8 to 0x1005c453c (1940 bytes) // // 1 xrefs: // > sub_1005C2F18 @ 0x1005c3168 // // 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_1005C3DA8(__int64 a1, __int64 a2, __int64 a3) { void **v6; // x19 unsigned int v7; // w0 int v8; // w20 char *v9; // x0 char *v10; // x20 _BYTE *v11; // x26 __int64 v12; // x27 _BYTE *v13; // x20 _BYTE *v14; // x21 _BYTE *v15; // x22 _BYTE *v16; // x25 _BYTE *v17; // x23 _BYTE *v18; // x24 __int64 v19; // x2 __int64 v20; // x0 unsigned int v21; // w25 __int64 v23; // x25 __int64 v24; // x0 int v25; // w0 int v26; // w8 unsigned int v27; // w26 int v28; // w0 int v29; // w8 unsigned int v30; // w8 int v31; // w0 int v32; // w8 unsigned int v33; // w8 int v34; // w0 int v35; // w8 unsigned int v36; // w8 int v37; // w0 int v38; // w8 unsigned int v39; // w8 int v40; // w0 int v41; // w8 unsigned int v42; // w8 char *v43; // x0 unsigned int v44; // w27 char *v45; // x0 __int64 v46; // x27 const char *v47; // x1 char *v48; // x1 __int64 v49; // x27 unsigned __int64 v50; // x28 const char *v51; // x8 int v52; // w0 unsigned __int64 v53; // [xsp+30h] [xbp-100h] __int64 v54; // [xsp+38h] [xbp-F8h] int v55; // [xsp+44h] [xbp-ECh] __int64 v56; // [xsp+48h] [xbp-E8h] __int64 v57; // [xsp+48h] [xbp-E8h] unsigned int v58; // [xsp+50h] [xbp-E0h] char v59; // [xsp+58h] [xbp-D8h] BYREF _BYTE v60[7]; // [xsp+59h] [xbp-D7h] BYREF if ( a2 ) { v6 = (void **)sub_1005ABAC8(); if ( v6 ) { if ( (unsigned int)sub_1005B7C88(a2) ) { if ( (unsigned int)sub_1005DAA18(a1, a3, 128) ) { v7 = sub_1005B7C70(a2); v8 = v7; if ( v7 ) { v9 = sub_10058AC68(v7); if ( (int)sub_1005DCA40(a1, "ASN1 OID: %s", v9) >= 1 && (int)sub_1005DCA40(a1, "\n") >= 1 ) { v10 = sub_1005BD448(v8); if ( !v10 ) { v11 = nullptr; v12 = 1; goto LABEL_45; } if ( (unsigned int)sub_1005DAA18(a1, a3, 128) && (int)sub_1005DCA40(a1, "NIST CURVE: %s\n", v10) >= 1 ) { v11 = nullptr; v12 = 1; goto LABEL_42; } } } } v13 = nullptr; v14 = nullptr; v15 = nullptr; v16 = nullptr; v17 = nullptr; v18 = nullptr; v11 = nullptr; goto LABEL_15; } v20 = sub_1005B79D8(a2); v21 = sub_1005B79E0(v20); v13 = sub_1005AAD34(); if ( v13 ) { v14 = sub_1005AAD34(); if ( v14 ) { v15 = sub_1005AAD34(); if ( v15 ) { v17 = sub_1005AAD34(); if ( v17 ) { v18 = sub_1005AAD34(); if ( v18 ) { if ( v21 == 407 ) { if ( !(unsigned int)sub_1005B7E04(a2) ) goto LABEL_79; } else if ( !(unsigned int)sub_1005B7D7C(a2) ) { LABEL_79: v16 = nullptr; v11 = nullptr; v19 = 16; goto LABEL_29; } v58 = v21; v23 = sub_1005B7BC4(a2); if ( !v23 ) goto LABEL_79; if ( !sub_1005B7BE4(a2, (__int64)v17) ) goto LABEL_79; if ( !sub_1005B7C24(a2, (__int64)v18) ) goto LABEL_79; v24 = sub_1005B7C9C(a2); v55 = v24; v16 = (_BYTE *)sub_1005BD6B8(a2, v23, v24, 0, (__int64)v6); if ( !v16 ) goto LABEL_79; v56 = a1; v25 = sub_1005AAC20((__int64)v13); v26 = v25 + 7; if ( v25 + 7 < 0 ) v26 = v25 + 14; v27 = v26 >> 3; v28 = sub_1005AAC20((__int64)v14); v29 = v28 + 7; if ( v28 + 7 < 0 ) v29 = v28 + 14; v30 = v29 >> 3; if ( v27 < v30 ) v27 = v30; v31 = sub_1005AAC20((__int64)v15); v32 = v31 + 7; if ( v31 + 7 < 0 ) v32 = v31 + 14; v33 = v32 >> 3; if ( v27 < v33 ) v27 = v33; v34 = sub_1005AAC20((__int64)v16); v35 = v34 + 7; if ( v34 + 7 < 0 ) v35 = v34 + 14; v36 = v35 >> 3; if ( v27 < v36 ) v27 = v36; v37 = sub_1005AAC20((__int64)v17); v38 = v37 + 7; if ( v37 + 7 < 0 ) v38 = v37 + 14; v39 = v38 >> 3; if ( v27 < v39 ) v27 = v39; v40 = sub_1005AAC20((__int64)v18); v41 = v40 + 7; if ( v40 + 7 < 0 ) v41 = v40 + 14; v42 = v41 >> 3; if ( v27 < v42 ) v27 = v42; v54 = sub_1005B7D28(a2); if ( v54 ) v53 = sub_1005B7D30(a2); else v53 = 0; v11 = sub_100588710(v27 + 10, (__int64)"eck_prn.c", 257); if ( v11 ) { if ( (unsigned int)sub_1005DAA18(v56, a3, 128) ) { v43 = sub_10058AC68(v58); if ( (int)sub_1005DCA40(v56, "Field Type: %s\n", v43) >= 1 ) { if ( v58 != 407 ) { v47 = "Prime:"; v46 = v56; LABEL_90: if ( !(unsigned int)sub_1005F5388(v46, v47, v13, v11, a3) ) goto LABEL_15; if ( !(unsigned int)sub_1005F5388(v46, "A: ", v14, v11, a3) ) goto LABEL_15; v57 = v46; if ( !(unsigned int)sub_1005F5388(v46, "B: ", v15, v11, a3) ) goto LABEL_15; if ( v55 == 4 ) v48 = "Generator (uncompressed):"; else v48 = v55 == 2 ? "Generator (compressed):" : "Generator (hybrid):"; if ( !(unsigned int)sub_1005F5388(v46, v48, v16, v11, a3) || !(unsigned int)sub_1005F5388(v46, "Order: ", v17, v11, a3) || !(unsigned int)sub_1005F5388(v46, "Cofactor: ", v18, v11, a3) ) { goto LABEL_15; } if ( !v54 ) { v12 = 1; goto LABEL_30; } if ( (int)a3 < 1 ) { LODWORD(v49) = 0; } else { if ( (int)a3 <= 128 ) v49 = (unsigned int)a3; else v49 = 128; __memset_chk(&v59, 32, (int)v49, 128); if ( (int)sub_1005DA72C(v57, &v59, v49) < 1 ) goto LABEL_15; } if ( (int)sub_1005DCA40(v57, "%s", "Seed:") >= 1 ) { v50 = 0; while ( v50 < v53 ) { if ( v50 % 0xF || (v59 = 10, __memset_chk(v60, 32, (int)v49 + 4, 127), (int)sub_1005DA72C(v57, &v59, (unsigned int)(v49 + 5)) >= 1) ) { v51 = ":"; if ( v53 - 1 == v50 ) v51 = ""; v52 = sub_1005DCA40(v57, "%02x%s", *(unsigned __int8 *)(v54 + v50++), v51); if ( v52 > 0 ) continue; } goto LABEL_15; } v12 = 1; if ( (int)sub_1005DA72C(v57, "\n", 1) > 0 ) goto LABEL_30; } goto LABEL_15; } v44 = sub_1005BD780(a2); if ( v44 ) { if ( (unsigned int)sub_1005DAA18(v56, a3, 128) ) { v45 = sub_10058AC68(v44); v46 = v56; if ( (int)sub_1005DCA40(v56, "Basis Type: %s\n", v45) >= 1 ) { v47 = "Polynomial:"; goto LABEL_90; } } } } } LABEL_15: v19 = 32; goto LABEL_29; } } else { v16 = nullptr; v18 = nullptr; } LABEL_28: v11 = nullptr; v19 = 65; goto LABEL_29; } } else { v15 = nullptr; } } else { v14 = nullptr; v15 = nullptr; } } else { v13 = nullptr; v14 = nullptr; v15 = nullptr; } v16 = nullptr; v17 = nullptr; v18 = nullptr; goto LABEL_28; } v13 = nullptr; v14 = nullptr; v15 = nullptr; v16 = nullptr; v17 = nullptr; v18 = nullptr; v6 = nullptr; goto LABEL_28; } v13 = nullptr; v14 = nullptr; v15 = nullptr; v16 = nullptr; v17 = nullptr; v18 = nullptr; v6 = nullptr; v11 = nullptr; v19 = 67; LABEL_29: sub_1005E0E48(16, 149, v19, "eck_prn.c", 321); v12 = 0; LABEL_30: if ( v13 ) sub_1005AACD0(v13); if ( v14 ) sub_1005AACD0(v14); if ( v15 ) sub_1005AACD0(v15); if ( v16 ) sub_1005AACD0(v16); if ( v17 ) sub_1005AACD0(v17); if ( v18 ) sub_1005AACD0(v18); LABEL_42: if ( v6 ) LABEL_45: sub_1005ABB2C(v6); if ( v11 ) sub_100588C44(v11); return v12; }
GD Web Decomp Icon

GD Web Decomp

Raw Source