Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
3c2d6128
Commit
3c2d6128
authored
May 05, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winedump: Dump registry scripts resources as text.
parent
da387a9b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
pe.c
tools/winedump/pe.c
+18
-2
No files found.
tools/winedump/pe.c
View file @
3c2d6128
...
@@ -3025,7 +3025,7 @@ static void dump_version_data( const void *ptr, unsigned int size, const char *p
...
@@ -3025,7 +3025,7 @@ static void dump_version_data( const void *ptr, unsigned int size, const char *p
}
}
/* dump data for a HTML/MANIFEST resource */
/* dump data for a HTML/MANIFEST resource */
static
void
dump_
xml
_data
(
const
void
*
ptr
,
unsigned
int
size
,
const
char
*
prefix
)
static
void
dump_
text
_data
(
const
void
*
ptr
,
unsigned
int
size
,
const
char
*
prefix
)
{
{
const
char
*
p
=
ptr
,
*
end
=
p
+
size
;
const
char
*
p
=
ptr
,
*
end
=
p
+
size
;
...
@@ -3038,6 +3038,18 @@ static void dump_xml_data( const void *ptr, unsigned int size, const char *prefi
...
@@ -3038,6 +3038,18 @@ static void dump_xml_data( const void *ptr, unsigned int size, const char *prefi
}
}
}
}
static
int
cmp_resource_name
(
const
IMAGE_RESOURCE_DIR_STRING_U
*
str_res
,
const
char
*
str
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
str_res
->
Length
;
i
++
)
{
int
res
=
str_res
->
NameString
[
i
]
-
(
WCHAR
)
str
[
i
];
if
(
res
||
!
str
[
i
])
return
res
;
}
return
-
(
WCHAR
)
str
[
i
];
}
static
void
dump_dir_resource
(
void
)
static
void
dump_dir_resource
(
void
)
{
{
const
IMAGE_RESOURCE_DIRECTORY
*
root
=
get_dir
(
IMAGE_FILE_RESOURCE_DIRECTORY
);
const
IMAGE_RESOURCE_DIRECTORY
*
root
=
get_dir
(
IMAGE_FILE_RESOURCE_DIRECTORY
);
...
@@ -3090,6 +3102,10 @@ static void dump_dir_resource(void)
...
@@ -3090,6 +3102,10 @@ static void dump_dir_resource(void)
data
=
(
const
IMAGE_RESOURCE_DATA_ENTRY
*
)((
const
char
*
)
root
+
e3
->
OffsetToData
);
data
=
(
const
IMAGE_RESOURCE_DATA_ENTRY
*
)((
const
char
*
)
root
+
e3
->
OffsetToData
);
if
(
e1
->
NameIsString
)
if
(
e1
->
NameIsString
)
{
{
string
=
(
const
IMAGE_RESOURCE_DIR_STRING_U
*
)((
const
char
*
)
root
+
e1
->
NameOffset
);
if
(
!
cmp_resource_name
(
string
,
"WINE_REGISTRY"
))
dump_text_data
(
RVA
(
data
->
OffsetToData
,
data
->
Size
),
data
->
Size
,
" | "
);
else
dump_data
(
RVA
(
data
->
OffsetToData
,
data
->
Size
),
data
->
Size
,
" "
);
dump_data
(
RVA
(
data
->
OffsetToData
,
data
->
Size
),
data
->
Size
,
" "
);
}
}
else
switch
(
e1
->
Id
)
else
switch
(
e1
->
Id
)
...
@@ -3105,7 +3121,7 @@ static void dump_dir_resource(void)
...
@@ -3105,7 +3121,7 @@ static void dump_dir_resource(void)
break
;
break
;
case
23
:
/* RT_HTML */
case
23
:
/* RT_HTML */
case
24
:
/* RT_MANIFEST */
case
24
:
/* RT_MANIFEST */
dump_
xml
_data
(
RVA
(
data
->
OffsetToData
,
data
->
Size
),
data
->
Size
,
" | "
);
dump_
text
_data
(
RVA
(
data
->
OffsetToData
,
data
->
Size
),
data
->
Size
,
" | "
);
break
;
break
;
default:
default:
dump_data
(
RVA
(
data
->
OffsetToData
,
data
->
Size
),
data
->
Size
,
" "
);
dump_data
(
RVA
(
data
->
OffsetToData
,
data
->
Size
),
data
->
Size
,
" "
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment