// // sub_FF6400 from 0xff6400 to 0xff68a4 (1188 bytes) // // 1 xrefs: // > @ 0x13ff970 // // 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:48 +0000 // __int64 __fastcall sub_FF6400(__int64 a1, void *a2, int a3) { unsigned int *v3; // x19 __int64 v6; // x1 __int64 (__fastcall *v8)(__int64, __int64, _QWORD); // x22 unsigned int v9; // w21 int v10; // w19 unsigned int v12; // w0 int v13; // w3 __int64 v14; // x0 int v15; // w21 int v16; // w0 unsigned int v17; // w0 int v18; // w21 unsigned __int16 *v19; // x0 __int64 v20; // x0 unsigned int v21; // w0 __int64 v22; // x0 _BOOL8 v23; // x0 unsigned int *v24; // x0 unsigned int *v25; // x0 int v26; // [xsp+68h] [xbp+68h] __int64 v27; // [xsp+68h] [xbp+68h] v3 = *(unsigned int **)(a1 + 48); v6 = *v3; if ( (_DWORD)v6 == 5 ) { v9 = 0; goto LABEL_8; } v8 = *((__int64 (__fastcall **)(__int64, __int64, _QWORD))v3 + 6); v9 = -1; while ( 2 ) { switch ( (int)v6 ) { case 1: if ( *((_QWORD *)v3 + 1) || *((_QWORD *)v3 + 2) ) { *v3 = 2; if ( !v8 ) goto LABEL_14; v6 = 2; goto LABEL_35; } ERR_put_error(32, 115, 144, "crypto/bio/bss_conn.c", 83); ERR_add_error_data(4, "hostname=", *((_QWORD *)v3 + 1)); if ( v8 ) goto LABEL_5; goto LABEL_7; case 2: LABEL_14: v12 = v3[1]; switch ( v12 ) { case 6u: v13 = 10; break; case 0x100u: v13 = 0; break; case 4u: v13 = 2; break; default: ERR_put_error(32, 115, 146, "crypto/bio/bss_conn.c", 116); if ( v8 ) goto LABEL_5; goto LABEL_7; } if ( !(unsigned int)BIO_lookup( *((char **)v3 + 1), *((const char **)v3 + 2), 0, v13, 1, (struct addrinfo **)v3 + 4) ) { LABEL_4: if ( v8 ) goto LABEL_5; goto LABEL_7; } v14 = *((_QWORD *)v3 + 4); if ( !v14 ) { ERR_put_error(32, 115, 142, "crypto/bio/bss_conn.c", 125); if ( v8 ) goto LABEL_5; goto LABEL_7; } *((_QWORD *)v3 + 5) = v14; *v3 = 3; if ( v8 ) { v6 = 3; goto LABEL_35; } LABEL_19: v15 = BIO_ADDRINFO_family(*((_QWORD *)v3 + 5)); v26 = BIO_ADDRINFO_socktype(*((_QWORD *)v3 + 5)); v16 = BIO_ADDRINFO_protocol(*((_DWORD **)v3 + 5)); v17 = BIO_socket(v15, v26, v16); v9 = v17; if ( v17 == -1 ) { v24 = (unsigned int *)__errno(); ERR_put_error(2, 4, *v24, "crypto/bio/bss_conn.c", 137); ERR_add_error_data(4, "hostname=", *((_QWORD *)v3 + 1)); ERR_put_error(32, 115, 118, "crypto/bio/bss_conn.c", 141); if ( v8 ) goto LABEL_5; return v9; } *(_DWORD *)(a1 + 40) = v17; *v3 = 4; if ( v8 ) { v6 = 4; goto LABEL_35; } LABEL_21: BIO_clear_flags(a1, 15); v18 = *(_DWORD *)(a1 + 40); v19 = (unsigned __int16 *)BIO_ADDRINFO_address(*((_QWORD *)v3 + 5)); v20 = BIO_connect(v18, v19, *((_BYTE *)v3 + 24) | 4u); *(_DWORD *)(a1 + 36) = 0; v9 = v20; if ( (_DWORD)v20 ) { LABEL_22: *v3 = 5; if ( !v8 ) { v9 = 1; goto LABEL_8; } v6 = 5; LABEL_35: v9 = v8(a1, v6, v9); if ( !v9 ) return v9; v6 = *v3; continue; } if ( (unsigned int)BIO_sock_should_retry(v20) ) { BIO_set_flags(a1, 12); *v3 = 6; *(_DWORD *)(a1 + 36) = 2; ERR_clear_error(2); if ( !v8 ) return v9; goto LABEL_5; } v22 = BIO_ADDRINFO_next(*((_QWORD *)v3 + 5)); *((_QWORD *)v3 + 5) = v22; if ( v22 ) { v23 = BIO_closesocket(*(_DWORD *)(a1 + 40)); *v3 = 3; ERR_clear_error(v23); v6 = *v3; if ( v8 ) goto LABEL_35; continue; } v25 = (unsigned int *)__errno(); ERR_put_error(2, 2, *v25, "crypto/bio/bss_conn.c", 169); ERR_add_error_data(4, "hostname=", *((_QWORD *)v3 + 1)); ERR_put_error(32, 115, 103, "crypto/bio/bss_conn.c", 173); if ( !v8 ) return v9; LABEL_5: v6 = *v3; LABEL_6: v9 = v8(a1, v6, v9); LABEL_7: if ( (int)v9 > 0 ) { LABEL_8: if ( a2 ) { *(_DWORD *)__errno() = 0; v10 = read(*(_DWORD *)(a1 + 40), a2, a3); v9 = v10; BIO_clear_flags(a1, 15); if ( v10 <= 0 ) { if ( (unsigned int)BIO_sock_should_retry((unsigned int)v10) ) BIO_set_flags(a1, 9); } } } return v9; case 3: goto LABEL_19; case 4: goto LABEL_21; case 5: v9 = 1; if ( !v8 ) goto LABEL_8; goto LABEL_6; case 6: v21 = BIO_sock_error(*(_DWORD *)(a1 + 40)); if ( !v21 ) goto LABEL_22; v27 = v21; BIO_clear_flags(a1, 15); v9 = 0; ERR_put_error(2, 2, v27, "crypto/bio/bss_conn.c", 185); ERR_add_error_data(4, "hostname=", *((_QWORD *)v3 + 1)); ERR_put_error(32, 115, 110, "crypto/bio/bss_conn.c", 189); if ( !v8 ) return v9; goto LABEL_5; default: goto LABEL_4; } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source