// // SSL_CTX_new from 0xfbf788 to 0xfbfae8 (864 bytes) // // 2 xrefs: // > sub_E2DA90 @ 0xe2dd04 // > @ 0xcb9e0 // // 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:20 +0000 // __int64 __fastcall SSL_CTX_new(__int64 a1) { __int64 v2; // x19 __int64 (*v3)(void); // x0 __int64 v4; // x0 __int64 v5; // x0 __int64 v6; // x0 __int64 v7; // x0 __int64 v8; // x0 __int64 v9; // x0 __int64 digestbyname; // x0 __int64 v11; // x0 __int64 v12; // x0 if ( a1 ) { if ( (unsigned int)OPENSSL_init_ssl(0x200000, 0) ) { if ( (unsigned int)FIPS_mode() && *(int *)a1 <= 768 ) { ERR_put_error(20, 169, 143, "ssl/ssl_lib.c", 2354); return 0; } else { if ( (SSL_get_ex_data_X509_STORE_CTX_idx() & 0x80000000) != 0 ) { v2 = 0; ERR_put_error(20, 169, 269, "ssl/ssl_lib.c", 2359); goto LABEL_28; } v2 = CRYPTO_zalloc(872, "ssl/ssl_lib.c", 2362); if ( !v2 ) { LABEL_28: ERR_put_error(20, 169, 65, "ssl/ssl_lib.c", 2478); LABEL_29: SSL_CTX_free(v2); return 0; } v3 = *(__int64 (**)(void))(a1 + 184); *(_QWORD *)v2 = a1; *(_DWORD *)(v2 + 64) = 2; *(_DWORD *)(v2 + 272) = 0; *(_QWORD *)(v2 + 40) = 20480; *(_DWORD *)(v2 + 276) = 0; *(_QWORD *)(v2 + 72) = v3(); *(_DWORD *)(v2 + 148) = 1; v4 = CRYPTO_THREAD_lock_new(); *(_QWORD *)(v2 + 864) = v4; if ( v4 ) { *(_DWORD *)(v2 + 320) = 0; *(_QWORD *)(v2 + 280) = 102400; v5 = ssl_cert_new(); *(_QWORD *)(v2 + 288) = v5; if ( v5 ) { v6 = OPENSSL_LH_new(sub_FBC998, sub_FBCA70); *(_QWORD *)(v2 + 32) = v6; if ( v6 ) { v7 = X509_STORE_new(); *(_QWORD *)(v2 + 24) = v7; if ( v7 ) { v8 = CTLOG_STORE_new(); *(_QWORD *)(v2 + 392) = v8; if ( v8 ) { if ( !ssl_create_cipher_list( *(_QWORD *)v2, (__int64 *)(v2 + 8), (__int64 *)(v2 + 16), "ALL:!COMPLEMENTOFDEFAULT:!eNULL", *(_QWORD *)(v2 + 288)) || (int)OPENSSL_sk_num(*(_QWORD *)(v2 + 8)) <= 0 ) { ERR_put_error(20, 169, 161, "ssl/ssl_lib.c", 2400); goto LABEL_29; } v9 = X509_VERIFY_PARAM_new(); *(_QWORD *)(v2 + 376) = v9; if ( v9 ) { digestbyname = EVP_get_digestbyname("ssl3-md5"); *(_QWORD *)(v2 + 216) = digestbyname; if ( !digestbyname ) { ERR_put_error(20, 169, 242, "ssl/ssl_lib.c", 2409); goto LABEL_29; } v11 = EVP_get_digestbyname("ssl3-sha1"); *(_QWORD *)(v2 + 224) = v11; if ( !v11 ) { ERR_put_error(20, 169, 243, "ssl/ssl_lib.c", 2413); goto LABEL_29; } v12 = OPENSSL_sk_new_null(v11); *(_QWORD *)(v2 + 256) = v12; if ( v12 && (unsigned int)CRYPTO_new_ex_data(1, v2, v2 + 208) ) { if ( (*(_DWORD *)(*(_QWORD *)(a1 + 192) + 104LL) & 8) == 0 ) *(_QWORD *)(v2 + 240) = SSL_COMP_get_compression_methods(); *(_DWORD *)(v2 + 420) = 0x4000; *(_DWORD *)(v2 + 416) = 0x4000; if ( (int)RAND_bytes(v2 + 464, 16) <= 0 || (int)RAND_bytes(v2 + 480, 32) <= 0 || (int)RAND_bytes(v2 + 512, 32) <= 0 ) { *(_DWORD *)(v2 + 264) |= 0x4000u; } if ( (unsigned int)SSL_CTX_SRP_CTX_init(v2) ) { *(_DWORD *)(v2 + 264) |= 0x20004u; *(_DWORD *)(v2 + 856) = -1; return v2; } } } } } } } goto LABEL_28; } ERR_put_error(20, 169, 65, "ssl/ssl_lib.c", 2376); CRYPTO_free(v2, "ssl/ssl_lib.c", 2377); return 0; } } else { return 0; } } else { ERR_put_error(20, 169, 196, "ssl/ssl_lib.c", 2346); return 0; } }
GD Web Decomp Icon

GD Web Decomp

Raw Source