// // dtls1_get_record from 0xd360f8 to 0xd36348 (592 bytes) // // 2 xrefs: // > dtls1_read_bytes @ 0xd30a68 // > @ 0x8fbe0 // // 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 // __int64 __fastcall dtls1_get_record(__int64 a1) { __int64 v1; // x21 __int64 v3; // x26 __int64 v4; // x22 unsigned int v5; // w0 unsigned int v6; // w20 __int64 result; // x0 unsigned __int16 *bitmap; // x20 void (__fastcall *v9)(_QWORD, _QWORD, __int64, _QWORD, __int64, __int64, _QWORD); // x7 unsigned __int8 *v10; // x20 int v11; // w1 int v12; // w2 int v13; // w1 int v14; // w2 int v15; // w0 int v16; // [xsp+5Ch] [xbp+5Ch] BYREF v1 = a1 + 2008; v3 = a1 + 2072; v4 = a1 + 4370; while ( (unsigned int)dtls1_process_buffered_records(a1) ) { if ( (unsigned int)dtls1_retrieve_buffered_record(a1, *(_QWORD *)(a1 + 4392) + 56LL) ) return 1; if ( *(_DWORD *)(a1 + 940) == 241 && (v5 = *(_DWORD *)(a1 + 4320), v5 > 0xC) ) { v6 = *(_DWORD *)(v1 + 8); } else { result = ssl3_read_n(a1, 13, *(_DWORD *)(a1 + 968), 0, 1); if ( (int)result <= 0 ) return result; if ( *(_DWORD *)(a1 + 4320) != 13 ) goto LABEL_10; v9 = *(void (__fastcall **)(_QWORD, _QWORD, __int64, _QWORD, __int64, __int64, _QWORD))(a1 + 160); *(_DWORD *)(a1 + 940) = 241; v10 = *(unsigned __int8 **)(a1 + 4312); if ( v9 ) v9(0, 0, 256, *(_QWORD *)(a1 + 4312), 13, a1, *(_QWORD *)(a1 + 168)); *(_DWORD *)(v1 + 4) = *v10; v11 = v10[1]; v12 = v10[2]; *(_QWORD *)(v1 + 56) = v10[4] | (v10[3] << 8); v13 = v12 | (v11 << 8); *(_DWORD *)v4 = *(_DWORD *)(v10 + 5); *(_WORD *)(v4 + 4) = *(_WORD *)(v10 + 9); v14 = *(_DWORD *)(a1 + 512); v6 = v10[12] | (v10[11] << 8); *(_DWORD *)(v1 + 8) = v6; v15 = *(_DWORD *)a1; if ( v14 ) { if ( (((unsigned __int16)v13 ^ (unsigned __int16)v15) & 0xFF00) != 0 ) { *(_DWORD *)(v1 + 8) = 0; goto LABEL_10; } } else if ( v13 != v15 ) { goto LABEL_9; } if ( v6 > 0x4540 ) goto LABEL_9; v5 = *(_DWORD *)(a1 + 4320); } if ( v5 - 13 < v6 && (unsigned int)ssl3_read_n(a1, v6, v6, 1, 1) != v6 ) goto LABEL_9; *(_DWORD *)(a1 + 940) = 240; bitmap = dtls1_get_bitmap(a1, v1, &v16); if ( !bitmap || !(unsigned int)dtls1_record_replay_check(a1, bitmap) ) goto LABEL_9; if ( !*(_DWORD *)(v1 + 8) ) continue; if ( !v16 ) { if ( (unsigned int)dtls1_process_record(a1, (__int64)bitmap) ) return 1; LABEL_9: *(_DWORD *)(v1 + 8) = 0; goto LABEL_10; } if ( !(unsigned int)SSL_in_init(a1) && !(unsigned int)ossl_statem_get_in_handshake(a1) ) goto LABEL_9; if ( (dtls1_buffer_record(a1, *(_QWORD *)(a1 + 4392) + 40LL, v3) & 0x80000000) != 0 ) return 0xFFFFFFFFLL; *(_DWORD *)(v1 + 8) = 0; LABEL_10: *(_DWORD *)(a1 + 4320) = 0; } return 0xFFFFFFFFLL; }
GD Web Decomp Icon

GD Web Decomp

Raw Source