Hans Leidekker (@hans) commented about dlls/wbemprox/builtin.c:
+static enum fill_status fill_rawbiosdata( struct table *table, const struct expr *cond ) +{ + struct record_rawsmbiostables *rec; + enum fill_status status = FILL_STATUS_UNFILTERED; + UINT row = 0, len, written; + BYTE *buf; + + if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED; + + len = GetSystemFirmwareTable( RSMB, 0, NULL, 0 ); + if (!(buf = malloc( len ))) return FILL_STATUS_FAILED; + written = GetSystemFirmwareTable( RSMB, 0, buf, len ); + + rec = (struct record_rawsmbiostables *)table->data; + /* skip the first five fields of the RawSMBIOSData structure to retrieve the SMBIOSTableData[] */ + rec->smbiosdata = get_rawbiosdata( buf + 4 * sizeof(BYTE) + sizeof(DWORD), written - (4 * sizeof(BYTE) + sizeof(DWORD)) ); It would be cleaner to define that structure and use FIELD_OFFSET. Better use the Length field of that structure instead of calculating the size. You also need to add COL_FLAG_DYNAMIC to the SMBiosData colummn because the data is now allocated dynamically.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/8094#note_103935