mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 09:43:39 +00:00
winedump: Add support for decoding data stored in offset in regf files.
This commit is contained in:
parent
8885aea089
commit
b17fed0255
|
@ -193,6 +193,7 @@ static BOOL dump_subkeys(unsigned int hive_off, unsigned int off)
|
||||||
static BOOL dump_value(unsigned int hive_off, unsigned int off)
|
static BOOL dump_value(unsigned int hive_off, unsigned int off)
|
||||||
{
|
{
|
||||||
const void *data = NULL;
|
const void *data = NULL;
|
||||||
|
unsigned int data_size;
|
||||||
const value_key *val;
|
const value_key *val;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
||||||
|
@ -219,9 +220,15 @@ static BOOL dump_value(unsigned int hive_off, unsigned int off)
|
||||||
printf("@=");
|
printf("@=");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val->data_size)
|
data_size = val->data_size;
|
||||||
|
if (data_size & 0x80000000)
|
||||||
{
|
{
|
||||||
data = PRD(hive_off + val->data_off + sizeof(unsigned int), val->data_size);
|
data = &val->data_off;
|
||||||
|
data_size &= ~0x80000000;
|
||||||
|
}
|
||||||
|
else if (data_size)
|
||||||
|
{
|
||||||
|
data = PRD(hive_off + val->data_off + sizeof(unsigned int), data_size);
|
||||||
if (!data)
|
if (!data)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
@ -230,7 +237,7 @@ static BOOL dump_value(unsigned int hive_off, unsigned int off)
|
||||||
{
|
{
|
||||||
case REG_SZ:
|
case REG_SZ:
|
||||||
printf("%s", !data ? "" :
|
printf("%s", !data ? "" :
|
||||||
get_unicode_str((const WCHAR *)data, val->data_size / sizeof(WCHAR)));
|
get_unicode_str((const WCHAR *)data, data_size / sizeof(WCHAR)));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("unhandled data type %d", val->data_type);
|
printf("unhandled data type %d", val->data_type);
|
||||||
|
|
Loading…
Reference in a new issue