// // X509_PURPOSE_add from 0x107f218 to 0x107f48c (628 bytes) // // 1 xrefs: // > @ 0x1059a0 // // 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:17:09 +0000 // __int64 __fastcall X509_PURPOSE_add(int a1, int a2, int a3, __int64 a4, const char *a5, const char *a6, __int64 a7) { unsigned int v13; // w22 int v14; // w0 char *v15; // x19 const char *v16; // x0 char v17; // w4 _DWORD *v19; // x0 __int64 v20; // x19 const char *v21; // x0 char v22; // w4 int *v23; // x0 v13 = a3 & 0xFFFFFFFE; v14 = X509_PURPOSE_get_by_id(a1); if ( v14 == -1 ) { v19 = CRYPTO_malloc(&dword_30, (__int64)"crypto/x509v3/v3_purp.c", 165); v20 = (__int64)v19; if ( v19 ) { v19[2] = 1; *((_QWORD *)v19 + 3) = CRYPTO_strdup(a5, (__int64)"crypto/x509v3/v3_purp.c", 179); v21 = CRYPTO_strdup(a6, (__int64)"crypto/x509v3/v3_purp.c", 180); *(_QWORD *)(v20 + 32) = v21; if ( v21 && *(_QWORD *)(v20 + 24) ) { v22 = *(_DWORD *)(v20 + 8); *(_DWORD *)v20 = a1; *(_DWORD *)(v20 + 4) = a2; v23 = (int *)qword_1568530; *(_QWORD *)(v20 + 16) = a4; *(_DWORD *)(v20 + 8) = v22 & 1 | 2 | v13; *(_QWORD *)(v20 + 40) = a7; if ( v23 || (v23 = (int *)OPENSSL_sk_new((__int64)sub_107E9E4), (qword_1568530 = (__int64)v23) != 0) ) { if ( (unsigned int)OPENSSL_sk_push(v23, v20) ) return 1; ERR_put_error(34, 137, 65, (__int64)"crypto/x509v3/v3_purp.c", 203); } else { ERR_put_error(34, 137, 65, (__int64)"crypto/x509v3/v3_purp.c", 199); } } else { ERR_put_error(34, 137, 65, (__int64)"crypto/x509v3/v3_purp.c", 182); } CRYPTO_free(*(void **)(v20 + 24), (__int64)"crypto/x509v3/v3_purp.c", 210); CRYPTO_free(*(void **)(v20 + 32), (__int64)"crypto/x509v3/v3_purp.c", 211); CRYPTO_free((void *)v20, (__int64)"crypto/x509v3/v3_purp.c", 212); return 0; } else { ERR_put_error(34, 137, 65, (__int64)"crypto/x509v3/v3_purp.c", 166); return 0; } } else { v15 = X509_PURPOSE_get0(v14); if ( (*((_DWORD *)v15 + 2) & 2) != 0 ) { CRYPTO_free(*((void **)v15 + 3), (__int64)"crypto/x509v3/v3_purp.c", 175); CRYPTO_free(*((void **)v15 + 4), (__int64)"crypto/x509v3/v3_purp.c", 176); } *((_QWORD *)v15 + 3) = CRYPTO_strdup(a5, (__int64)"crypto/x509v3/v3_purp.c", 179); v16 = CRYPTO_strdup(a6, (__int64)"crypto/x509v3/v3_purp.c", 180); *((_QWORD *)v15 + 4) = v16; if ( v16 && *((_QWORD *)v15 + 3) ) { v17 = *((_DWORD *)v15 + 2); *(_DWORD *)v15 = a1; *((_DWORD *)v15 + 1) = a2; *((_QWORD *)v15 + 2) = a4; *((_QWORD *)v15 + 5) = a7; *((_DWORD *)v15 + 2) = v17 & 1 | 2 | v13; return 1; } ERR_put_error(34, 137, 65, (__int64)"crypto/x509v3/v3_purp.c", 182); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source