// // sub_1004138 from 0x1004138 to 0x1004294 (348 bytes) // // 2 xrefs: // > @ 0x13ffc00 // > @ 0x13ffcd8 // // 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_1004138(__int64 a1, __int64 a2) { __int64 v4; // x21 __int64 v5; // x0 _DWORD *v6; // x19 __int64 v7; // x1 int v8; // w0 __int64 v9; // x0 __int64 v10; // x21 int v11; // w23 __int64 v12; // x0 int v13; // w0 unsigned int v14; // w1 __int64 v16; // [xsp+48h] [xbp+48h] BYREF v16 = 0; v4 = *(_QWORD *)(a2 + 32); v5 = ASN1_STRING_new(); v6 = (_DWORD *)v5; if ( !v5 ) { ERR_put_error(5, 109, 65, "crypto/dh/dh_ameth.c", 110); goto LABEL_8; } v7 = v5 + 8; if ( *(_UNKNOWN **)(a2 + 16) == &dhx_asn1_meth ) v8 = i2d_DHxparams(v4, v7); else v8 = i2d_DHparams(v4, v7); *v6 = v8; if ( v8 <= 0 ) { ERR_put_error(5, 109, 65, "crypto/dh/dh_ameth.c", 115); goto LABEL_8; } v9 = BN_to_ASN1_INTEGER(*(_QWORD *)(v4 + 32), 0); v10 = v9; if ( !v9 ) goto LABEL_8; v11 = i2d_ASN1_INTEGER(v9, &v16); ASN1_INTEGER_free(v10); if ( v11 <= 0 ) { ERR_put_error(5, 109, 65, "crypto/dh/dh_ameth.c", 129); goto LABEL_8; } v12 = OBJ_nid2obj(**(unsigned int **)(a2 + 16)); v13 = X509_PUBKEY_set0_param(a1, v12, 16, v6, v16, (unsigned int)v11); v14 = 1; if ( !v13 ) { LABEL_8: CRYPTO_free(v16, "crypto/dh/dh_ameth.c", 138); ASN1_STRING_free((__int64)v6); return 0; } return v14; }
GD Web Decomp Icon

GD Web Decomp

Raw Source