// // PKCS7_SIGNER_INFO_sign from 0xdcd374 to 0xdcd594 (544 bytes) // // 2 xrefs: // > PKCS7_dataFinal @ 0xdcdaa8 // > @ 0xa4f88 // // 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 PKCS7_SIGNER_INFO_sign(__int64 a1) { __int64 v2; // x0 unsigned int v3; // w0 char *v4; // x0 __int64 result; // x0 __int64 v6; // x19 __int64 *v7; // x0 __int64 *v8; // x21 void *v9; // x3 __int64 *v10; // [xsp+48h] [xbp+48h] BYREF void *v11; // [xsp+50h] [xbp+50h] BYREF void *v12; // [xsp+58h] [xbp+58h] BYREF v2 = **(_QWORD **)(a1 + 16); v11 = nullptr; v3 = OBJ_obj2nid(v2); v4 = OBJ_nid2sn(v3); result = EVP_get_digestbyname((__int64)v4); v6 = result; if ( result ) { v7 = (__int64 *)EVP_MD_CTX_new(); v8 = v7; if ( !v7 ) { ERR_put_error(33, 139, 65, (__int64)"crypto/pkcs7/pk7_doit.c", 828); v9 = v11; goto LABEL_13; } if ( (int)EVP_DigestSignInit(v7, &v10, v6, 0, *(_QWORD *)(a1 + 56)) > 0 ) { if ( (int)EVP_PKEY_CTX_ctrl(v10, -1, 8) <= 0 ) { ERR_put_error(33, 139, 152, (__int64)"crypto/pkcs7/pk7_doit.c", 837); v9 = v11; goto LABEL_13; } ASN1_item_i2d(*(_QWORD *)(a1 + 24), (__int64 *)&v11, (__int64)&PKCS7_ATTR_SIGN_it); v9 = v11; if ( !v11 ) { LABEL_13: CRYPTO_free(v9, (__int64)"crypto/pkcs7/pk7_doit.c", 870); EVP_MD_CTX_free(v8); return 0; } if ( (int)EVP_DigestUpdate((__int64)v8) > 0 ) { CRYPTO_free(v11, (__int64)"crypto/pkcs7/pk7_doit.c", 847); v11 = nullptr; if ( (int)EVP_DigestSignFinal(v8, 0, (__int64)&v12) > 0 ) { v11 = CRYPTO_malloc(v12, (__int64)"crypto/pkcs7/pk7_doit.c", 851); if ( !v11 ) { v9 = nullptr; goto LABEL_13; } if ( (int)EVP_DigestSignFinal(v8, (__int64)v11, (__int64)&v12) > 0 ) { if ( (int)EVP_PKEY_CTX_ctrl(v10, -1, 8) > 0 ) { EVP_MD_CTX_free(v8); ASN1_STRING_set0(*(_QWORD *)(a1 + 40), (__int64)v11, (int)v12); return 1; } ERR_put_error(33, 139, 152, (__int64)"crypto/pkcs7/pk7_doit.c", 859); } } v9 = v11; goto LABEL_13; } } v9 = v11; goto LABEL_13; } return result; }
GD Web Decomp Icon

GD Web Decomp

Raw Source