// // tls1_check_curve from 0x9c2d3c to 0x9c2eec (432 bytes) // // 2 xrefs: // > tls_process_key_exchange @ 0x9b7f30 // > @ 0x76c6c // // 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:07:05 +0000 // int __fastcall tls1_check_curve(_DWORD *a1, _BYTE *a2, int a3) { int v3; // r3 int v5; // r2 int v6; // r12 unsigned int v7; // r4 char *v8; // r2 unsigned int v9; // r4 char *v10; // r2 unsigned int v11; // r12 int v12; // lr v3 = *(_DWORD *)(a1[50] + 16); if ( a3 != 3 || *a2 != 3 ) return 0; v5 = v3 & 0x30000; if ( (v3 & 0x30000) != 0 ) { v6 = *(_DWORD *)(*(_DWORD *)(a1[26] + 528) + 8); if ( a2[1] ) return 0; if ( v6 == 50380843 ) { if ( a2[2] != 23 ) return 0; } else if ( v6 != 50380844 || a2[2] != 24 ) { return 0; } switch ( v5 ) { case 131072: v7 = 2; v8 = (char *)&unk_C5181A; goto LABEL_13; case 196608: v7 = 4; v8 = (char *)&unk_C51818; goto LABEL_13; case 65536: v7 = 2; v8 = (char *)&unk_C51818; goto LABEL_13; } } v8 = (char *)a1[105]; v7 = a1[104]; if ( !v8 ) { v9 = 4; v8 = (char *)&unk_C51810; goto LABEL_14; } if ( (v7 & 1) != 0 ) { ERR_put_error(20, 338, 68, "ssl/t1_lib.c", 291); return 0; } LABEL_13: v9 = v7 >> 1; if ( !v9 ) return 0; LABEL_14: v10 = v8 + 2; v11 = 0; while ( 1 ) { ++v11; if ( *(v10 - 2) == a2[1] ) { v12 = (unsigned __int8)a2[2]; if ( v12 == (unsigned __int8)*(v10 - 1) ) break; } v10 += 2; if ( v11 >= v9 ) return 0; } if ( a2[1] ) return 1; if ( (unsigned __int8)(v12 - 1) > 0x1Cu ) return 0; return ssl_security((int)a1, 131078); }
GD Web Decomp Icon

GD Web Decomp

Raw Source