// // sub_840B9C from 0x840b9c to 0x840d24 (392 bytes) // // 7 xrefs: // > sub_840D28 @ 0x840d30 // > sub_840D34 @ 0x840d3c // > X509_check_trust @ 0x840e7c // > X509_TRUST_set_default @ 0x840d48 // > X509_TRUST_set_default @ 0x840d4c // > X509_check_trust @ 0x840e94 // > @ 0xac0f60 // // 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 sub_840B9C(char *a1, int a2, char a3) { int *v3; // r5 int v7; // r0 signed int v8; // r4 signed int v9; // r4 int v10; // r0 int v11; // r0 int v13; // r0 unsigned int v14; // r1 bool v15; // cc int v16; // r0 char *v17; // r0 signed int v18; // r4 int v19; // r0 signed int v20; // r4 int v21; // r0 unsigned int v22; // r1 int v23; // r0 char *v24; // r0 v3 = *(int **)(a2 + 180); if ( !v3 ) goto LABEL_10; v7 = v3[1]; if ( !v7 ) { v11 = *v3; if ( !*v3 ) goto LABEL_10; if ( (a3 & 0x10) != 0 ) { LABEL_29: v20 = 0; while ( 1 ) { v21 = OPENSSL_sk_num(v11); v22 = v20; v15 = v20++ < v21; if ( !v15 ) break; v23 = OPENSSL_sk_value((_DWORD *)*v3, v22); v24 = OBJ_obj2nid(v23); if ( v24 == a1 || v24 == (_BYTE *)&stru_38C.st_name + 2 ) return 1; v11 = *v3; } return 2; } LABEL_20: v18 = 0; while ( v18 < OPENSSL_sk_num(v11) ) { v19 = OPENSSL_sk_value((_DWORD *)*v3, v18++); if ( OBJ_obj2nid(v19) == a1 ) return 1; v11 = *v3; } return 2; } v8 = a3 & 0x10; if ( (a3 & 0x10) == 0 ) { while ( v8 < OPENSSL_sk_num(v7) ) { v10 = OPENSSL_sk_value((_DWORD *)v3[1], v8++); if ( OBJ_obj2nid(v10) == a1 ) return 2; v7 = v3[1]; } v11 = *v3; if ( !*v3 ) goto LABEL_10; goto LABEL_20; } v9 = 0; while ( 1 ) { v13 = OPENSSL_sk_num(v7); v14 = v9; v15 = v9++ < v13; if ( !v15 ) break; v16 = OPENSSL_sk_value((_DWORD *)v3[1], v14); v17 = OBJ_obj2nid(v16); if ( v17 == a1 || v17 == (_BYTE *)&stru_38C.st_name + 2 ) return 2; v7 = v3[1]; } v11 = *v3; if ( *v3 ) goto LABEL_29; LABEL_10: if ( (a3 & 8) != 0 && (X509_check_purpose(a2, -1, 0), (a3 & 4) == 0) && (*(_DWORD *)(a2 + 112) & 0x2000) != 0 ) return 1; else return 3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source