// // sub_1005C2F18 from 0x1005c2f18 to 0x1005c3200 (744 bytes) // // 3 xrefs: // > sub_1005C1D90 @ 0x1005c1d98 // > sub_1005C210C @ 0x1005c2114 // > sub_1005C22B8 @ 0x1005c22c0 // // 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_1005C2F18(__int64 a1, __int64 a2, __int64 a3, int a4) { __int64 v8; // x24 void **v9; // x19 __int64 v10; // x20 __int64 v11; // x0 __int64 v12; // x0 _BYTE *v13; // x20 int v14; // w0 int v15; // w8 unsigned __int64 v16; // x27 _BYTE *v17; // x25 _BYTE *v18; // x21 __int64 v19; // x2 __int64 v20; // x26 __int64 v21; // x0 int v22; // w0 int v23; // w8 unsigned __int64 v24; // x8 char v25; // w28 const char *v26; // x27 int v27; // w0 __int64 v28; // x22 if ( !a2 || (v8 = sub_1005BFADC(a2)) == 0 ) { v13 = nullptr; v17 = nullptr; v9 = nullptr; v18 = nullptr; v19 = 67; goto LABEL_45; } v9 = (void **)sub_1005ABAC8(); if ( !v9 ) { v13 = nullptr; v17 = nullptr; v9 = nullptr; LABEL_44: v18 = nullptr; v19 = 65; goto LABEL_45; } if ( a4 < 1 ) { v18 = nullptr; v13 = nullptr; v20 = 0; goto LABEL_28; } v10 = sub_1005BFB6C(a2); if ( v10 ) { v11 = sub_1005BFB84(a2); v12 = sub_1005BD6B8(v8, v10, v11, 0, (__int64)v9); v13 = (_BYTE *)v12; if ( !v12 ) { v13 = nullptr; v17 = nullptr; v18 = nullptr; v19 = 16; goto LABEL_45; } v14 = sub_1005AAC20(v12); v15 = v14 + 7; if ( v14 + 7 < 0 ) v15 = v14 + 14; v16 = v15 >> 3; } else { v16 = 0; v13 = nullptr; } if ( a4 == 2 ) { v21 = sub_1005BFB24(a2); v20 = v21; if ( v21 ) { v22 = sub_1005AAC20(v21); v23 = v22 + 7; if ( v22 + 7 < 0 ) v23 = v22 + 14; v24 = v23 >> 3; if ( v24 > v16 ) LODWORD(v16) = v24; } else { v20 = 0; } v25 = 1; } else { v25 = 0; v20 = 0; } v18 = sub_100588710((unsigned int)(v16 + 10), (__int64)"ec_ameth.c", 457); if ( !v18 ) { v17 = nullptr; goto LABEL_44; } if ( (v25 & 1) == 0 ) { LABEL_28: if ( a4 == 1 ) v26 = "Public-Key"; else v26 = "ECDSA-Parameters"; goto LABEL_31; } v26 = "Private-Key"; LABEL_31: if ( (unsigned int)sub_1005DAA18(a1, a3, 128) && (v17 = sub_1005AAD34()) != nullptr ) { if ( sub_1005B7BE4(v8, (__int64)v17) ) { v27 = sub_1005AAC20((__int64)v17); if ( (int)sub_1005DCA40(a1, "%s: (%d bit)\n", v26, v27) >= 1 && (!v20 || (unsigned int)sub_1005F5388(a1, "priv:", v20, v18, a3)) && (!v13 || (unsigned int)sub_1005F5388(a1, "pub: ", v13, v18, a3)) && (unsigned int)sub_1005C3DA8(a1, v8, a3) ) { v28 = 1; goto LABEL_46; } } } else { v17 = nullptr; } v19 = 32; LABEL_45: sub_1005E0E48(16, 221, v19, "ec_ameth.c", 489); v28 = 0; LABEL_46: if ( v13 ) sub_1005AACD0(v13); if ( v17 ) sub_1005AACD0(v17); if ( v9 ) sub_1005ABB2C(v9); if ( v18 ) sub_100588C44(v18); return v28; }
GD Web Decomp Icon

GD Web Decomp

Raw Source