// // ssl_choose_client_version from 0x7a772c to 0x7a7920 (500 bytes) // // 2 xrefs: // > tls_process_server_hello @ 0x7a0c30 // > @ 0x5cfec // // 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 // int __fastcall ssl_choose_client_version(int a1, int a2) { int v2; // r3 int *v3; // r3 int v4; // r2 int v5; // t1 int (*v7)(void); // r3 int *v10; // r0 int v11; // r2 int *v12; // r7 int v13; // r6 int v14; // r0 int v15; // r3 int v16; // r3 int v17; // r3 v2 = **(_DWORD **)(a1 + 4); if ( v2 == 0x10000 ) { v3 = &dword_AB18F8; } else { if ( v2 != 0x1FFFF ) { if ( *(_DWORD *)a1 == a2 ) return 0; else return 266; } v3 = &dword_AB18C8; } v4 = *v3; if ( !*v3 ) return 258; while ( a2 != v4 ) { v5 = v3[3]; v3 += 3; v4 = v5; if ( !v5 ) return 258; } v7 = (int (*)(void))v3[1]; if ( !v7 ) return 258; v10 = (int *)v7(); v11 = *(_DWORD *)(a1 + 308); v12 = v10; v13 = *v10; if ( v11 && v13 != v11 ) { if ( (*(_DWORD *)(*(_DWORD *)(*(_DWORD *)(a1 + 4) + 100) + 52) & 8) == 0 ) { if ( v13 < v11 ) return 396; goto LABEL_16; } if ( v13 != 256 ) { v17 = *v10; if ( v11 == 256 ) v11 = 65280; LABEL_30: if ( v11 < v17 ) return 396; goto LABEL_16; } if ( v11 != 256 ) { v17 = 65280; goto LABEL_30; } } LABEL_16: v14 = ssl_security(a1, 9); if ( !v14 ) return 396; v15 = *(_DWORD *)(a1 + 312); if ( v15 && v13 != v15 ) { if ( (*(_DWORD *)(*(_DWORD *)(*(_DWORD *)(a1 + 4) + 100) + 52) & 8) != 0 ) { if ( v13 == 256 ) { if ( v15 == 256 ) return 166; v13 = 65280; } else if ( v15 == 256 ) { v15 = 65280; } if ( v13 <= v15 ) return 166; } else if ( v13 >= v15 ) { return 166; } } if ( (v12[2] & *(_DWORD *)(a1 + 300)) != 0 ) return 258; v16 = v12[1]; if ( (v16 & 2) != 0 && (*(_DWORD *)(*(_DWORD *)(a1 + 200) + 16) & 0x30000) != 0 ) return 158; if ( (v16 & 1) != 0 && FIPS_mode(v14) ) return 143; *(_DWORD *)a1 = a2; *(_DWORD *)(a1 + 4) = v12; return 0; }
GD Web Decomp Icon

GD Web Decomp

Raw Source