// // ssl3_choose_cipher from 0x9a31bc to 0x9a33cc (528 bytes) // // 3 xrefs: // > tls_process_client_hello @ 0x9be444 // > tls_post_process_client_hello @ 0x9be73c // > @ 0x7479c // // This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False! // // 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 12:06:49 +0000 // int __fastcall ssl3_choose_cipher(int *a1, int a2, int a3) { int v3; // r3 int v5; // r9 int v6; // r6 int v7; // r4 _DWORD *v8; // r0 _DWORD *v9; // r10 int v10; // r1 int v11; // r2 int v12; // r2 int v13; // r2 int v14; // r7 int v15; // r1 int v16; // r2 int v17; // r8 int v18; // r7 int v19; // r11 int v21; // [sp+Ch] [bp-8h] v3 = a1[75]; v5 = a2; v6 = a3; if ( (v3 & 0x400000) == 0 ) { v3 = *(_DWORD *)(a1[50] + 16); if ( (v3 & 0x30000) == 0 ) { v3 = a3; v6 = a2; v5 = a3; } } tls1_set_cert_validity(a1, a2, a3, v3); ssl_set_masks(a1); v7 = 0; v21 = 0; if ( OPENSSL_sk_num(v6) <= 0 ) return v21; while ( 1 ) { v8 = (_DWORD *)OPENSSL_sk_value(v6, v7); v9 = v8; if ( (*(_DWORD *)(*(_DWORD *)(a1[1] + 100) + 52) & 8) == 0 ) break; v10 = *a1; v11 = v8[9]; if ( *a1 == 256 ) { if ( v11 != 256 && v11 <= 65279 ) goto LABEL_28; v12 = v8[10]; if ( v12 == 256 ) goto LABEL_13; v10 = 65280; } else { if ( v11 == 256 ) v11 = 65280; if ( v10 > v11 ) goto LABEL_28; v12 = v8[10]; if ( v12 == 256 ) v12 = 65280; } if ( v12 <= v10 ) goto LABEL_13; LABEL_28: ++v7; LABEL_29: if ( v7 >= OPENSSL_sk_num(v6) ) return v21; } if ( *a1 < v8[7] ) goto LABEL_28; if ( *a1 > v8[8] ) { ++v7; goto LABEL_29; } LABEL_13: v13 = a1[26]; v14 = v8[3]; v15 = *(_DWORD *)(v13 + 684); v16 = *(_DWORD *)(v13 + 688); if ( (a1[137] & 0x20) != 0 ) { v15 |= 0x20u; v16 |= 0x40u; } v17 = v8[4]; if ( (v14 & 0x1C8) != 0 && !a1[68] ) goto LABEL_28; if ( (v15 & v14) == 0 ) goto LABEL_28; if ( (v16 & v17) == 0 ) goto LABEL_28; v18 = v8[3] & 4; if ( v18 ) { if ( !tls1_check_ec_tmp_key(a1, v8[2]) ) goto LABEL_28; } v19 = OPENSSL_sk_find(v5, v9); if ( v19 < 0 || !ssl_security(a1, 65538, v9[13], 0, v9) ) goto LABEL_28; if ( v18 && (v17 & 8) != 0 && *(_BYTE *)(a1[26] + 860) ) { if ( !v21 ) v21 = OPENSSL_sk_value(v5, v19); goto LABEL_28; } return OPENSSL_sk_value(v5, v19); }
GD Web Decomp Icon

GD Web Decomp

Raw Source